pygoscelis: Try out zstd for kernel and initramfs

This not a panic reaction to the xz situation, but certainly an
experiment initiated by that. Let’s have a look at compression speed,
decompression (startup) speed and compression size.

Several changes to configs and packages must be done:
- enable kernel support for zstd compression for itself
- enable kernel support for zstd compression for the initramfs
- adopt firmware names in CONFIG_EXTRA_FIRMWARE
- let the initramfs be compressed with zstd
- compress firmware files with zstd (before re-building the kernel)

For some details see gitea issue #2.
This commit is contained in:
Nils Freydank 2024-10-05 16:25:28 +02:00
parent 83feb054cd
commit 672ae7c496
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112

View File

@ -42,10 +42,10 @@ CONFIG_HAVE_KERNEL_ZSTD=y
# CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_LZMA is not set
CONFIG_KERNEL_XZ=y # CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set # CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not set CONFIG_KERNEL_ZSTD=y
CONFIG_DEFAULT_INIT="/bin/init" CONFIG_DEFAULT_INIT="/bin/init"
CONFIG_DEFAULT_HOSTNAME="pygoscelis" CONFIG_DEFAULT_HOSTNAME="pygoscelis"
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
@ -233,10 +233,10 @@ CONFIG_INITRAMFS_SOURCE=""
# CONFIG_RD_GZIP is not set # CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set # CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set # CONFIG_RD_LZMA is not set
CONFIG_RD_XZ=y # CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set # CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set # CONFIG_RD_LZ4 is not set
# CONFIG_RD_ZSTD is not set CONFIG_RD_ZSTD=y
# CONFIG_BOOT_CONFIG is not set # CONFIG_BOOT_CONFIG is not set
CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_INITRAMFS_PRESERVE_MTIME=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
@ -1773,13 +1773,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# Firmware loader # Firmware loader
# #
CONFIG_FW_LOADER=y CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_EXTRA_FIRMWARE="amdgpu/renoir_asd.bin.zst amdgpu/renoir_ce.bin.zst amdgpu/renoir_dmcub.bin.zst amdgpu/renoir_gpu_info.bin.zst amdgpu/renoir_me.bin.zst amdgpu/renoir_mec2.bin.zst amdgpu/renoir_mec.bin.zst amdgpu/renoir_pfp.bin.zst amdgpu/renoir_rlc.bin.zst amdgpu/renoir_sdma.bin.zst amdgpu/renoir_ta.bin.zst amdgpu/renoir_vcn.bin.zst regulatory.db regulatory.db.p7s"
CONFIG_EXTRA_FIRMWARE="amdgpu/renoir_asd.bin.xz amdgpu/renoir_ce.bin.xz amdgpu/renoir_dmcub.bin.xz amdgpu/renoir_gpu_info.bin.xz amdgpu/renoir_me.bin.xz amdgpu/renoir_mec2.bin.xz amdgpu/renoir_mec.bin.xz amdgpu/renoir_pfp.bin.xz amdgpu/renoir_rlc.bin.xz amdgpu/renoir_sdma.bin.xz amdgpu/renoir_ta.bin.xz amdgpu/renoir_vcn.bin.xz regulatory.db regulatory.db.p7s"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
# CONFIG_FW_LOADER_USER_HELPER is not set # CONFIG_FW_LOADER_USER_HELPER is not set
CONFIG_FW_LOADER_COMPRESS=y CONFIG_FW_LOADER_COMPRESS=y
CONFIG_FW_LOADER_COMPRESS_XZ=y # CONFIG_FW_LOADER_COMPRESS_XZ is not set
# CONFIG_FW_LOADER_COMPRESS_ZSTD is not set CONFIG_FW_LOADER_COMPRESS_ZSTD=y
CONFIG_FW_CACHE=y CONFIG_FW_CACHE=y
# CONFIG_FW_UPLOAD is not set # CONFIG_FW_UPLOAD is not set
# end of Firmware loader # end of Firmware loader
@ -6747,7 +6746,7 @@ CONFIG_XZ_DEC_X86=y
# CONFIG_XZ_DEC_MICROLZMA is not set # CONFIG_XZ_DEC_MICROLZMA is not set
CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set # CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y CONFIG_REED_SOLOMON_ENC8=y