Skip to content

feat(image): prune ICU from the initrd and the leftover tools from both trees - #489

Merged
jeefy merged 1 commit into
projectbluefin:mainfrom
jeefy:feat/prune-initrd-icu-and-leftovers
Oct 18, 2026
Merged

jeefy merged 1 commit into
projectbluefin:mainfrom
jeefy:feat/prune-initrd-icu-and-leftovers

Conversation

@jeefy

@jeefy jeefy commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Follows up #487 with the "quick win" half of the size review after v26.10.1215. −13.8 MB per UKI (−14.8%), −4.0 MB usr.raw, proven by a full export and check-image against v26.10.1215: initrd 117 paths removed / 0 added, /usr 26 removed / 2 added (the 2 are #486's, not this PR's). No kernel, element-graph or os-base change.

The regression this fixes

#485 removed usr/lib/*-linux-gnu/libicu*.so* from files/prune/common.list so libarchive→libxml2 could keep libicuuc/libicudata in /usr. common.list is applied to the initrd too, so all six ICU libraries (40 MB unpacked, 11.8 MB zstd) came back into every UKI — and nothing in the initrd links libxml2 or libarchive. ICU reaches the initrd via FSDK xfsprogs.bst (for the already-pruned xfs_scrub), so it cannot be fixed by dropping a dependency; initrd.list now prunes it. A test guards libicuuc/libicudata in common.list/usr.list only, so this can't silently recur in /usr either.

Also pruned

  • /usr: the four ICU libraries libxml2 does not need (i18n, io, tu, test; readelf shows they NEED only each other), libxml2's Python bindings (no Python in the base; the homebrew-integration sysext dedups against the unpruned os-filesystem and its closure has no libxml2, so its contents are unchanged), usr/lib/debug (valgrind/gdb symbols; neither ships).
  • initrd: feat(image): prune gnupg, cracklib, lvm2 and other command-line tools from /usr #487's tool prunes that still applied there (openssl CLI, cracklib, pcre2test, cal hexdump look mesg more rev ul, asn1*, mpicalc/hmac256/dumpsexp, compile_et/mk_cmds, bashbug, zsh/fish completions) — moved to common.list; and every xfs_* tool except xfs_repair, fsck.xfs, mkfs.xfs (fsck.xfs -f execs only xfs_repair; systemd-growfs uses the ioctl; nothing in files/, elements/bluefin-server/initrd or scripts/dogfood-* calls the rest). Kept on purpose: gpg/gpgv/gpg-agent/keyboxd/gpgconf, lvm + 69-dm-lvm.rules, hwdb, magic.mgc, bsdtar.

Every glob was run with the real prune.sh against copies of the 1215 trees before the export; predicted savings equal measured.

v26.10.1215 this PR
disk UKI 93,467,568 79,671,296 (below the 81.6 MB of v26.10.1182)
netboot UKI 93,468,080 79,671,808
.initrd section 72,644,608 58,848,256 (.linux identical)
initrd unpacked 257.4 MB 209.5 MB (−47.9 MB RAM on every diskless boot)
usr.raw 215,330,816 211,357,696

just validate, pytest 1472, ruff, docs-checks pass. Labelled full-build for the boot-test. The medium/structural items from the review (firmware-less kernel modules, libarchive without libxml2, CONFIG_KERNEL_ZSTD) are deliberately not in this PR.

…th trees

projectbluefin#485 took the libicu*.so* glob out of common.list because /usr needs
libicuuc and libicudata (libarchive -> libxml2 -> ICU). That also put all
six ICU libraries back into the initrd, where nothing links libxml2 or
libarchive; ICU only reaches it through xfsprogs (extra-fs.bst), and its
one user, xfs_scrub, is already pruned. A dependency fix is not possible
there, so this is a prune entry.

initrd (unpacked, measured against v26.10.1215):
- ICU, all six libraries (initrd.list): 40.2 MB
- xfsprogs beyond mkfs.xfs, fsck.xfs and xfs_repair (initrd.list): 4.2 MB
- projectbluefin#487's leftovers that also apply to the initrd, moved from usr.list to
  common.list: openssl CLI, cracklib tools and word list, util-linux
  extras, libgcrypt tools, compile_et/mk_cmds, asn1*, pcre2test, bashbug,
  psl-make-dafsa, xfs_protofile, zsh/fish completions: 2.6 MB
- usr/lib/debug (common.list): 0.9 MB
GnuPG (incl. gpgconf, gpg-connect-agent, gpg-error) and lvm2 stay in the
initrd.

/usr:
- libicui18n, libicuio, libicutu, libicutest; they link only each other
  (common.list): 4.6 MB
- libxml2's Python bindings; the Homebrew integration sysext's Python
  closure has no libxml2, so its dedup is unchanged (usr.list): 1.8 MB
- usr/lib/debug (common.list): 0.9 MB

