AnsweredAssumed Answered

kernel panic: Generated kernel Image is not Loading from u-boot

Question asked by NDesai Employee on May 21, 2018
Latest reply on May 28, 2018 by NDesai

Hi,

 

I am using SC-584-EZKIT to bring-up linux on A5 core.

 

By following the user guide 1.2.0, I am able to get the linux runnig on the board with the default kernel image located at /opt/analog/cces-linux-add-in/1.2.0/buildroot-sc5xx-1.2.0/images/uImage-sc584-ezkit.
In addition, basic "Hello World" application is correctly executing on the board.

 

 

Buildroot menuconfig: customized kernel uImage starts to load, but gives kernel panic and image does not load completely.
      a. By configuring any parameters in buildroot, an uImage is generated. The generated kernel  uImage (size 5.2 MB) has path /buildroot/output/images. I copied that image in /tftpboot/uImage.
      b. When I restart the board, u-boot is able to fetch this image, but image is not getting loaded fully. [See log]
      c. I suspect the size of uImage. Customize uImage is (5.2 MB) and default uImage (uImage-sc584-ezkit) is ~22 MB.

 

This gives error as Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2).

 

 

The bootarg of u-boot is as follows:

bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=(25000000) earlyprintk=serial,uart0,57600 console=ttySC0,57600 mem=112M

 

 

 

 

log:

 

IP-Config: Complete:
device=eth0, hwaddr=02:80:ad:20:31:e8, ipaddr=10.42.0.15, mask=255.255.255.0, gw=10.42.0.1
host=sc58x, domain=, nis-domain=(none)
bootserver=10.42.0.1, rootserver=10.42.0.1, rootpath=
ALSA device list:
No soundcards found.
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200000: 0xf1fd instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200004: 0xd30c instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200008: 0xe8bb instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0020000c: 0xbd46 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200010: 0x2656 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200014: 0x6fb7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200018: 0xbf90 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0020001c: 0xb35b instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200020: 0x864e instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00200024: 0xe528 instead
jffs2: Further such events for this erase block will not be printed
random: nonblocking pool is initialized
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f0000: 0x0100 instead
jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
jffs2: empty_blocks 2558, bad_blocks 0, c->nr_blocks 2560
VFS: Cannot open root device "mtdblock2" or unknown-block(31,2): error -5
Please append a correct "root=" boot option; here are the available partitions:
1f00 512 mtdblock0 (driver?)
1f01 5632 mtdblock1 (driver?)
1f02 10240 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.0.0-ADI-1.2.0 #1
Hardware name: SC58x-EZKIT (Device Tree Support)
[<c0012ce0>] (unwind_backtrace) from [<c0011040>] (show_stack+0x10/0x14)
[<c0011040>] (show_stack) from [<c03803f4>] (panic+0x90/0x1e4)
[<c03803f4>] (panic) from [<c04fc1ac>] (mount_block_root+0x24c/0x2dc)
[<c04fc1ac>] (mount_block_root) from [<c04fc3fc>] (prepare_namespace+0x15c/0x1a0)
[<c04fc3fc>] (prepare_namespace) from [<c04fbe2c>] (kernel_init_freeable+0x1d4/0x1e4)
[<c04fbe2c>] (kernel_init_freeable) from [<c037f1bc>] (kernel_init+0xc/0xe8)
[<c037f1bc>] (kernel_init) from [<c000e1a0>] (ret_from_fork+0x14/0x34)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

Outcomes