From fe3723bef7a3d8da084b85e2866202975080bcc7 Mon Sep 17 00:00:00 2001
From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Date: Sun, 27 Sep 2015 03:27:48 +0200
Subject: [PATCH] initrd_pack: use crc32 integrity check with xz

The kernel xz implementation can only handle crc32 or none integrity
check but the xz default is crc64 and the kernel will panic.
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 45848b4..16ca97e 100644
--- a/Makefile
+++ b/Makefile
@@ -372,7 +372,8 @@ $(call gentargets,$(STATE_DIR)/initrd_remastered) : $(call archdir,%)$(STATE_DIR
 
 initrd_pack : $(ARCH_DIR)$(INITRD_TARGET)
 $(call gentargets,$(INITRD_TARGET)) : $(call archdir,%)$(STATE_DIR)/initrd_remastered
-	cd "$(call archdir,$*)$(INITRD)" && find | cpio -H newc -o | xz $(XZ_LZMA_FLAGS) -z > "$(call archdir,$*)$(INITRD_TARGET)"
+	cd "$(call archdir,$*)$(INITRD)" && find | cpio -H newc -o | xz $(XZ_LZMA_FLAGS) --check=crc32 -z \
+		> "$(call archdir,$*)$(INITRD_TARGET)"
 
 $(call ensure_unmount,clean_really_all): iso_clean_both rootfs_clean_both rootfs_common_clean initrd_clean_both image_clean
 
-- 
GitLab