Before -> after (v26.10.1215 -> this build):
- initrd unpacked: 257,379,689 -> 209,511,738
- *.usr.raw: 215,330,816 -> 211,357,696
- disk UKI: 93,467,568 -> 79,671,296 (.initrd 72,644,608 -> 58,848,256)
- netboot UKI: 93,468,080 -> 79,671,808

just check-image against the v26.10.1215 usr.raw passes: 26 /usr paths
removed, all from the entries above. The prune-list test now also guards
libicuuc and libicudata in common.list and usr.list.

Assisted-by: Claude Fable 5.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeefy jeefy added the full-build Run the full image build and boot test on this pull request label Oct 17, 2026
@github-actions
github-actions Bot requested review from Danathar and alatiera October 17, 2026 22:57
@github-actions

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign ahmedadan after the PR has been reviewed.
You can assign the PR to them by writing /assign @ahmedadan in a comment when ready.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from correctness, security, intent-alignment, style, docs-currency.

Confidence: 5/5 (safe)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@jeefy
jeefy merged commit b3e4b0d into projectbluefin:main Oct 18, 2026
24 of 34 checks passed
jeefy added a commit that referenced this pull request Oct 18, 2026
…mpress vmlinuz with zstd (#491)

* feat(kernel): drop firmware-less Wi-Fi, Bluetooth and GPU drivers; compress vmlinuz with zstd

The image ships no /usr/lib/firmware, so Wi-Fi, Bluetooth and the amdgpu,
radeon, nouveau and xe GPU drivers cannot drive the hardware they match.
patches/freedesktop-sdk/0009 appends to FSDK's fdsdk-config.sh after 0007:
it removes WLAN, CFG80211, MAC80211, BT, DRM_AMDGPU, DRM_RADEON,
DRM_NOUVEAU and DRM_XE, and switches KERNEL_GZIP to KERNEL_ZSTD.

FSDK's module/enable lines put those drivers in expected-configs, so the
block snapshots the expected options that are set, runs olddefconfig, and
drops from the check only the ones that went from set to unset (192, listed
in the build log; matching a local Kconfig run of 7.2.6). Every other
expected option is still checked. CEC_CORE/MEDIA_CEC_RC go too: only
amdgpu's display code selected them.

Measured against a local build of main (b3e4b0d, same dev keys):
  usr.raw      211,357,696 -> 187,297,792  (-24.1 MB)
  disk UKI      79,671,296 ->  75,356,672  (-4.3 MB)
  netboot UKI   79,671,808 ->  75,357,184  (-4.3 MB)
  .linux        20,685,824 ->  16,372,736  (gzip -> zstd; cfg80211,
                mac80211 and the Bluetooth core are no longer built in)
Against v26.10.1215 (before #489): usr.raw 215,330,816, disk UKI
93,467,568.

Modules gone: 201 files / 23.9 MB (Wi-Fi 160 / 13.0 MB, amd 6.1 MB, xe
1.9 MB, nouveau 1.3 MB, radeon 0.9 MB, Bluetooth 27 / 0.6 MB, cec, five
DRM helpers only these drivers used, qmi_helpers). Added: libarc4.ko
(was built in via mac80211).
Kept: i915, simpledrm, virtio-gpu, hyperv_drm, vmwgfx, vboxvideo, gma500,
RFKILL (x86 platform drivers use it), DEBUG_INFO_BTF; sound, media, IIO and
input module counts unchanged. ast, mgag200 and bochs were not built
before this change and still are not.

Verified: 0001/0006/0007/0008/0009 git apply cleanly on the
freedesktop-sdk-26.08.2 tag; just validate; just export-image (kernel
rebuilt, expected-config check passed); just check-image vs 1215 and main;
just dogfood-check (Secure Boot diskless boot, failed=0).

Assisted-by: Claude Fable 5.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(nvidia): nouveau is no longer in the base kernel

Patch 0009 stops building nouveau, so no driver holds an NVIDIA GPU when
the driver sysext merges. nvidia-load's eviction (`modprobe -r nouveau`
only when nouveau holds a GPU, sysfs unbind otherwise) is now a no-op and
stays as a guard for a kernel that does build nouveau; update the skill
and the helper and unit comments to say so. No behaviour change.

Assisted-by: Claude Fable 5.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(kernel): guard zstd vmlinuz to x86_64; update nouveau comments

arm64 selects no HAVE_KERNEL_*, so `enable KERNEL_ZSTD` stays unset there
and FSDK's expected-configs check would fail the aarch64 kernel build with
"Missing KERNEL_ZSTD". Wrap the gzip->zstd switch in an x86_64 case, like
0007 does for the x86-only watchdogs, and test both arches.

Reword the modprobe-nvidia.conf comment and its test to say the base
kernel no longer builds nouveau.

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

---------

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-build Run the full image build and boot test on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant