Kernel panic - not syncing: No init found. Try passing init= option to kernel.

Started by yusa, April 04, 2015, 11:29:11 AM

Previous topic - Next topic

yusa


Hi,

I'm using the iMX233-Olinuxino-NANO Board.

I was trying the sd_mmc_bootstream.raw kernel image provided here:
https://github.com/koliqi/imx23-olinuxino

Also i used the pre-build debian rootfs provided here:
https://www.olimex.com/Products/OLinuXino/iMX233/_resources/DEBIAN-BUILD.txt

Put both at SD card, similar to numerous How-To's at the internet.

Then kernel stops with following lines:


[    1.370000] mmc0: host does not support reading read-only switch. assuming write-enable.
[    1.380000] stmp3xxx-rtc 8005c000.rtc: setting system clock to 1970-01-01 00:00:05 UTC (5)
[    1.410000] mmc0: new high speed SDHC card at address 8a89
[    1.420000] ALSA device list:
[    1.420000]   No soundcards found.
[    1.430000] mmcblk0: mmc0:8a89 SU16G 14.8 GiB
�[    1.450000]  mmcblk0: p1 p2
[    1.480000] kjournald starting.  Commit interval 5 seconds
[    1.490000] EXT3-fs (mmcblk0p2): using internal journal
[    1.500000] EXT3-fs (mmcblk0p2): recovery complete
[    1.500000] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    1.510000] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    1.520000] Freeing init memory: 140K
[    1.530000] Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    1.530000] [<c00151ac>] (unwind_backtrace+0x0/0xf4) from [<c044094c>] (panic+0x98/0x204)
[    1.530000] [<c044094c>] (panic+0x98/0x204) from [<c0439a6c>] (kernel_init+0x234/0x298)
[    1.530000] [<c0439a6c>] (kernel_init+0x234/0x298) from [<c000f2c8>] (ret_from_fork+0x14/0x2c)


fs is mounted correctly? So, why he is not able to find init?

Any suggestions?

Maybe someone is able to recommend a other rootfs,
which is more compatible to the upper kernel?

Regards

Julian


lambda

Yes, looks like some ext3 filesystem is mounted correctly.

Before we start wild speculation: Where on your filesystem
is your init programm actually?

HTH,
Harald

yusa

Hi lambda,

thanks for fast reply.

I would think we use /sbin/init, as nothing else is noticed in kernel command line.

Am I correct?

Do I need a customized init process?

Regards

Julian

JohnS

Looks like you mix kernel 2.6 and 3.7.  Won't work.

Pick one or the other :)

John

yusa


Mh, I'm still kind of newbie to embedded linux.

Where do I get a appropriate rootfs for the 3.7 kernel image?   :-\
Can I build it by my own?

Does not have to be a debian, just one.  ;D

Julian

JohnS

There are links on the product page, wiki and so on, including how to build.  There are more if you google, such as openwrt

I don't have a Nano board but some/all will work.

John


lambda

Quote from: yusa on April 04, 2015, 04:21:02 PM
Where do I get a appropriate rootfs for the 3.7 kernel image?   :-\
Can I build it by my own?

Yes, if you want to.
Maybe debootstrap is helpful for that. (for debian)

Quote
Does not have to be a debian, just one.  ;D

How about OpenWRT:
kernel 3.18
u-boot suppport (to play with kernel command lines, etc.)
somewhat less packages available than in debian but still plenty

http://downloads.openwrt.org/snapshots/trunk/mxs/generic/

HTH,
Harald

JohnS

