mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
1bf8331ffb
Debian 12's initrd by default now consists of an uncompressed cpio archive containing microcode, followed by a zstd-compressed cpio archive. inject_firmware.sh only supported gzip-compressed cpio, so it could not extract /init from this archive. Add zstd-decompress to decompress zstd streams (uncompressed size is about 180 KB). Add unpack_initramfs.sh which is able to decompress uncompressed, gzip, or zstd archives, with multiple segments, much like the Linux kernel itself does. Use unpack_initramfs.sh to extract /init for blob jail. Don't compress the new archive segment containing firmware and the updated /init. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
21 lines
606 B
Makefile
21 lines
606 B
Makefile
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
|