Yocto Scarthgap does not build for BeagleBone Black

If it gets to “Starting kernel …” then UBoot SPL and UBoot have already done their jobs. I don’t think your issue has to do with the UBoot config.
Drew

1 Like

Hi @drewmoseley, concerning the change in the mkfs.ext4 invocation.

Did you need it for an upgrade to scarthgap only, or also for initial flashing? So I can eventually add it to the build configuration.

Truth.
My concern was that I may have pruned something that turns out to be a dependency.

For the record, I have added an example build to meta-mender-community so we can catch it if this occurs again the future (hopefully). Thoughts?

Greets,
Josef

I don’t understand. I needed the mkfs.ext4 change to allow mender-grub based builds to boot properly when using scarthgap. It didn’t have any obvious impact on flashing.

Hi @drewmoseley, okay so you built on scarthgap, and put the image directly on the device, then you saw the problem? Our understanding so far was that it only impacts scenarios where an older GRUB, like from kirkstone, would be required to boot a root filesystem from a scarthgap build. So if you see it also on a freshly flashed board, then we need to change the scope.

Thanks!

Ahh, yes I get it now. Indeed I was simply flashing the sdcard from a scarthgap based build. No OTA updates were involved.

1 Like

Hi @TheYoctoJester,

I am currently upgrading from dunfell to scarthgap my Beaglebone Black device. After a successful build, I load the mender.sdimg using the dd command unto my SD-Card. However, when I boot the board I get the same output as @drewmoseley, but the provided fix for it chore: Document problem with old GRUB and new yocto · mendersoftware/mender-docs@c6121d9 · GitHub does not work for me though. I still get the same output

So my question is, has there been a update that fixes the issue or should I leave mender for now until the issues get solved. I understand that scarthgap is a new branch and there may be a lot to do, and since my work is related to verifying device-tree changes I can do that without mender at the moment, I was just curious if there has been any fixes other than the one provided, which I could try?

Edit:
I thought I would add a snippet of my workflow with the output.

This happens with a default build using the scarthgap branch. These are the steps I followed to build after setting all the layers used to the scarthgap branches.
Steps:
$ source poky/oe-init-build-env build-bbb
$ bitbake-layers add-layer …/meta-openembedded/meta-oe/
$ bitbake-layers add-layer …/meta-openembedded/meta-python/
$ bitbake-layers add-layer …/meta-openembedded/meta-networking/

$ bitbake-layers show-layers

NOTE: Starting bitbake server…
layer path priority

core /home/odin/yocto/poky/meta 5
yocto /home/odin/yocto/poky/meta-poky 5
yoctobsp /home/odin/yocto/poky/meta-yocto-bsp 5
openembedded-layer /home/odin/yocto/meta-openembedded/meta-oe 5
meta-python /home/odin/yocto/meta-openembedded/meta-python 5
networking-layer /home/odin/yocto/meta-openembedded/meta-networking 5

In set MACHINE ?= “beaglebone-yocto” in local.conf

$ bitbake core-image-minimal

Load core-image-minimal-beaglebone-yocto.rootfs-20240827123957.wic to my SD-Card
Plugged the SD-Card in while holding down S2 to boot from the SD-Card

Output after booting:
U-Boot SPL 2024.01 (Jan 08 2024 - 15:37:48 +0000)
Trying to boot from MMC1

U-Boot 2024.01 (Jan 08 2024 - 15:37:48 +0000)

CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
Core: 160 devices, 18 uclasses, devicetree: separate
WDT: Started wdt@44e35000 with servicing every 1000ms (60s timeout)
NAND: 0 MiB
1 OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT… Unable to read “uboot.env” from mmc0:1…
not set. Validating first E-fuse MAC
Net: eth2: ethernet@4a100000using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
, eth3: usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
Extension init…
Found 0 extension board(s).
70112 bytes read in 7 ms (9.6 MiB/s)
70112 bytes read in 8 ms (8.4 MiB/s)
No EFI system partition
No EFI system partition
Failed to persist EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootarm.efi
393216 bytes read in 30 ms (12.5 MiB/s)
Booting /efi\boot\bootarm.efi
Welcome to GRUB!

error: unknown filesystem.

Dropping to grub prompt for unknown reason. Should never get here.
End…

I hope this is helpful.

Kind regards
Dawid J. Blom

Thank you for all the leading work to get this build to work.
I’ve managed to get a beaglebone-uboot build to compile and boot successfully on my BBB.
But I can’t login into to root, a password is required. I thought Yocto by default had no password (as was the case in my earlier builds)?
I could create a new user in local.conf with EXTRA_USERS_PARAMS. But I’d like to know if the root password is expected?

Hi @BenH,

By default root login is disabled. Add this to your build configuration (presumably through local.conf):

EXTRA_IMAGE_FEATURES:append = " empty-root-password "

#and if you also want SSH
EXTRA_IMAGE_FEATURES:append = " allow-empty-password allow-root-login "

See also: 11 Features — The Yocto Project ® 5.1.999 documentation

Greetz,
Josef

Thank you Josef.
I remembered seeing a reference to “debug-tweaks” and added that which worked. But for other noobs walking this way and taking Josefs advice (which I’ve also tested):

If you change local.conf to include EXTRA_IMAGE_FEATURES += "debug-tweaks" it will get overwritten by the
kas build ../kas/beaglebone-uboot.yml command.
So, run kas build ../kas/beaglebone-uboot.yml then open the kas shell which will allow you to run a build without the git downloads:
kas shell ../kas/beaglebone-uboot.yml
add the lines to local.conf
then
bitbake -c build core-image-minimal

When the shell is closed the local.conf settings will disappear again, so they need to be added to the .yml instructions.

To do this go to the local_conf_header: (in beaglebone-uboot.yml or create a new parent)

local_conf_header:
  beaglebone-uboot: |
    MENDER_FEATURES_ENABLE:append = " mender-uboot"
    MENDER_FEATURES_DISABLE:append = "mender-grub"
  blank-pswd: |
    EXTRA_IMAGE_FEATURES += " empty-root-password "

then run the kas build ../beaglebone-uboot.yml

EDIT by @TheYoctoJester: syntax highlighting added

Hi @BenH,

Yeah, “debug-tweak” does still work for the scarthgap release, but it has been removed a while ago because it is often forgotten and left in production. The “empty-root-password” one is still available and therefore I suggested that one, thinking for longer terms :slight_smile:

Thanks for the nice explanation on kas overwriting local.conf. A side note, you can also do this with secondary kas configurations. For example, create the file my-local.yml:

header:
  version: 14

local_conf_header:
  debug: |
    EXTRA_IMAGE_FEATURES:append = " allow-empty-password "

and add it to the kas invocation like this

kas build ../beaglebone-uboot.yml:my-local.yml

Greetz,
Josef

1 Like

" secondary kas configurations"
Nice! Thanks.