generate 512-byte padded xz files

This commit is contained in:
Trammell hudson 2017-09-22 15:09:57 -04:00
parent 91ef9aeefa
commit 03d21da268
Failed to extract signature

View File

@ -358,17 +358,21 @@ initrd.intermediate: initrd.cpio
# #
# Compress the initrd into a xz file that can be included by coreboot. # Compress the initrd into a xz file that can be included by coreboot.
# The extra options are necessary to let the Linux kernel decompress it. # The extra options are necessary to let the Linux kernel decompress it
# and the extra padding is to ensure that it can be concatenated to
# other cpio files.
# #
coreboot.intermediate: $(build)/$(coreboot_dir)/initrd.cpio.xz coreboot.intermediate: $(build)/$(coreboot_dir)/initrd.cpio.xz
$(build)/$(coreboot_dir)/initrd.cpio.xz: initrd.cpio $(build)/$(coreboot_dir)/initrd.cpio.xz: initrd.cpio
%.xz: %
$(call do,COMPRESS,$<,\ $(call do,COMPRESS,$<,\
xz \ xz \
--check=crc32 \ --check=crc32 \
--lzma2=dict=1MiB \ --lzma2=dict=1MiB \
-9 \ -9 \
< "$<" \ < "$<" \
> "$@" \ | dd bs=512 conv=sync > "$@" \
) )
@sha256sum "$@" @sha256sum "$@"