Skip to content

rpi4: restore the firmware device trees the *.dtb rule swallowed - #305

Merged
daniel-rossier merged 1 commit into
mainfrom
fix/rpi4-restore-firmware-dtb
Jul 17, 2026
Merged

rpi4: restore the firmware device trees the *.dtb rule swallowed#305
daniel-rossier merged 1 commit into
mainfrom
fix/rpi4-restore-firmware-dtb

Conversation

@daniel-rossier

@daniel-rossier daniel-rossier commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

build/meta-bsp/recipes-bsp/bsp/rpi4/ ships the Raspberry Pi firmware blobs the BSP copies onto the boot partition — and it used to ship Broadcom's prebuilt bcm27xx device trees with them.

They vanished in 5eddc8b (Migrate SO3 build system to Infrabase), which moved bsp/rpi4 under build/meta-bsp/recipes-bsp/. bootcode.bin, start4.elf and overlays/ made the move; the 11 .dtb did not — .gitignore's *.dtb rule matched them on the way in and git silently never took them:

$ git check-ignore -v build/meta-bsp/recipes-bsp/bsp/rpi4/bcm2711-rpi-4-b.dtb
.gitignore:9:*.dtb	build/meta-bsp/recipes-bsp/bsp/rpi4/bcm2711-rpi-4-b.dtb

$ git ls-files build/meta-bsp/recipes-bsp/bsp/rpi4/ | wc -l
256          # ... and zero .dtb

Why it matters

Nothing has installed a device tree on the boot partition since. Cards flashed before the migration still carry the old ones and boot fine — which is exactly why this went unnoticed for a month. A freshly initialised card gets none: the firmware finds no DT to load, and U-Boot takes its own DT from the firmware (CONFIG_OF_BOARD=y), so it has nothing to work with.

Fix

Restore the 11 files verbatim from 5eddc8bd^ (byte-identical to what the deploy used to install) and un-ignore that one directory.

The *.dtb rule is right for every other .dtb in the tree — those are build products compiled from a .dts. These are vendored inputs to the deploy. Same shape as the /atf and /qemu anchoring fixes already in the file, and the comment follows their style.

Verification

The negation is surgical — generated device trees stay ignored:

$ git check-ignore -v so3/so3/dts/rpi4_64.dtb
.gitignore:9:*.dtb	so3/so3/dts/rpi4_64.dtb      # still ignored
$ git check-ignore -v so3/so3/dts/virt64.dtb
.gitignore:9:*.dtb	so3/so3/dts/virt64.dtb       # still ignored

…and nothing else becomes visible: git status shows exactly the 11 firmware .dtb and .gitignore.

Note

Found while chasing an unrelated rpi4 boot problem: the card under test only booted because it still had device trees written by a pre-migration deploy, which is exactly why nothing had flagged this yet.

bsp/rpi4 ships the Raspberry Pi firmware blobs the BSP copies onto the boot
partition, and it used to ship Broadcom's prebuilt bcm27xx device trees with
them. Those disappeared in 5eddc8b ("Migrate SO3 build system to Infrabase"),
which moved bsp/rpi4 under build/meta-bsp/recipes-bsp/: bootcode.bin, start4.elf
and the overlays made the move, but the .dtb did not — .gitignore's "*.dtb" rule
matched them on the way in and git never took them.

The rule is right for every other .dtb in the tree: those are build products,
compiled from a .dts. These are vendored *inputs* to the deploy, so un-ignore
just that directory — same shape as the /atf and /qemu anchoring fixes already
in the file.

Nothing has installed a device tree on the boot partition since. Cards that were
flashed before the migration still carry the old ones and boot fine, which is
why this went unnoticed; a freshly initialised card gets none, the firmware finds
no DT to load, and U-Boot — which takes its own DT from the firmware
(CONFIG_OF_BOARD=y) — has nothing to work with.

Restored verbatim from 5eddc8b^ and byte-identical to what the deploy used to
install.
@daniel-rossier
daniel-rossier merged commit afa0487 into main Jul 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant