Failed to boot kernel with initramfs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to boot kernel with initramfs

2,243 Views
RobbieJiang
Contributor IV

I'm working with imx6q sabrelite with linux-3.0.35, u-boot-2009.08.

I can boot kernel with NFS-mounted rootfs.

However,  with the initramfs ( initramfs.cpio.gz.uboot from Freescale MFG  tool),

the kernel failed to mount the root filesystem.

Here are my u-boot commands:

setenv bootargs console=ttymxc0,115200 root=/dev/ram0 rw initrd=0x10C00000,4545390 ip=${ipaddr}

tftpboot ${ramfs_loadaddr} ${ramfs}

tftpboot ${loadaddr} ${kernel}

bootm 0x10800000 0x10C00000

Basically, I firstly download kernel uImage to 0x10800000,

and then download initramfs.cpio.gz.uboot to 0x10C00000,

then run 'bootm' with the specified bootargs.

The booting process failed when trying to mount root filesystem with the following outputs:

......

......

regulator_init_complete: VDDIO: incomplete constraints, leaving on

regulator_init_complete: VDDA: incomplete constraints, leaving on

snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:41:58 UTC (2518)

eth0: Freescale FEC PHY driver [Micrel KSZ9021 Gigabit PHY] (mii_bus:phy_addr=1:04, irq=-1)

PHY: 1:04 - Link is Up - 100/Full

IP-Config: Guessing netmask 255.255.255.0

IP-Config: Complete:

     device=eth0, addr=192.168.0.64, mask=255.255.255.0, gw=255.255.255.255,

     host=192.168.0.64, domain=, nis-domain=(none),

     bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=

VFS: Cannot open root device "ram0" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

1f00            1024 mtdblock0  (driver?)

1f01            1024 mtdblock1  (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

[<80047e34>] (unwind_backtrace+0x0/0xf8) from [<8052f310>] (panic+0x74/0x18c)

[<8052f310>] (panic+0x74/0x18c) from [<80008d3c>] (mount_block_root+0x170/0x224)

[<80008d3c>] (mount_block_root+0x170/0x224) from [<80008ed8>] (mount_root+0xe8/0x108)

[<80008ed8>] (mount_root+0xe8/0x108) from [<80009024>] (prepare_namespace+0x12c/0x184)

[<80009024>] (prepare_namespace+0x12c/0x184) from [<80008a04>] (kernel_init+0x108/0x13c)

[<80008a04>] (kernel_init+0x108/0x13c) from [<80041aa4>] (kernel_thread_exit+0x0/0x8)

CPU1: stopping

[<80047e34>] (unwind_backtrace+0x0/0xf8) from [<8003b324>] (do_IPI+0x150/0x17c)

[<8003b324>] (do_IPI+0x150/0x17c) from [<80040a0c>] (__irq_svc+0x4c/0xe8)

Exception stack(0xe9fadf90 to 0xe9fadfd8)

df80:                                     80b2a8a0 80000093 00000001 00000000

dfa0: e9fac000 80b23424 80adda6c 80537b98 80ae0f0c 412fc09a 00000000 00000000

dfc0: 00000000 e9fadfd8 8004ff0c 80041b04 40000013 ffffffff

[<80040a0c>] (__irq_svc+0x4c/0xe8) from [<80041b04>] (default_idle+0x24/0x28)

[<80041b04>] (default_idle+0x24/0x28) from [<80041d20>] (cpu_idle+0xe0/0x124)

[<80041d20>] (cpu_idle+0xe0/0x124) from [<1052bc34>] (0x1052bc34)

CPU2: stopping

[<80047e34>] (unwind_backtrace+0x0/0xf8) from [<8003b324>] (do_IPI+0x150/0x17c)

[<8003b324>] (do_IPI+0x150/0x17c) from [<80040a0c>] (__irq_svc+0x4c/0xe8)

Exception stack(0xe9fb5f90 to 0xe9fb5fd8)

5f80:                                     80b2a8a0 60000093 00000001 00000000

5fa0: e9fb4000 80b23424 80adda6c 80537b98 80ae0f0c 412fc09a 00000000 00000000

5fc0: 00000000 e9fb5fd8 8004ff0c 80041b04 40000013 ffffffff

[<80040a0c>] (__irq_svc+0x4c/0xe8) from [<80041b04>] (default_idle+0x24/0x28)

[<80041b04>] (default_idle+0x24/0x28) from [<80041d20>] (cpu_idle+0xe0/0x124)

[<80041d20>] (cpu_idle+0xe0/0x124) from [<1052bc34>] (0x1052bc34)

CPU3: stopping

[<80047e34>] (unwind_backtrace+0x0/0xf8) from [<8003b324>] (do_IPI+0x150/0x17c)

[<8003b324>] (do_IPI+0x150/0x17c) from [<80040a0c>] (__irq_svc+0x4c/0xe8)

Exception stack(0xe9f01f90 to 0xe9f01fd8)

1f80:                                     80b2a8a0 60000093 00000001 00000000

1fa0: e9f00000 80b23424 80adda6c 80537b98 80ae0f0c 412fc09a 00000000 00000000

1fc0: 00000000 e9f01fd8 8004ff0c 80041b04 40000013 ffffffff

[<80040a0c>] (__irq_svc+0x4c/0xe8) from [<80041b04>] (default_idle+0x24/0x28)

[<80041b04>] (default_idle+0x24/0x28) from [<80041d20>] (cpu_idle+0xe0/0x124)

[<80041d20>] (cpu_idle+0xe0/0x124) from [<1052bc34>] (0x1052bc34)

Is there anything wrong with my kernel command line?

Or should I set the kernel command line in a way similar to the one in

"include/configs/mx6q_sabrelite_mfg.h"??

include/configs/mx6q_sabrelite_mfg.h:

16 #define CONFIG_BOOTARGS         "console=ttymxc1,115200 rdinit=/linuxrc"

117 #define CONFIG_BOOTCOMMAND      "bootm 0x10800000 0x10c00000"

Labels (2)
0 Kudos
1 Reply

875 Views
RobbieJiang
Contributor IV

Another two interesting findings:

1.With the same initramfs file, the system can boot successfully

if the initramfs.cpio.gz is included in the kernel image.

2. If I create a standard ext2 ramdisk with the same contents extracted from initramfs.cpio.gz,

and download uImage and the new ramdisk in u-boot by tftp,

the the command "bootm ${kernel_loadaddr} ${ramdisk_loadaddr}"

can also boot the system successfully.

Seems that the file "initramfs.cpio.gz.uboot" is not a valid ramdisk image.

Or am I doing something wrong?

0 Kudos