BBB 3.17.0-rc7-bone4 kernel woes

Hello all,

I am trying to get a kernel built and placed on my BBB so that I can proceed to make some necessary kernel changes. However, I have been having a terrible time getting it booting. Most recently, I was trying Robert Nelson’s 3.17-rc7-bone4 release, and got the following output on boot:

Starting kernel …

[ 2.119060] Error: Driver ‘tfp410’ is already registered, aborting…
[ 2.126194] slave hdmi: could not get i2c
[ 2.263612] omap_voltage_late_init: Voltage driver support not added
[ 2.270383] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[ 2.278926] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[ 2.508136] sr_init: platform driver register failed for SR

Here is what I did:

$ git clone https://github.com/RobertCNelson/bb-kernel.git
$ cd bb-kernel
$ ./build_kernel.sh

copy deploy/config-3.17.0-rc7-bone4 to BBB’s /boot/
copy deploy/3.17.0-rc7-bone4.zImage to BBB’s /boot/vmlinuz-3.17.0-rc7-bone4
extract deploy/3.17.0-rc7-bone4-modules.tar.gz to BBB’s /
extract deploy/3.17.0-rc7-bone4-firmware.tar.gz to BBB’s /lib/firmware/
extract deploy/3.17.0-rc7-bone4-dtbs.tar.gz to BBB’s /boot/dts/3.17.0-rc7-bone4/

I also tried using ./tools/install_kernel.sh to install to microSD card, and got a little bit further when booting, but ended with a kernel panic:

