I merged some upstream patches to the latest jetson kernel. When reboot the tegra, the boot procedure got stuck at the step “Root device found: mmcblk0p1”. see below :
[except]
[ 0.566646] ALSA device list:
[ 0.566650] No soundcards found.
[ 0.576465] Freeing unused kernel memory: 5376K
[ 0.614609] Run /init as init process
[ 0.643322] Root device found: mmcblk0p1. <<<< stuck here
Normally, the boot sequences next to “root device found: mmcblk0p1” should look like :
Found dev node: /dev/mmcblk0p1
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode.
Rootfs mounted over mmcblk0p1
…
Based on this message, it seems that root device node is no longer recognized by the kernel or driver after the update.
Certainly, this is caused by the code I merged in. But my question is simple: if I want to debug the problem further, how do I locate the place where the last message “Root device found: mmcblk0p1” was displayed?
If someone can help me to locate that place, I think I can move on.
I actually can monitor the boot process from a PC console. If using ‘script boot_log.txt’ can catch more detailed info, please kindly let me to how to do that.
Note that even if your patches did not exist, we’d still need to know exactly how you configured your kernel before compile. We don’t know if you started with a matching configuration (aside from perhaps adding something used with the patches), and we don’t know if you also installed all of the modules (with patched source this is likely required…a new “uname -r” and new modules in “/lib/modules/$(uname -r)/kernel”).
how do I locate the place where the last message “Root device found: mmcblk0p1” was displayed?
, I think you mean that there’s too many log showing up on the screen, so it’s hard to find where a specific line of message appear, so you may first cache the UART log, and use a text editor to analyze the log afterwards.
So it’s
script boot_log.txt
Open a serial connection session
Boot your device
Close the session
exit
Actually I have all the boot sequences on the console. But my question is simple - I need to find out the place where this string “Root device found” was emitted from the source so that I can further investigate the problem.
For example, if the message is “Freeing unused kernel memory”, then this message should be displayed by the function free_initmem() in arch/csky/mm/init.c
However, the string “Root device found” seems not to exist in the entire source tree. I must have missed out some other sources when searching. That’s why I asked that.
Hi, do you have anything showing behind Root device found?
Please tell us which Jetson board and the version of L4T you are using, and put the entire boot log here.
I started tracking this issue from start_kernel(). After walking through the kernel initialization related code, finally I found it. That string was actually printed from the script /init which is included in initrd boot archive.