Beaglebone image with new kernel does not boot after mender-convert

Hello everyone,

I am currently struggeling with mender-convert on a beaglebone green wireless (which is mostly identical to a beaglebone black)

When I use the stock image bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz and convert it with mender-convert everything works as expected.

Then I installed a newer kernel with the script provided in the original image:

debian@beaglebone:/opt/scripts$ git pull
debian@beaglebone:/opt/scripts$ sudo tools/update_kernel.sh --lts-5_10

The update works flawless and the device is still bootable and correctly boots using the new kernel.

Afterwards I get an image of the sd card and use it with mender-convert. I flash the resulting *.img file to another sd card and try to boot my BB from that SD card there are two scenarios:

Scenario 1: Don’t push the boot button on the Board.
In that case the Boot process fails and runs in an infinte loop:

resetting ...

U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **


U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Global external warm reset has occurred.
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
Model: SeeedStudio BeagleBone Green Wireless:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[GW1A] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
91572 bytes read in 14 ms (6.2 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
Scanning disks on usb...
Disk usb0 not ready
Disk usb1 not ready
Disk usb2 not ready
Disk usb3 not ready
Scanning disks on mmc...
MMC Device 2 not found
MMC Device 3 not found
Found 7 disks
BootOrder not defined
393216 bytes read in 36 ms (10.4 MiB/s)
## Starting EFI application at 82000000 ...
Welcome to GRUB!



EFI stub: Entering in SVC mode with MMU enabled
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
data abort
pc : [<9ff591e0>]          lr : [<9ff59215>]
reloc pc : [<808011e0>]    lr : [<80801215>]
sp : 9df36d6c  ip : 1f758000     fp : 00000000
r10: 9ff5a000  r9 : 9df37eb8     r8 : 00000000
r7 : 9ff59460  r6 : 9ff59414     r5 : 000000ad  r4 : 20069460
r3 : 00000000  r2 : 00000050     r1 : 9ff59410  r0 : abb1aaad
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32
Code: 2010ea83 bdf0d1f5 5b04f856 b2c54068 (5025f854)
UEFI image [0x9cecb000:0x9cf2afff] '/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/USB(0x6,0x0)/HD(1,MBR,0xd8cfe478,0x800000000000,0x0)/efi\boot\bootarm.efi'
UEFI image [0x9361c000:0x9402ffff]
Resetting CPU ...

resetting ...
[loops from here]

Scenario 2: I press the boot button on the Board.

The boot processes halts and waits forever after.

U-Boot SPL 2020.07 (Sep 21 2020 - 11:06:32 +0200)
WDT:   Not found!
Trying to boot from MMC1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Loading Environment from MMC... mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update
*** Warning - MMC init failed, using default environment



U-Boot 2020.07 (Sep 21 2020 - 11:06:32 +0200)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Loading Environment from MMC... *** Warning - bad CRC, using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is               de:ad:be:ef:00:01
Address in environment is       3c:e4:b0:5d:8d:3d
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
91572 bytes read in 12 ms (7.3 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
Scanning disk mmc@48060000.blk...
Scanning disk mmc@481d8000.blk...
Found 7 disks
BootOrder not defined
EFI boot manager: Cannot load any image
393216 bytes read in 32 ms (11.7 MiB/s)
Welcome to GRUB!


linux /boot/kernel root=/dev/mmcblk0p2 console=tty0,115200n8 console=ttyS0,115200n8 console=ttyO0,115200n8 console=ttyAMA0,115200n8 rootwait
linux booted
initrd /boot/initrd
initrd done
continue boot

EFI stub: Entering in SVC mode with MMU enabled
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...

[Waits here and never continues...]

Please note, that there is absolutely no issue when NOT updating the kernel. But since the “non-mender” image runs with a newer kernel flawless I am wondering where things go wrong.

I have seen this topic with a similar problem, but it was abandonned without a solution.

Does anyone have an idea of what’s happening, or give me some pointers in the right direction how to track down the issue?

Any ideas are appreciated.