# Yocto Scarthgap does not build for BeagleBone Black

**URL:** <https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009>\
**Category:** General Discussions\
**Tags:** yocto, uboot, scarthgap\
**Created:** [July 10, 2024, 7:33am UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009 "2024-07-10T07:33:09Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 14, 2024, 2:24pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/21 "2024-07-14T14:24:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 15, 2024, 7:40am UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/22 "2024-07-15T07:40:54Z")

</div>

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

> [@drewmoseley](#):
>
> Yes, that does seem to work.

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.

---

<div class="post-metadata">

**Author:** ![SuicidalLabRat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/suicidallabrat/32/311_2.png) [@SuicidalLabRat](https://hub.mender.io/u/SuicidalLabRat)\
**Post date:** [July 15, 2024, 7:52am UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/23 "2024-07-15T07:52:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 15, 2024, 8:04am UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/24 "2024-07-15T08:04:58Z")

</div>

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?

> <https://github.com/mendersoftware/meta-mender-community/pull/389>
>
> The BeagleBone Black can also use the mender-uboot feature instead of mender-gru…b. Add a build configuration to reflect that and autobuild it to catch eventual build failures.
> 
> Changelog: Title
> Ticket: None

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 15, 2024, 12:40pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/25 "2024-07-15T12:40:43Z")

</div>

> [@TheYoctoJester](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 15, 2024, 12:44pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/26 "2024-07-15T12:44:53Z")

</div>

> [@drewmoseley](#):
>
> 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!

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [July 15, 2024, 1:04pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/27 "2024-07-15T13:04:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DJBlom](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/djblom/32/2102_2.png) [@DJBlom](https://hub.mender.io/u/DJBlom)\
**Post date:** [August 27, 2024, 11:53am UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/28 "2024-08-27T11:53:15Z")

</div>

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](https://github.com/mendersoftware/mender-docs/commit/c6121d915920652f420ac39e8e179eedbbf25ccc) 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

---

<div class="post-metadata">

**Author:** ![BenH](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@BenH](https://hub.mender.io/u/BenH)\
**Post date:** [January 6, 2025, 12:58pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/29 "2025-01-06T12:58:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [January 6, 2025, 1:32pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/30 "2025-01-06T13:32:17Z")

</div>

Hi @BenH,

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

```auto
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](https://docs.yoctoproject.org/ref-manual/features.html#image-features)

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![BenH](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@BenH](https://hub.mender.io/u/BenH)\
**Post date:** [January 6, 2025, 3:32pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/31 "2025-01-06T15:32:49Z")

</div>

> [@TheYoctoJester](#):
>
> `" empty-root-password "`

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)

```auto
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

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [January 6, 2025, 4:52pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/32 "2025-01-06T16:52:15Z")

</div>

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 🙂

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`:

```auto
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

---

<div class="post-metadata">

**Author:** ![BenH](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@BenH](https://hub.mender.io/u/BenH)\
**Post date:** [January 6, 2025, 5:06pm UTC](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009/33 "2025-01-06T17:06:41Z")

</div>

" secondary `kas` configurations"  
Nice! Thanks.

[Previous page](https://hub.mender.io/t/yocto-scarthgap-does-not-build-for-beaglebone-black/7009.md?page=1)