[ 4.054149] Freeing unused kernel memory: 452K (c093e000 - c09af000)
grep: /proc/cmdline: No such file or directory
[ 4.347008] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[ 4.347008]
[ 4.361479] CPU: 0 PID: 1 Comm: init-eMMC-flash Not tainted 3.17.0-rc7-bone4 #1
[ 4.371643] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[ 4.382262] [] (show_stack) from [] (panic+0x6d/0x180)
[ 4.391975] [] (panic) from [] (complete_and_exit+0x1/0x18)
[ 4.402159] [] (complete_and_exit) from [] (__set_current_blocked+0x1d/0x)
[ 4.413974] [] (__set_current_blocked) from [] (0xde085a30)
[ 4.424244] drm_kms_helper: panic occurred, switching back to text console
[ 4.434116] —[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[ 4.434116]
[ 50.324545] random: nonblocking pool is initialized

Full log of that here: http://pastebin.com/pvzC0UnM

Any advice appreciated!

Thanks,
Chris

Everything looks mostly correct, I’m assuming you’re following Robert’s DebianOnARM guide ?

3 things do come to mind, first one was possibly you’re using the wrong device tree board file, but i see that step was taken above.

Second thing that comes to mind is that you missed part of the steps in Roberts guide. What exactly I’m still thinking on . …

last thing is that perhaps Robert has made some changes that introduced some flaws into the kernel build process. It’s happened before( we all make mistakes ).

But yeah Robert will probably come on and tell you x.y.z and it will be fixed . . .

can you bisect? rc6 booted fine, i'm currently on the road and won't
be back in the lab till saturday.

Regards,

Hello Robert,

Thanks for offering your assistance. After much recompiling, re-flashing, etc. I realized the solutions to my two original problems:

Problem 1 (hang when booting after flashing and adding compiled kernel) seems to have been caused by not having the right cmdline setting in uEnv.txt, or simply not waiting long enough for it to boot. I have changed the cmdline line from

cmdline=silent init=/lib/systemd/systemd

to

cmdline=console=ttyO0,115200n8 init=/lib/systemd/systemd

and everything now seems to work when booting from eMMC (mostly…see below).

Problem 2 (panic when booting from MMC) seems to have been caused by using ./tools/install_kernel.sh on a flasher MMC as opposed to a boot one. This seems to have led to the error about /proc/cmdline.

In short, there is nothing wrong AFAICT with 3.17.0-rc7-bone4…simply user error :slight_smile:
sss

The one problem I am facing now is that the kernel is “Waiting for root device /dev/mmcblk1p1” when I boot, when I instead want to boot from eMMC. As soon as I insert the MMC into the slot, everything works. I assume there is just something in menuconfig I need to change to tell it to boot from eMMC, but any guidance in this area would be greatly appreciated.

Thanks for the help and for all the work you’ve done to make Linux work great on the BBB.

  • Chris

Hello Robert,

Thanks for offering your assistance. After much recompiling, re-flashing,
etc. I realized the solutions to my two original problems:

Problem 1 (hang when booting after flashing and adding compiled kernel)
seems to have been caused by not having the right cmdline setting in
uEnv.txt, or simply not waiting long enough for it to boot. I have changed
the cmdline line from

cmdline=silent init=/lib/systemd/systemd

to

cmdline=console=ttyO0,115200n8 init=/lib/systemd/systemd

and everything now seems to work when booting from eMMC (mostly...see
below).

console=ttyO0,115200n8 is already passed..

"silent" is invalid:
https://www.kernel.org/doc/Documentation/kernel-parameters.txt

Problem 2 (panic when booting from MMC) seems to have been caused by using
./tools/install_kernel.sh on a flasher MMC as opposed to a boot one. This
seems to have led to the error about /proc/cmdline.

In short, there is nothing wrong AFAICT with 3.17.0-rc7-bone4...simply user
error :slight_smile:
sss

The one problem I am facing now is that the kernel is "Waiting for root
device /dev/mmcblk1p1" when I boot, when I instead want to boot from eMMC.
As soon as I insert the MMC into the slot, everything works. I assume there
is just something in menuconfig I need to change to tell it to boot from
eMMC, but any guidance in this area would be greatly appreciated.

In u-boot, we can't script the detect of the microSD, so it's always a
"guess" what partition name we need to pass to the kernel.

Using uuid's solve this.. However they need to be generated on target:

sudo update-initramfs -ck `uname -r`

u-boot is setup to find this initrd.img and use it when it's available.

The "install_kernel.sh" is unable to create his file, as most often
it's ran on another system. When you install by a pre-built
linux-image-*.deb file, the initrd.img is auto-generated.

Regards,

console=ttyO0,115200n8 is already passed..

"silent" is invalid:
https://www.kernel.org/doc/Documentation/kernel-parameters.txt

Sorry, I meant "quiet"

In u-boot, we can't script the detect of the microSD, so it's always a
"guess" what partition name we need to pass to the kernel.

Using uuid's solve this.. However they need to be generated on target:

sudo update-initramfs -ck `uname -r`

u-boot is setup to find this initrd.img and use it when it's available.

The "install_kernel.sh" is unable to create his file, as most often
it's ran on another system. When you install by a pre-built
linux-image-*.deb file, the initrd.img is auto-generated.

Ahh, this worked perfectly! chrooted into eMMC, updated initramfs, and now
all is well in the world. Thank you for your help!

- Chris

Hello,
what do you mean with “chrooted into eMMC”?

I did nearly the same as described above.
Downloaded the debian 7.6 eMMC Flasher Image
Build a 3.17.1-bone4 kernel and copied it to SDcard with install-kernel.sh
commented out the init-eMMC-flasher-v2.sh in uEnv.txt and system is booting from SDcard
I logged in with SSH, uname-r showed 3.17.1-bone4, so the kernel works.
cd /boot and update-initramfs -c -k uname -r
The file initrd.img-3.17.1-bone4 is now in the SDcard /boot folder
Now I activated init-eMMC-flasher-v2.sh again and when rebooting I got a kernel panic.

When I change uname_r to the default from the flasher image it is flashing, so I think
the file system is correct.

Thanks maddin1234

Hello,

On booting from the eMMC, I was having a problem whereby the kernel was waiting for a root device (see previous message). I could continue booting by inserting the MMC containing a rootfs, but this was not a very good fix as it was only temporary and I was not in the eMMC environment. Per Robert’s suggestion, I ran update-initramfs to fix the problem. However, I first needed to chroot into the eMMC environment so that I would be updating that rootfs, instead of the MMC’s. Hopefully that explains the chroot part.

Is there a reason you are not using the MMC boot image if you are planning on booting from MMC? That is what I needed to do to get MMC boot working.

Also, can you provide any more info on the kernel panic?

  • Chris

Hello,
thanks for the quick answer,
what I would like to do is, building a custom kernel on the linux PC, copy it to a SD card
and then copy it to the beaglebone with the eMMC-Flasher.
I would like to use the micro SD as an additional storage device when the kernel is running
from the eMMC.
I know that there are other way to get the kernel to the eMMC but the eMMC-flasher
was the first way that I programmed my beaglebone and for my ego I somehow have
to find a way to make my own eMMC-Flasher Image :wink:

Yesterday evening, I didn’t find a way to post the information from the kernel panic.
I do not have a serial console at the moment and in /var/log/ I didn’t find the
information that was needed.

When I found out how to get these log informations, I will post.

Greetings

maddin1234