diff --git a/config/buildroot/configs/airgap_librem13v4_defconfig b/config/buildroot/configs/airgap_librem13v4_defconfig index 9dee9d9..dbfee3c 100644 --- a/config/buildroot/configs/airgap_librem13v4_defconfig +++ b/config/buildroot/configs/airgap_librem13v4_defconfig @@ -120,7 +120,7 @@ BR2_OPTIMIZE_S=y BR2_SHARED_LIBS=y # BR2_SHARED_STATIC_LIBS is not set BR2_PACKAGE_OVERRIDE_FILE="$(CONFIG_DIR)/local.mk" -BR2_GLOBAL_PATCH_DIR="" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_Airgap_PATH)/patches/" # # Advanced diff --git a/config/buildroot/patches/deterministic-iso9660.patch b/config/buildroot/patches/deterministic-iso9660.patch new file mode 100644 index 0000000..fed8b61 --- /dev/null +++ b/config/buildroot/patches/deterministic-iso9660.patch @@ -0,0 +1,12 @@ +diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk +index a129655ce3..6db691ed2c 100644 +--- a/fs/iso9660/iso9660.mk ++++ b/fs/iso9660/iso9660.mk +@@ -129,6 +129,7 @@ ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD + endif # ROOTFS_ISO9660_USE_INITRD + + define ROOTFS_ISO9660_CMD ++LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 \ + $(HOST_DIR)/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + $(ROOTFS_ISO9660_GENISOIMAGE_OPTS) \ diff --git a/scripts/environment b/scripts/environment index f4581a9..8fb54ef 100755 --- a/scripts/environment +++ b/scripts/environment @@ -12,5 +12,4 @@ 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 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 export ROOTFS_ISO9660_GENISOIMAGE_OPTS="-creation-date=${GIT_EPOCH} " diff --git a/scripts/fetch b/scripts/fetch index 1fe40ba..d8549fb 100755 --- a/scripts/fetch +++ b/scripts/fetch @@ -20,6 +20,11 @@ mkdir -p "$build_dir" || git clone "$buildroot_repo" "$buildroot_dir" git -C "$buildroot_dir" checkout "$buildroot_ref" cd "$buildroot_dir" +git reset --hard +for patch in ${BR2_EXTERNAL}/patches/*; do + echo "Applying patch: ${patch}" + patch -p1 --no-backup-if-mismatch < "${patch}" +done make "airgap_${TARGET}_defconfig" make source