Skip to content

release: fix arm embedded (board) image builds - #643

Merged
laffer1 merged 2 commits into
masterfrom
release-arm-embedded
Nov 11, 2026
Merged

laffer1 merged 2 commits into
masterfrom
release-arm-embedded

Conversation

@laffer1

@laffer1 laffer1 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Two fixes found while building the arm64 board images with release.sh (RPI, PINE64, PINE64-LTS, PINEBOOK, ROCK64, ROCKPRO64) in a fresh 4.2 chroot from master 4430a4c.

release/arm: use mnbsd-ufs for the root partition in MBR images
In the MBR branch of arm_create_disk(), the BSD-label root partition is created with gpart add -t freebsd-ufs. The MidnightBSD bsd scheme rejects that with gpart: Invalid argument, because its FFS alias is mnbsd-ufs. The GPT branch already uses mnbsd-ufs. This affects RPI and the 32-bit GENERICSD and RPI-B images. There are no other freebsd-* partition types left under release/ or in tools/boot/install-boot.sh.

release.sh: do not fail when an embedded port is not installed
Unlike FreeBSD's ports deinstall, mports' deinstall exits non-zero when the package isn't installed. Under set -e, every board build in a fresh chroot therefore stopped before building u-boot. Dropping deinstall altogether breaks re-runs instead, because mport install refuses a package that's already installed. So deinstall now runs as its own step with its status ignored, and install clean distclean follows.

Testing

  • With both changes, release.sh produced all six board images. The RPI image has the MBR/FAT32 boot slice, a BSD label with mnbsd-ufs, the u-boot, firmware and DTB set, and EFI/BOOT/bootaa64.efi.
  • Re-running with u-boot already installed also works.
  • The ports side also needed misc/e2fsprogs-libuuid: fix building as a dependency mports#2891 (e2fsprogs-libuuid failed when built as a dependency of the u-boot ports).

🤖 Generated with Claude Code

Summary by Sourcery

Fix ARM embedded image builds across fresh and repeat release environments.

Bug Fixes:

  • Fix ARM MBR image creation by using the correct MidnightBSD UFS partition type.
  • Allow embedded board image builds to continue when a port is not already installed while preserving successful rebuilds.

laffer1 and others added 2 commits November 11, 2026 15:58
arm_create_disk() creates the root partition of MBR images (RPI,
GENERICSD, RPI-B) inside a BSD label with "gpart add -t freebsd-ufs",
which the MidnightBSD bsd scheme rejects with "Invalid argument"; its
FFS alias is mnbsd-ufs.  The GPT path already uses mnbsd-ufs.

AI-Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Holt <[email protected]>
extra_chroot_setup() builds EMBEDDEDPORTS with "make deinstall install
clean distclean".  Unlike the FreeBSD ports framework, mports'
deinstall exits non-zero when the package is not installed, so under
set -e the first build in a fresh chroot stops before anything is
built.  Dropping deinstall instead breaks re-runs, since mport install
refuses a package that is already installed.

Run deinstall as its own step and ignore its status, then install.

AI-Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Holt <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Use MidnightBSD’s mnbsd-ufs partition type for the MBR image’s BSD-label root partition.

  • release/tools/arm.subr L82

Run embedded-port deinstallation separately and ignore its failure so fresh builds and reruns can both proceed to installation.

  • release/release.sh L311-316

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@laffer1
laffer1 merged commit cb8be71 into master Nov 11, 2026
7 of 10 checks passed
@laffer1
laffer1 deleted the release-arm-embedded branch November 11, 2026 21:44
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