This Debian 3.11 may work on a Nano but it will moan about Ethernet/Wifi missing:
https://docs.google.com/file/d/0B-bAEPML8fwlUDRJajU2TkVxWVE/edit?usp=sharing
(is file imx233_debian_3_11_wifi_RTL8188_AX8877_LAN9512_GPIO_2G_preliminary.rar so it's for the MAXI board really)

Something more work:
http://g-lab.ca/building-a-kernel-3-12-rc2-for-the-imx23-olinuxino/

John

yusa

Hello guys,

thank you for your suggestions. I had a look at OpenWRT, which
is a very interesting project.

But for now I had tried the following tutorial,
to get my system working, because there is also a rootfs provided:
http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html

I have build the zImage and joined zImage and imx23-olinuxino.dtb into a new file zImage_dtb.
All worked fine till this point.

But then I have to build the Bootlets with:

[chris@thinkpad imx-bootlets-src-10.05.02]$ make CROSS_COMPILE=arm-none-eabi-
...
generating linux kernel boot stream image
by using the pre-built kernel
elftosb2 -d -z -c ./linux_prebuilt.db -o imx23_linux.sb
make: elftosb2: command not found
Makefile:32: recipe for target 'gen_bootstream' failed
make: *** [gen_bootstream] Error 127


But when I use the which command it is found.
julian@julian-Samsung:~/GIT/imx23-olinuxino/boot/imx-bootlets-src-10.05.02$ which elftosb2
/usr/sbin/elftosb2

What could be the reason? Its frustrating  >:(

Mhhh, any suggestions? ;)

Best Regards

Julian

lambda

Quote from: yusa on April 04, 2015, 11:54:40 PM
But for now I had tried the following tutorial,
to get my system working, because there is also a rootfs provided:
http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html

Hm, OpenWRT used to provide a rootfs too. I see it is missing from todays snapshot.
Probably that's a bug in the build robots or something ...

However it shouldn't be hard to build OpenWRT yourself until this is fixed.

Quote
But then I have to build the Bootlets with:

[chris@thinkpad imx-bootlets-src-10.05.02]$ make CROSS_COMPILE=arm-none-eabi-
...
generating linux kernel boot stream image
by using the pre-built kernel
elftosb2 -d -z -c ./linux_prebuilt.db -o imx23_linux.sb
make: elftosb2: command not found
Makefile:32: recipe for target 'gen_bootstream' failed
make: *** [gen_bootstream] Error 127


But when I use the which command it is found.
julian@julian-Samsung:~/GIT/imx23-olinuxino/boot/imx-bootlets-src-10.05.02$ which elftosb2
/usr/sbin/elftosb2

What could be the reason? Its frustrating  >:(

Probably the Makefile is messing with $PATH and make is only looking in /usr/bin but not
/usr/sbin ... Why is elftosb2 installed to /usr/sbin anyway?

If this doesn't help you, you can always run the command manually. After all you now know
what it is supposed to be.

HTH,
Harald

lambda

Hi,

I wrote:
Quote from: lambda on April 05, 2015, 10:56:06 AM
Hm, OpenWRT used to provide a rootfs too. I see it is missing from todays snapshot.
Probably that's a bug in the build robots or something ...

Actually found the problem already:
https://patchwork.ozlabs.org/patch/458244/

For testing the patch I recompiled a subset of OpenWRT. A current rootfs is
available here (for the next few days till I do some other work):
http://friends.ccbib.org/lambda/mxs/

HTH,
Harald

yusa

Hi guys,

thank you for the additional information about openWRT.

Solved my last problem above by selfcompiling the elftosb2 executable.
The pre-compiled program maybe was for 32-bit architecture.

By solving this problem, i actually ran directly into the next:


root@julian-Samsung:/home/julian/GIT/imx23-olinuxino/boot/imx-bootlets-src-10.05.02# make CROSS_COMPILE=arm-none-eabi-

...

generating linux kernel boot stream image
by using the pre-built kernel
elftosb2 -z -c ./linux_prebuilt.db -o imx23_linux.sb
generating U-Boot boot stream image
elftosb2 -z -c ./uboot_prebuilt.db -o imx23_uboot.sb
error: line 29: error opening source 'u_boot'
Makefile:26: recipe for target 'gen_bootstream' failed
make: *** [gen_bootstream] Error 1


line 29 in uboot_prebuilt.db searches for a file called
u-boot in the same folder. But I don't have such
a file? Somebody knows, why this file is not present there?

Regards

Julian


lambda


yusa

Hello,

the tutorial was somehow outdated, in a newer GIT version there
were changes made to the Makefile.

Using GIT version 3.13-rc4, I was able to build the kernel.
git clone -b 3.13-rc4  https://github.com/koliqi/imx23-olinuxino

Had also successfully booted to the olimex arch linux now.  :D

But, now I have to set up WIFI connection without network connection,
because i'm on the NANO (No Ethernet interface).

First problem occured, as I tried to find my hardware:


[root@alarm ~]# lsusb
unable to initialize libusb: -99


Mh, something seems to be strange. I used the rootfs provided here:
http://archlinuxarm.org/platforms/armv5/olinuxino

I added no additional modules to the rootfs, maybe this is the problem.
I will figure this out, but eastern is over.. ;)

Best Regards

Julian



BTW, this is my USB WIFI chip:

Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter