Custom-built kernel hanging at init scripts in BeagleBoard C4

Hi all,

I’m having trouble with a custom kernel. Could someone please lend me a hand?

Previously, I used a stock kernel (2.6.34-rc3) from LiquidWare, and a custom filesystem from Narcissus. Angstrom booted and ran fine.

I then built a new kernel (3.0.23+) via OpenEmbedded, with a 1-line patch to enable I2C-2 (https://groups.google.com/d/topic/beagleboard/qnqvPVd5SYc/discussion). I used the default configuration (i.e. I didn’t touch menuconfig at all). I extracted the contents of the kernel module package into /lib/modules/ and /lib/firmware/ of my existing filesystem, replaced my SD card’s uImage, updated U-Boot to call ttyO2 instead of ttyS2, and rebooted.

The kernel loads, but the init scripts don’t seem to:

Digging around some more, I replaced /sbin/init.sysvinit with a Hello World program, and the system printed “Hello World!” instead of "INIT: " after “Freeing init memory”. So, as far as I can tell, the kernel managed to call /sbin/init.sysvinit, i.e. we’ve entered user space… but /sbin/init.sysvinit isn’t able to do its job of running init scripts and spawning other processes.

Since I didn’t touch my rootfs when I upgraded, that must mean there’s something wrong in the kernel. Does the init program require certain kernel features to function? Or do I need to rebuild init to match the kernel (like how MLO and U-Boot need to be matched)?

JKSH

Did you tell init to use ttyO2? If you're using an old filesystem image
(which I assume, since it still used ttyS*), you're probably looking for
/etc/inittab.

Alan.

Hi JKSH,

i think that we have both the same problem: i’ve created this discussion https://groups.google.com/forum/?fromgroups#!topic/beagleboard/uMbJrJSzw9M before reading to yours. i don’t think that the kernel is wrong, but that there’s some kind of issue with the console: it seems that the beagleboard is speaking ‘somewhere else’… if there was any problem (like a kernel panic or so), it would be logical to have a message on the minicom (i use this tool for serial port communications). In my case it mutes when i load the initramfs filesystem (and i configured it to stop at that moment, not lo load the rootfs filesystem), so i think that i have a problem configuring the console where the beagleboard has to speak to…

Do you think this is similar to what’s happening to you?? If you have any idea of what’s going on here, any comment would be very appreciated.

Thanks!

Natxo

Did you tell init to use ttyO2? If you're using an old filesystem image
(which I assume, since it still used ttyS*), you're probably looking for
/etc/inittab.

(I sent this mail last night and it never showed up in the archives or
back to me. My apologies if you end up getting it twice).

Alan.

I got an email from Alan; his posts to the mailing list seem to be getting rejected:

Did you tell init to use ttyO2? If you’re using an old filesystem image
(which I assume, since it still used ttyS*), you’re probably looking for
/etc/inittab.

(I sent this mail last night and it never showed up in the archives or
back to me. My apologies if you end up getting it twice).

Alan.

Anyway, thanks Alan; I didn’t realize ttyO2 was used in two places. That helped me see that I could be facing TWO issues: (i) init is not running, and (ii) BeagleTouch is not working (https://groups.google.com/forum/?fromgroups#!topic/beagleboard/bhECSHUX4MY).

With the pre-built kernel from http://www.angstrom-distribution.org/demo/beagleboard/, if i didn’t modify /etc/inittab, I CAN still the output messagse from my init scripts and my startup applications; I just can’t interact with the BeagleBoard’s shell. Modifying /etc/inittab lets me use the shell.

However, with my custom kernel, even if I modify /etc/inittab, I don’t see any init script/application messages, and I can’t use the shell. So, I’m not convinced that my problem is from a mis-configured console, but Naxto is right: if it’s not init-ing, then there should be a kernel panic.

Naxto, I read your thread and I think we could have the same issue; both our systems go silent when trying to run /sbin/init, but there’s no kernel panic. I have no idea how we might fix it though…! But try Alan’s suggestion first, and see if that helps you.

Regards,
JKSH

I'm having trouble with a custom kernel. Could someone please lend me a
hand?

Previously, I used a stock kernel (2.6.34-rc3) from LiquidWare, and a
custom filesystem from Narcissus. Angstrom booted and ran fine.

I then built a new kernel (3.0.23+) via OpenEmbedded, with a 1-line

[...]

The kernel loads, but the init scripts don't seem to:

Has the system been build against the old 2.6.34 kernel headers?

IIRC there was some issue with old udev systems and newer kernels that requires you to build udev with kernel headers for 2.6.37 or newer, or older udevs not working with recent kernels...

Try booting into /bin/sh and run the init scripts manually to see where it hangs. Try booting with udev disabled.

Thanks for the lead. I got the packages directly through http://narcissus.angstrom-distribution.org/ and later through opkg, so I’m not sure which kernel headers have been used. Maybe I’ll try building udev manually.

I won’t have access to my BeagleBoard until Tuesday, but I have some clarification questions:

How do I boot into /bin/sh? Can I just hijack /sbin/init and make it point to /bin/sh?
How do I disable udev? Do I just remove (after backing up) the relevant init script(s)?

Thanks,
JKSH