Hi Team,
I am trying to enable "initramfs" as part of the kernel image and want to load automatically on boot up in the AM335x processor.
I have followed multiple web links, kernel documents, and tried all possible options but have not achieved the target yet.
Links followed:
- www.daimajiaoliu.com/.../47da5b72c100404
- https://wiki.gentoo.org/wiki/Custom_Initramfs
Steps followed:
- Created directory "/home/user/ramfs", created fs directories (sys, proc, etc, bin, sbin, usr, etc.), and copied required bin and libs on Linux Machine
- Created init links (init -> /bin/busybox)
- Given the Linux PC path in "CONFIG_INITRAMFS_SOURCE"
- Updated other Kernel configurations as follows:
- CONFIG_BLK_DEV_INITRD=y
- CONFIG_INITRAMFS_SOURCE="/home/user/ramfs/"
- CONFIG_BLK_DEV_RAM=y
- CONFIG_BLK_DEV_RAM_COUNT=1
- CONFIG_BLK_DEV_RAM_SIZE=8192
- CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
5. Rebuilt Kernel and tried to boot using the updated kernel
Further, tried to boot up by creating ".cpio" of the ramfs directory but the result was the same.
I am using the Yocto build system with kernel v4.9.XX.
Logs:
3.048710] mmcblk2: mmc2:0001 W62704 3.56 GiB
[ 3.054189] mmcblk2boot0: mmc2:0001 W62704 partition 1 2.00 MiB
[ 3.061194] mmcblk2boot1: mmc2:0001 W62704 partition 2 2.00 MiB
[ 3.069784] mmcblk2: p1 p2 p3
[ 3.105465] VFS: Cannot open root device "PARTUUID=8335675a-02" or unknown-block(179,2): error -2
[ 3.114809] Please append a correct "root=" boot option; here are the available partitions:
[ 3.123729] 0100 65536 ram0 [ 3.127910] (driver?)
[ 3.130423] 0101 65536 ram1 [ 3.134179] (driver?)
[ 3.136787] 0102 65536 ram2 [ 3.140544] (driver?)
[ 3.143041] 0103 65536 ram3 [ 3.146947] (driver?)
[ 3.149454] 0104 65536 ram4 [ 3.153209] (driver?)
[ 3.155756] 0105 65536 ram5 [ 3.159512] (driver?)
[ 3.162008] 0106 65536 ram6 [ 3.165800] (driver?)
[ 3.168300] 0107 65536 ram7 [ 3.172054] (driver?)
[ 3.174549] 0108 65536 ram8 [ 3.178338] (driver?)
[ 3.180837] 0109 65536 ram9 [ 3.184591] (driver?)
[ 3.187259] 010a 65536 ram10 [ 3.191109] (driver?)
[ 3.193606] 010b 65536 ram11 [ 3.197642] (driver?)
[ 3.200148] 010c 65536 ram12 [ 3.203995] (driver?)
[ 3.206538] 010d 65536 ram13 [ 3.210385] (driver?)
[ 3.212880] 010e 65536 ram14 [ 3.216761] (driver?)
[ 3.219261] 010f 65536 ram15 [ 3.223107] (driver?)
[ 3.225647] b300 15558144 mmcblk1 [ 3.229679] driver: mmcblk
[ 3.232631] b301 72292 mmcblk1p1 8335675a-01[ 3.238061]
[ 3.239647] b302 1822864 mmcblk1p2 8335675a-02[ 3.245043]
[ 3.246661] b303 13638890 mmcblk1p3 8335675a-03[ 3.252058]
[ 3.253642] b310 3735552 mmcblk2 [ 3.257705] driver: mmcblk
[ 3.260660] b311 72292 mmcblk2p1 0446bdbc-01[ 3.266142] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 3.273303]
[ 3.274891] b312 1822864 mmcblk2p2 0446bdbc-02[ 3.280333]
[ 3.281922] b313 1816298 mmcblk2p3 0446bdbc-03[ 3.287346]
[ 3.288934] b330 2048 mmcblk2boot1 [ 3.293419] (driver?)
[ 3.295953] b320 2048 mmcblk2boot0 [ 3.300438] (driver?)
[ 3.302934] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[ 3.311820] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[ 3.435457] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[ 3.442518] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.466823] hub 1-1:1.0: USB hub found
Please review and share your inputs.
Thanks and regards,
Patel