Skip to content

build: align on Infrabase 1.1.0 - #379

Merged
daniel-rossier merged 12 commits into
mainfrom
align/infrabase-1.1.0
Nov 14, 2026
Merged

daniel-rossier merged 12 commits into
mainfrom
align/infrabase-1.1.0

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Brings the build system to Infrabase 1.1.0. Every change is taken from infrabase; each commit says what it fixes.

  • musl 1.2.6 with the 2026 CVE patches (the commit from fix/musl-cve-2026, which never had a PR)
  • updiff excludes the generated kernel and U-Boot sources
  • buildroot skips its make while nothing it consumes has changed
  • 32-bit kernels and modules built with ARCH=arm
  • filesystem/ created on a fresh checkout
  • stale ITBs cleared off p1 when switching boot shape; rootfs-linux:do_deploy ordered after buildroot again (truncated rootfs.cpio race)
  • bsp-linux names IB_TARGET_ITS and the available templates on error; virt32.its is standalone Linux; no ramdisk compression
  • U-Boot stays at the prompt with no uEnv.txt; verdin flash.bin honours the boot chain
  • QEMU virt patch from infrabase: SO3 devices plus the boot ROM, so U-Boot is read off the card again (IB_FIRST_STAGE_FROM_CARD="0" dropped)
  • usr-so3 (lvgl) clean restores the base tree
  • mount.sh/umount.sh: -h and the ramfs|rootfs modes
  • ibversion.sh: 1.1.0

Kept on purpose: __virt64_machine() in bsp_virt64.inc, which infrabase lacks (it adds virtualization=on to the -kernel U-Boot machine under AVZ).

Tested: fresh qemu + uboot rebuild, build.sh bsp-so3 + deploy.sh bsp-so3 on virt64 in the container; booted under st.sh to the SO3 shell, U-Boot loaded by the boot ROM from the card, LAN9118 and absmouse up.

Meant to go onto release/v6.4 too (fast-forward after merge), without moving the v6.4.0 tag.

The pinned musl-cross-make built musl 1.2.5, which is affected by
CVE-2026-107891 (regcomp integer overflows, out-of-bounds heap writes on
an untrusted regex), CVE-2026-40200 (qsort stack overflow on 32-bit archs)
and CVE-2026-6042 (iconv GB18030 denial of service).

There is no musl 1.2.7 yet: the fix is 1.2.6 plus the upstream patches,
which musl-cross-make 5e8042e carries.

Moving SRCREV alone changes nothing on an existing tree: stamps are not
hashed, do_build skips as soon as a compiler is installed, and the
per-target build directory still links to the old sources. Bump PR to
refetch, and record the SRCREV next to the toolchain so that each arch
rebuilds once. The applications are statically linked and the build does
not track libc.a, so usr-so3 now wipes its build directory when that
record changes, or they would keep the vulnerable libc.

Built on virt64 and virt32 from an existing tree, booted to the shell on
virt64.
Both trees are built in place, and their builds leave generated sources
next to the real ones that the generic excludes do not cover: updiff
turned a plain kernel or U-Boot build into a series of bogus patches.
Taken from Infrabase 1.1.0.
make re-runs target-finalize and the image steps every time, and
regenerates rootfs.cpio. Hash the platform, the .config, the attach
manifest and the board tree, and skip the make while they are unchanged.
build.sh -c buildroot still forces it. Taken from Infrabase 1.1.0.
The kernel Makefile patch pins ARCH=arm64 and the aarch64 toolchain,
which is wrong for virt32. Command-line assignments beat Makefile ones,
so pass both on 32-bit, for the kernel and for the modules usr-linux
builds against it. Taken from Infrabase 1.1.0.
The work symlink and the storage image link went into a filesystem/
directory nothing created. Taken from Infrabase 1.1.0.
… build

Switching between the standalone and the AVZ boot shapes left the other
shape's ITBs on the boot partition; with Linux ITBs those alone fill it.
__deploy_arm_common now removes them first.

rootfs-linux:do_deploy depends on the rootfs generator again. Nothing
else orders it after buildroot, so cpio could read a rootfs.cpio still
being written and abort with exit 2. The buildroot content guard makes
the extra dependency free on an unchanged tree.

Both taken from Infrabase 1.1.0.
An unset IB_TARGET_ITS and a missing template are now two messages,
both naming the variable and listing the templates of the platform.
virt32.its is standalone Linux, like virt64.its, and neither declares a
compression for the ramdisk, which only earned a warning at boot.
Taken from Infrabase 1.1.0.
…e chain on verdin

With no uEnv.txt on p1, the bootcmd imported whatever lay at the load
address and failed on "run start"; it now says so and stays at the
prompt, on QEMU and on the Raspberry Pi.

On verdin, flash.bin took TEE=./tee.bin on every chain although the
recipe computed TEE_ARG per chain; it now uses it, and the chain is part
of the rebuild hash. Taken from Infrabase 1.1.0.
Infrabase 1.1.0 merged the SO3 devices of the virt machine (LAN9118,
absolute pointer) with its boot ROM emulation. With that patch the
first stage is read off the card again, so the IB_FIRST_STAGE_FROM_CARD
override that kept U-Boot on -kernel goes away.
A clean now recognises a tree attached with the lvgl series whatever
the overrides say, restores the files the series replaced from the
lvgl-free base, and finds that base from IB_TARGET. Taken from
Infrabase 1.1.0.
-h prints the usage without the tree-switch prompt, and ramfs|rootfs
unpacks or repacks a rootfs recipe's cpio. Taken from Infrabase 1.1.0.
@daniel-rossier
daniel-rossier merged commit 74a06c1 into main Nov 14, 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