From 28ba130ceae64ce7c39b91f8534bc639ce00a7d5 Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Sat, 17 Oct 2020 15:37:12 -0700 Subject: [PATCH] swap buggy/broken genisofs for maintained xorriso --- .../buildroot/configs/airgap_x86_64_defconfig | 2 +- .../patches/deterministic-iso9660.patch | 24 +++++++++++++++---- scripts/environment | 1 - 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/config/buildroot/configs/airgap_x86_64_defconfig b/config/buildroot/configs/airgap_x86_64_defconfig index 9481fc2..d38cf03 100644 --- a/config/buildroot/configs/airgap_x86_64_defconfig +++ b/config/buildroot/configs/airgap_x86_64_defconfig @@ -3437,7 +3437,7 @@ BR2_PACKAGE_PROVIDES_HOST_RUSTC="host-rust-bin" BR2_PACKAGE_HOST_UTIL_LINUX=y # BR2_PACKAGE_HOST_UTP_COM is not set # BR2_PACKAGE_HOST_VBOOT_UTILS is not set -# BR2_PACKAGE_HOST_XORRISO is not set +BR2_PACKAGE_HOST_XORRISO=y # BR2_PACKAGE_HOST_ZIP is not set # BR2_PACKAGE_HOST_ZSTD is not set diff --git a/config/buildroot/patches/deterministic-iso9660.patch b/config/buildroot/patches/deterministic-iso9660.patch index 6460667..ecccc0c 100644 --- a/config/buildroot/patches/deterministic-iso9660.patch +++ b/config/buildroot/patches/deterministic-iso9660.patch @@ -1,16 +1,30 @@ diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk -index a129655ce3..7cda68f7fb 100644 +index a129655ce3..068d332876 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk -@@ -129,8 +129,9 @@ ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD +@@ -24,7 +24,7 @@ + + ROOTFS_ISO9660_BOOT_MENU = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) + +-ROOTFS_ISO9660_DEPENDENCIES = host-cdrkit linux ++ROOTFS_ISO9660_DEPENDENCIES = host-xorriso host-cdrkit linux + + ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) + ROOTFS_ISO9660_USE_INITRD = YES +@@ -129,8 +129,14 @@ ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD endif # ROOTFS_ISO9660_USE_INITRD define ROOTFS_ISO9660_CMD - $(HOST_DIR)/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ -+LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 \ -+ $(HOST_DIR)/bin/genisoimage -J -r -b $(ROOTFS_ISO9660_BOOT_IMAGE) \ -+ -no-cache-inodes -no-emul-boot -boot-load-size 4 -boot-info-table \ ++ $(HOST_DIR)/bin/xorriso \ ++ -as mkisofs \ ++ -rock \ ++ -joliet \ ++ -eltorito-boot $(ROOTFS_ISO9660_BOOT_IMAGE) \ ++ -no-emul-boot \ ++ -boot-load-size 4 \ ++ -boot-info-table \ $(ROOTFS_ISO9660_GENISOIMAGE_OPTS) \ -o $@ $(ROOTFS_ISO9660_TMP_TARGET_DIR) endef diff --git a/scripts/environment b/scripts/environment index f3c41a6..c604404 100755 --- a/scripts/environment +++ b/scripts/environment @@ -13,4 +13,3 @@ export BUILDROOT_REPO=git://git.busybox.net/buildroot export HEADS_REPO=https://source.puri.sm/coreboot/purism-heads.git export FAKETIME="@${GIT_DATETIME?}" export SOURCE_DATE_EPOCH="${GIT_EPOCH?}" -export ROOTFS_ISO9660_GENISOIMAGE_OPTS="-creation-date=${GIT_EPOCH} "