I want to boot my imx53-qsb board using not a normal rootfs but a statically compiled hello_world.c file in other words a hello_world_static.out. To achieve that, I wrote a hello_world.c file cross compiled it statically and I put it in my mmcblk0p1 ext4 partition of my sd card. I put my uImage and my u-boot.imx in the mmcblk0. After booting my system I got a kernel panic :
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Any solution ? Thanks
You should provide
init=
param to kernel cmdline (from u-boot). For example, if your binary file name isinit
and you have put it to/sbin
directory (on your rootfs partition), you should addinit=/sbin/init
to your kernel cmdline in u-boot (inbootargs
variable).For example you can do next (in u-boot shell, before running
bootm
orbooti
command):Also, check if you really have your rootfs on
mmcblk0p1
. Usuallymmcblk0p1
is FAT32 partition which contains bootloader files and images to copy to RAM. Rootfs is usually located onmmcblk0p2
(and formatted as ext4).For details see:
[1] Documentation/kernel-parameters.txt (look for
init=
param)[2] u-boot README file (look for
Boot Linux:
line)[3] Documentation/init.txt