heads/modules/zstd
Thierry Laurion 03d8f93c95
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
2023-08-31 11:19:50 -04:00

24 lines
754 B
Makefile

# ZSTD is always included, unless explicitly turned off
# Needed by initrd/bin/unpack_initramfs.sh under TPM Disk Unlock Key setup
CONFIG_ZSTD ?= y
modules-$(CONFIG_ZSTD) += zstd
zstd_version := 1.5.5
zstd_dir := zstd-$(zstd_version)
zstd_tar := zstd-$(zstd_version).tar.gz
zstd_url := https://github.com/facebook/zstd/releases/download/v$(zstd_version)/$(zstd_tar)
zstd_hash := 9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4
zstd_configure := true
# Only the decompressor is built and installed, to be able to read zstd-compressed
# initramfs archives.
zstd_target := \
$(MAKE_JOBS) $(CROSS_TOOLS) -C programs CFLAGS="-g0 -Os" \
HAVE_ZLIB=0 \
HAVE_LZMA=0 \
HAVE_LZ4=0 \
zstd-decompress
zstd_output := programs/zstd-decompress