Skip to content

Commit 03d8f93

Browse files
committed
modules/zstd: now included by default. Deactivated under legacy-flash boards
Rationale: cpio -t alone cannot extract initrd past early cpio (microcode) in most packed initrd. unpack_initramfs.sh already under master comes to the rescue, but its usage up to today was limited to pass firmware blobs to final OS under boards/librem_mini_v2 Debian OSes (and probably others) need to have cryptroot/crypttab overriden directly, otherwise generic generation of crypttab is not enough. Extracting crypttab and overriding directly what is desired by final OS and exposed into /boot/initrd is the way to go otherwise hacking on top of hacks. This brings default packed modules under Heads to 5 modules, which needs to be deactivate in board configs if undesired: user@heads-tests-deb12:~/heads$ grep -Rn "?= y" modules/ | grep -v MUSL modules/zlib:1:CONFIG_ZLIB ?= y modules/zstd:3:CONFIG_ZSTD ?= y modules/exfatprogs:2:CONFIG_EXFATPROGS ?= y modules/busybox:2:CONFIG_BUSYBOX ?= y modules/e2fsprogs:2:CONFIG_E2FSPROGS ?= y
1 parent 67c865d commit 03d8f93

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

boards/UNTESTED_t430-legacy-flash/UNTESTED_t430-legacy-flash.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CONFIG_LINUX_CONFIG=config/linux-x230-flash.config
1313
#Add bare minimal tools for flashing boards
1414
CONFIG_BASH=n
1515
CONFIG_FLASHROM=y
16+
CONFIG_ZSTD=n
1617
#CONFIG_GPG=y
1718
#CONFIG_FLASHTOOLS=y
1819
CONFIG_PCIUTILS=y

boards/librem_mini_v2/librem_mini_v2.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ CONFIG_PCIUTILS=y
2020
CONFIG_POPT=y
2121
CONFIG_QRENCODE=y
2222
CONFIG_TPMTOTP=y
23-
# zstd-decompress - for blob jail, needed to extract /init from zstd cpio archive
24-
CONFIG_ZSTD=y
2523

2624
CONFIG_CAIRO=y
2725
CONFIG_FBWHIPTAIL=y

boards/x230-legacy-flash/x230-legacy-flash.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CONFIG_LINUX_CONFIG=config/linux-x230-flash.config
1313
#Add bare minimal tools for flashing boards
1414
CONFIG_BASH=n
1515
CONFIG_FLASHROM=y
16+
CONFIG_ZSTD=n
1617
#CONFIG_GPG=y
1718
#CONFIG_FLASHTOOLS=y
1819
CONFIG_PCIUTILS=y
@@ -21,6 +22,7 @@ CONFIG_PCIUTILS=y
2122
#CONFIG_TPMTOTP=y
2223
#CONFIG_DROPBEAR=y
2324

25+
2426
#Additional hardware support
2527
CONFIG_LINUX_USB=y
2628
#CONFIG_LINUX_E1000E=y

modules/zstd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ZSTD is always included, unless explicitly turned off
2+
# Needed by initrd/bin/unpack_initramfs.sh under TPM Disk Unlock Key setup
3+
CONFIG_ZSTD ?= y
14
modules-$(CONFIG_ZSTD) += zstd
25

36
zstd_version := 1.5.5

0 commit comments

Comments
 (0)