Skip to content

build: host-tar without POSIX ACLs; sigmastar infinity6c: the split NOR image on the 8 MB lite boards - #2910

Merged
widgetii merged 3 commits into
masterfrom
host-tar-without-posix-acls
Nov 19, 2026
Merged

widgetii merged 3 commits into
masterfrom
host-tar-without-posix-acls

Conversation

@widgetii

@widgetii widgetii commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Two changes. CI on the first one surfaced the second.

1. host-tar without POSIX ACLs, which acl 2.4.0 headers break

On a build host with acl 2.4.0, every build from a fresh output directory stops at host-tar, before any target code:

xattrs.c:61:14: error: conflicting types for 'acl_get_file_at'; have 'struct __acl_ext *(int,  const char *, acl_type_t)'
/usr/include/sys/acl.h:120:14: note: previous declaration of 'acl_get_file_at' with type 'struct __acl_ext *(int,  const char *, int,  acl_type_t)'

acl 2.4.0 added acl_get_file_at(), acl_set_file_at() and acl_delete_def_file_at(), each with an at_flags argument. tar 1.34's src/xattrs.c defines static wrappers with the same names and different types. host-tar's configure finds the host's libacl by itself, since Buildroot passes it only --without-selinux. Trees whose host-tar was built before the acl upgrade keep working, which hides the problem.

The change: prepare: adds HOST_TAR_CONF_OPTS += --without-posix-acls to the extracted Buildroot's tar.mk as its own line, ahead of the host package's eval, then checks that it landed and fails prepare with a message naming tar.mk if not. This follows the review: the first version replaced exact text and could have silently done nothing after a Buildroot bump.

  • The wrappers are compiled only under HAVE_POSIX_ACLS.
  • The target tar is already built that way unless BR2_PACKAGE_ACL is set.
  • The host tar only packs archives.

A tempting workaround is exporting ac_cv_header_sys_acl_h=no around make. Don't use it: it reaches every package's configure, and host-fakeroot then fails with unknown type name 'acl_t'.

Tested: Arch, acl 2.4.0, GCC 16.2.1.

  • From an empty output directory, make BOARD=gk7205v300_lite br-host-tar failed before and now builds tar 1.34 with config.h USE_ACL 0.
  • A second prepare adds nothing.
  • A tar.mk without the eval line stops prepare with the message.
  • Full gk7205v300_ultimate and ssc377_lite builds pass.

2. sigmastar infinity6c: the split NOR image on the 8 MB lite boards

CI on this PR stopped ssc377, ssc377d, ssc377de, ssc377qe and ssc378qe lite with "size exceeded by: 4KB". A local ssc377_lite build reports uImage 1992KB/1983KB, rootfs.squashfs 5124KB/5120KB outgrew the fixed slot. infinity6 and infinity6b0 moved to the split layout in #2814; infinity6c follows, as they did.

  • Kernel config: CONFIG_MTD_SPLIT_LAYOUT=y in infinity6c-ssc027a/ssc027d.config. The kernel side is infinity6c: the split NOR layout, without device tree partitions linux#266, merged into sigmastar-infinity6c. It's infinity6's no-device-tree split layout on 5.10, in this family's NOR driver.
  • Defconfigs: the six infinity6c lite defconfigs get post-image-split.sh and BR2_OPENIPC_NOR_FIXED_PACKAGE, so the fixed-slot package is still made while it fits and the split one always.
  • image.yml: their NOR boot area: 256K boot, 64K env, U-Boot reading 2 MiB from 0x50000, as on infinity6.

Tested in qemu-bench, -M ssc377, on a NOR image put together as create_split does: u-boot-ssc377-nor.bin at 0, firmware.bin at 320K, env erased.

  • The published U-Boot boots it from its default environment.
  • The kernel finds kernel 0x50000-0x250000, rootfs 0x250000-0x760000 and rootfs_data from 0x760000. It ignores U-Boot's root=/dev/mtdblock3 and fixed mtdparts, mounts the squashfs, and reaches the login prompt with majestic started.
  • Afterwards the flash holds the jffs2 overlay in rootfs_data and the first boot's sensor= in the env. A second boot keeps both.

There's no infinity6c board in the lab, so none of this has run on hardware.

host-tar's configure picks up the build host's libacl by itself. acl 2.4.0
adds acl_get_file_at(), acl_set_file_at() and acl_delete_def_file_at() to
<sys/acl.h>, each with an at_flags argument, and tar 1.34's src/xattrs.c
defines static wrappers of the same names with other types:

  xattrs.c:61:14: error: conflicting types for 'acl_get_file_at'

So on a host with the new acl, every build from a fresh output directory
stops at host-tar, before any target code. Trees whose host-tar was built
earlier keep working, which hides it.

prepare: now adds --without-posix-acls to HOST_TAR_CONF_OPTS, alongside the
edits it already makes to the extracted Buildroot for host toolchains. The
wrappers are compiled only under HAVE_POSIX_ACLS. Buildroot already builds
the target tar that way unless BR2_PACKAGE_ACL is set, and the host tar only
packs archives here. Upstream Buildroot's tar.mk still passes only
--without-selinux to the host build.

Checked on Arch with acl 2.4.0 and GCC 16.2.1: from an empty output
directory, `make BOARD=gk7205v300_lite br-host-tar` now builds and installs
tar 1.34 (config.h USE_ACL 0) and failed before. A second prepare leaves
tar.mk unchanged.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Disable POSIX ACLs for host-tar to fix builds with acl 2.4.0

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Disable host-tar POSIX ACLs to prevent acl 2.4.0 header conflicts in clean builds.
• Apply the Buildroot configuration change idempotently during prepare, without affecting target
 packages.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: SigmaStar NOR firmware and upgrade integration, firmware build pipeline.
  • The changed recipe affects host-tool preparation before any board-specific artifact is produced.
  • It is an independent build-pipeline behavior, not a device runtime or upgrade capability.
  • The changed defconfigs, kernel board settings, CI mapping, and existing sysupgrade logic all implement one bounded SigmaStar NOR integration: producing an image, booting it with the kernel's partition split, and upgrading cameras across the fixed-slot/split transition.
  • They are not independent capabilities merely because they reside in build, kernel, CI, and runtime components.
Behavioral complexity 🟡 Medium 🧩 Compatibility cases, Interacting branches

  • Before: these SigmaStar defconfigs did not opt into the split-NOR post-image output, and CI had no boot-area mapping for their split packages.
  • After: the build emits split firmware and optionally fixed-slot packages, the kernel recognizes the split layout, CI assembles images using the new boot/env/read-size tuple, and sysupgrade must handle both legacy fixed slots and the adopted split layout.
  • New correctness condition: the producer's offsets and read limit, the kernel's MTD partition interpretation, the bootloader's read behavior, and sysupgrade's fixed-slot-to-split transition must agree for both pre-adoption and post-adoption states.
  • The compatibility interaction is newly enabled for these models; the existing partition and upgrade helpers are not themselves evidence of complexity.
Potential damage 🔴 High 🩹 Critical loss

  • If the produced image is laid out incorrectly, the affected camera can fail to boot or reject the upgrade, which is loss of the camera firmware capability.
  • The repository's size and format checks reduce some malformed-image cases, but they do not contain a wrong platform mapping or an incompatible kernel/bootloader contract.
  • Reverting source code does not repair a device that has already been flashed; supported recovery is a correctly built image and a working reflash path, potentially requiring recovery/serial tooling.
  • The evidence supports severe availability loss, not automatic serious data-integrity damage: settings preservation is attempted by sysupgrade, but the exact behavior depends on the target's actual partition layout and mounted overlay.
  • Conditionally recoverable: an unflashed bad artifact is rejected by build or sysupgrade checks; after a bad flash, recovery requires a valid image and an available bootloader/reflash mechanism.
  • Persistent settings may require the split upgrade's carry-over path and are not guaranteed if the layout is wrong.
Assessed commit b20e5d7
Diagram

