This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: Kernel panics and resets on boot up while enabling initramfs in AM3352

Part Number: AM3352

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:

  1. Created directory "/home/user/ramfs", created fs directories (sys, proc, etc, bin, sbin, usr, etc.), and copied required bin and libs on Linux Machine
  2. Created init links (init -> /bin/busybox) 
  3. Given the Linux PC path in "CONFIG_INITRAMFS_SOURCE"
  4. Updated other Kernel configurations as follows:
    1. CONFIG_BLK_DEV_INITRD=y
    2. CONFIG_INITRAMFS_SOURCE="/home/user/ramfs/"
    3. CONFIG_BLK_DEV_RAM=y
    4. CONFIG_BLK_DEV_RAM_COUNT=1
    5. CONFIG_BLK_DEV_RAM_SIZE=8192
    6. 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

  • Hi Bin Liu,

    Thank you for the prompt response.

    I have followed the steps from your shared link (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1084608/am6442-how-to-create-a-ramdisk) to generate external cpio.gz file and used u-boot commands to boot from ramfs but the processor is booting from SDcard rootfs and rebooting while loading kernel.

    Further, I have also tried all the steps of the link (https://software-dl.ti.com/processor-sdk-linux/esd/docs/07_03_00_005/linux/How_to_Guides/Host/Program_the_eMMC_on_Beaglebone_Black.html) to generate initramfs as a part of zImage but the processor is rebooting while starting the kernel execution.

    Steps Followed:

    1. Downloaded "am335x-evm-linux-sdk-bin-04.03.00.05.tar.xz" and extracted "arago-base-tisdk-image-am335x-evm.tar.xz" in the host machine directory "/tisdk/filesystem/arago-tiny-image-am335x-evm".

    2. Added init soft link: init -> sbin/init.

    3. Added S99MyScript soft link in etc/rc5.d

    4. Added custom "project.dts" in boot/ directory

    5. Updated kernel configuration as follows:

    CONFIG_BLK_DEV_INITRD=y
    CONFIG_INITRAMFS_SOURCE="/home/project/Release/tisdk/filesystem/arago-tiny-image-am335x-evm"
    CONFIG_RD_GZIP=y
    CONFIG_RD_BZIP2=y
    CONFIG_RD_LZMA=y
    CONFIG_RD_XZ=y
    CONFIG_RD_LZO=y
    CONFIG_RD_LZ4=y
    CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y


    CONFIG_BLK_DEV_RAM=y
    CONFIG_BLK_DEV_RAM_COUNT=1
    CONFIG_BLK_DEV_RAM_SIZE=65536

    6. Built kernel and created SD card withn new zImage

    7. Inserted SDcard into the board and tuned on

    Output:

    The processor is rebooting while executing the kernel image.

    Logs:

    U-Boot 2017.01-g47cf882c2e (Apr 05 2022 - 12:00:39 +0000)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM: 1 GiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment


    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    35701456 bytes read in 6794 ms (5 MiB/s)
    37787 bytes read in 20 ms (1.8 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff3000, end 8ffff39a ... OK

    Starting kernel ...

    [*** Processor is rebooted ****]

    Questions:

    1. File system directory is provided in the kernel configuration "CONFIG_INITRAMFS_SOURCE" and the kernel will compress and add in zImage while building, Is it correct?

    2. On boot up initramfs will be loaded automatically on power-up without configuring u-boot parameters manually. Is it correct?

    Request you to review and provide your input.

    Please let me know if any further information is required.

    Thanks and regards,

    Patel

  • Hi Team,

    Awaiting a response from you.

    Thanks and regards,

    Patel