Repository navigation
build: host-tar without POSIX ACLs; sigmastar infinity6c: the split NOR image on the 8 MB lite boards - #2910
Conversation
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.
PR Summary by QodoDisable POSIX ACLs for host-tar to fix builds with acl 2.4.0
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
… 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.
|
Addressed in f14a43d. The edit no longer matches the text of the existing
Tested on a fresh tree: one line is added; a second 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. |
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:
acl 2.4.0 added
acl_get_file_at(),acl_set_file_at()andacl_delete_def_file_at(), each with anat_flagsargument. tar 1.34'ssrc/xattrs.cdefines 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:addsHOST_TAR_CONF_OPTS += --without-posix-aclsto the extracted Buildroot'star.mkas its own line, ahead of the host package's eval, then checks that it landed and failspreparewith a message namingtar.mkif not. This follows the review: the first version replaced exact text and could have silently done nothing after a Buildroot bump.HAVE_POSIX_ACLS.BR2_PACKAGE_ACLis set.A tempting workaround is exporting
ac_cv_header_sys_acl_h=noaroundmake. Don't use it: it reaches every package's configure, and host-fakeroot then fails withunknown type name 'acl_t'.Tested: Arch, acl 2.4.0, GCC 16.2.1.
make BOARD=gk7205v300_lite br-host-tarfailed before and now builds tar 1.34 withconfig.hUSE_ACL 0.prepareadds nothing.tar.mkwithout the eval line stopspreparewith the message.gk7205v300_ultimateandssc377_litebuilds pass.2. sigmastar infinity6c: the split NOR image on the 8 MB lite boards
CI on this PR stopped
ssc377,ssc377d,ssc377de,ssc377qeandssc378qelite with "size exceeded by: 4KB". A localssc377_litebuild reportsuImage 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.CONFIG_MTD_SPLIT_LAYOUT=yininfinity6c-ssc027a/ssc027d.config. The kernel side is infinity6c: the split NOR layout, without device tree partitions linux#266, merged intosigmastar-infinity6c. It's infinity6's no-device-tree split layout on 5.10, in this family's NOR driver.post-image-split.shandBR2_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 ascreate_splitdoes:u-boot-ssc377-nor.binat 0,firmware.binat 320K, env erased.root=/dev/mtdblock3and fixedmtdparts, mounts the squashfs, and reaches the login prompt with majestic started.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.