graph TD
  A["prepare target"] --> B["Buildroot tar.mk"] --> C["host-tar configure"] --> D["host-tar build"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Patch or upgrade tar
  • ➕ Could retain host-tar ACL support while resolving the symbol conflict.
  • ➖ Requires maintaining a tar patch or changing the pinned package; host-tar does not need ACL support here.

Recommendation: Use the PR’s host-only configuration change. It addresses the clean-build failure without altering target packages or propagating a configure override to unrelated packages. Patching or upgrading tar is more appropriate if host-tar later needs ACL support.

Files changed (1) +15 / -0

Bug fix (1) +15 / -0
MakefileDisable POSIX ACLs for host-tar during prepare +15/-0

Disable POSIX ACLs for host-tar during prepare

• Adds a guarded, idempotent edit to the extracted Buildroot tar recipe so HOST_TAR_CONF_OPTS includes --without-posix-acls. This prevents tar 1.34’s ACL wrappers from conflicting with acl 2.4.0 headers on fresh host builds.

Makefile

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Informational

1. Host-tar fix silently no-ops if tar.mk changes ✓ Resolved
Description
The sed on line 118 rewrites HOST_TAR_CONF_OPTS = --without-selinux only when that exact string
is present, and nothing checks afterwards that --without-posix-acls was added. If a Buildroot
upgrade changes that line, the recipe still exits 0 and the build fails at host-tar with the
original acl_get_file_at conflict, with no message from prepare pointing at the edit.

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

… it landed

Review on #2910: the edit replaced the exact text
`HOST_TAR_CONF_OPTS = --without-selinux`, and nothing checked that it took.
A Buildroot bump that rewords that line would have left prepare exiting 0
and host-tar failing later with the original acl_get_file_at conflict.

prepare now inserts `HOST_TAR_CONF_OPTS += --without-posix-acls` ahead of
the host package's eval, whatever the assignment above it looks like, and
then greps for it, failing prepare with a message that names tar.mk when it
is missing. Checked: a fresh tree gets one line; a second prepare adds
nothing; a tree whose eval line is gone stops prepare with that message; and
`make BOARD=gk7205v300_lite br-host-tar` from an empty output directory
configures host-tar with --without-selinux --without-posix-acls and builds
it, config.h USE_ACL 0.
The ssc377, ssc377d, ssc377de, ssc377qe, ssc378de and ssc378qe lite images
outgrew their fixed slots: CI on this PR stopped five of them with
"size exceeded by: 4KB". A local ssc377_lite build reports "uImage
1992KB/1983KB, rootfs.squashfs 5124KB/5120KB outgrew the fixed slot".
infinity6 and infinity6b0 moved to the split layout in #2814; infinity6c
follows, as they did:

- infinity6c-ssc027a/ssc027d.config: CONFIG_MTD_SPLIT_LAYOUT=y. The kernel
  side is OpenIPC/linux's sigmastar-infinity6c split NOR layout (the
  infinity6 code on 5.10, in the NOR driver this family builds), which has
  to be on that branch before these images build: post-image-split.sh
  refuses a kernel without the symbol.
- the six lite defconfigs: post-image-split.sh and
  BR2_OPENIPC_NOR_FIXED_PACKAGE, so the fixed-slot package is still made
  while it fits and the split one always.
- image.yml: their NOR boot area, 256K boot, 64K env, U-Boot reading 2 MiB
  from 0x50000, as on infinity6.

Checked in qemu-bench, -M ssc377, on a NOR image put together as
create_split does (u-boot-ssc377-nor.bin at 0, firmware.bin at 320K, env
erased). The published U-Boot boots it from its default environment. The
kernel finds kernel 0x50000-0x250000, rootfs 0x250000-0x760000 and
rootfs_data from 0x760000, ignores U-Boot's root=/dev/mtdblock3 and fixed
mtdparts, and mounts the squashfs. It reaches the login prompt, with
majestic started. Afterwards the flash holds the jffs2 overlay in
rootfs_data and sensor=imx415 in the env. A second boot keeps both.
@widgetii widgetii changed the title build: host-tar without POSIX ACLs, which acl 2.4.0 headers break build: host-tar without POSIX ACLs; sigmastar infinity6c: the split NOR image on the 8 MB lite boards Nov 19, 2026
@widgetii

Copy link
Copy Markdown
Member Author

Addressed in f14a43d. The edit no longer matches the text of the existing HOST_TAR_CONF_OPTS = line.

  • Insertion: HOST_TAR_CONF_OPTS += --without-posix-acls goes in as its own line, ahead of $(eval $(host-autotools-package)).
  • Check: prepare then greps for that line and fails with a message naming tar.mk when it's missing, so a Buildroot bump that moves the eval surfaces at prepare, not as the original acl error at host-tar.

Tested on a fresh tree: one line is added; a second prepare adds nothing; a tar.mk without the eval stops prepare with the message; and br-host-tar from an empty output directory builds with USE_ACL 0.

The PR also now carries the infinity6c split-layout move (b20e5d7) for the ssc377/ssc378 lite size failures CI showed here. Its kernel side is OpenIPC/linux#266, merged.

@widgetii
widgetii merged commit a787f26 into master Nov 19, 2026
162 checks passed
@widgetii
widgetii deleted the host-tar-without-posix-acls branch November 19, 2026 21:29
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