Cannot start kernel after update_kernel.sh --bone-kernel --stable

My second and brand new Beaglebone Black was flashed to eMMC and worked fine with
BBB-eMMC-flasher-ubuntu-16.04.2-console-armhf-2017-07-14-2gb.img

following the excellent instructions of

http://derekmolloy.ie/write-a-new-image-to-the-beaglebone-black/#prettyPhoto

Next installed: sudo apt install linux-headers-3.8.13-bone86

because we have a driver that needs those 3.8.13 headers.


We have a script that calls update_kernel.sh --bone-kernel --stable

Afterwards the reboot will not start the kernel. My first board used 3.8.13-bone84 alright but is running from microSD not eMMC.

What is causing kernel start failure and how to fix it? Should I just replace the uname -r in the driver Makefile with explicit 3.8.13-bone86 ???

Console output for second Beaglebone Black has:

Running uname_boot …

loading /boot/vmlinuz-3.8.13-bone86 …

5594568 bytes read in 373 ms (14.3 MiB/s)

uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] …

loading /boot/dtbs/3.8.13-bone86/am335x-boneblack.dtb …

26118 bytes read in 31 ms (822.3 KiB/s)

uboot_overlays: [fdt_buffer=0x60000] …

uboot_overlays: loading /lib/firmware/AM335X-20-00A0.dtbo …

378 bytes read in 340 ms (1000 Bytes/s)

fdt_overlay_apply(): FDT_ERR_NOTFOUND

uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo …

1105 bytes read in 238 ms (3.9 KiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

fdt_overlay_apply(): FDT_ERR_BADMAGIC

uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo …

4169 bytes read in 134 ms (30.3 KiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

fdt_overlay_apply(): FDT_ERR_BADMAGIC

uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo …

695 bytes read in 350 ms (1000 Bytes/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

fdt_overlay_apply(): FDT_ERR_BADMAGIC

uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo …

2402 bytes read in 130 ms (17.6 KiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

fdt_overlay_apply(): FDT_ERR_BADMAGIC

uboot_overlays: loading /lib/firmware/univ-bbb-EVA-00A0.dtbo …

54858 bytes read in 209 ms (255.9 KiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

fdt_overlay_apply(): FDT_ERR_BADMAGIC

loading /boot/initrd.img-3.8.13-bone86 …

4705709 bytes read in 320 ms (14 MiB/s)

debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet cape_universal=enable] …

debug: [bootz 0x82000000 0x88080000:47cdad 88000000] …

ERROR: Did not find a cmdline Flattened Device Tree

Could not find a valid device tree

and finally is stuck at boot prompt,

Config file not found

starting USB…

USB0: Port not available.

link up on port 0, speed 100, full duplex

BOOTP broadcast 1

DHCP client bound to address 10.150.100.52 (37 ms)

Using cpsw device

TFTP from server 0.0.0.0; our IP address is 10.150.100.52; sending through gateway 10.150.100.1

Filename ‘boot.scr.uimg’.

Load address: 0x80000000

Loading: T T T T T T T T T T T T T T T T T T T T

Retry count exceeded; starting again

link up on port 0, speed 100, full duplex

BOOTP broadcast 1

DHCP client bound to address 10.150.100.52 (40 ms)

Using cpsw device

TFTP from server 0.0.0.0; our IP address is 10.150.100.52; sending through gateway 10.150.100.1

Filename ‘boot.scr.uimg’.

Load address: 0x82000000

Loading: T T T T T T T T T T T T T T T T T T T T

Retry count exceeded; starting again

=>

Would really enjoy running from eMMC rather than microSD. While waiting for reply, I will try changing the driver Makefile to explicitly plug in 3.8.13-bone86, which means I have to reflash since otherwise I am stuck at boot prompt.

Well to run 3.8.13, you need to disable u-boot overlays in /boot/uEvn.txt (master enable)

Regards,

Yeah, we dropped using uuid in v4.4.x+ as it broke and we fixed the mmc kernel names.

3.8.13 needs it, see the uuid var in /boot/uENv.txt

Regards,

Yay ! Use the mount command to see the /dev/mmcblk1p1 is the root filesystem.
lsblk -no UUID /dev/mmcblk1p1

gives the UUID which can be entered into /boot/uEnv.txt
and also comment out enable_boot_overlays=1
#enable_uboot_overlays=1

Now our driver can be compiled against the 3.8.13 headers, hurray.

arm login: ubuntu
Password:
Last login: Fri Jul 14 14:48:35 UTC 2017 on ttyS0
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 3.8.13-bone86 armv7l)