mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
build: Prevent more gzip timestamps
To improve reproducibility, prevent the inclusion of timestamps in the gzip header. Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> SVN-Revision: 46361
This commit is contained in:
parent
3846bb9ac9
commit
096b3759a9
@ -556,7 +556,7 @@ include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Image/BuildKernel
|
||||
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
|
||||
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
gzip -9n -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
|
||||
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
|
||||
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
|
||||
|
@ -224,7 +224,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
|
||||
endif
|
||||
|
||||
define Image/mkfs/cpiogz
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
|
||||
endef
|
||||
|
||||
define Image/mkfs/targz
|
||||
|
@ -149,7 +149,7 @@ $(curdir)/index: FORCE
|
||||
mkdir -p $(PACKAGE_DIR)/$$d; \
|
||||
cd $(PACKAGE_DIR)/$$d || continue; \
|
||||
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \
|
||||
gzip -9c Packages > Packages.gz; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
@echo Signing package index...
|
||||
|
@ -121,7 +121,7 @@ package_index: FORCE
|
||||
@echo Building package index...
|
||||
@mkdir -p $(TMP_DIR) $(TARGET_DIR)/tmp
|
||||
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
|
||||
gzip -9c Packages > Packages.gz \
|
||||
gzip -9nc Packages > Packages.gz \
|
||||
) >/dev/null 2>/dev/null
|
||||
$(OPKG) update || true
|
||||
|
||||
|
@ -72,7 +72,7 @@ define Image/Build/Cellvision
|
||||
$(call Image/Build/Loader,$(2),bin,0x80500000,0x6D8,y,$(3))
|
||||
mkdir -p $(BIN_DIR)/tmp
|
||||
cp $(KDIR)/loader-$(2).bin $(BIN_DIR)/tmp/vmlinux.bin
|
||||
gzip -9 $(BIN_DIR)/tmp/vmlinux.bin
|
||||
gzip -9n $(BIN_DIR)/tmp/vmlinux.bin
|
||||
dd if=$(BIN_DIR)/tmp/vmlinux.bin.gz of=$(call imgname,$(1),$(2))-xmodem.bin bs=64k conv=sync
|
||||
rm -rf $(BIN_DIR)/tmp
|
||||
$(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
|
||||
|
@ -16,7 +16,7 @@ endef
|
||||
|
||||
|
||||
define CompressGzip
|
||||
gzip -9 -c $(1) > $(2)
|
||||
gzip -9n -c $(1) > $(2)
|
||||
endef
|
||||
|
||||
define MkImage
|
||||
|
@ -985,7 +985,7 @@ endef
|
||||
define PatchKernelGzip
|
||||
cp $(KDIR)/vmlinux$(3) $(KDIR_TMP)/vmlinux$(3)-$(1)
|
||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR_TMP)/vmlinux$(3)-$(1) "$(strip $(2))"
|
||||
gzip -9 -c $(KDIR_TMP)/vmlinux$(3)-$(1) > $(KDIR_TMP)/vmlinux$(3)-$(1).bin.gz
|
||||
gzip -9n -c $(KDIR_TMP)/vmlinux$(3)-$(1) > $(KDIR_TMP)/vmlinux$(3)-$(1).bin.gz
|
||||
endef
|
||||
|
||||
ifneq ($(SUBTARGET),mikrotik)
|
||||
@ -2245,10 +2245,10 @@ define Image/Build/Initramfs
|
||||
endef
|
||||
|
||||
define Image/Prepare
|
||||
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
gzip -9n -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
gzip -9 -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz
|
||||
gzip -9n -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz
|
||||
$(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma)
|
||||
$(call Image/BuildLoader,generic,elf,,,-initramfs)
|
||||
endif
|
||||
|
@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Image/BuildKernel
|
||||
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
|
||||
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
gzip -9n -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
|
||||
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma bs=65536 conv=sync
|
||||
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.gz bs=65536 conv=sync
|
||||
|
@ -95,7 +95,7 @@ endef
|
||||
define Image/Build/RedBootDTB
|
||||
# Prepare kernel and rootfs
|
||||
cat $(KDIR)/vmlinux $(DTS_DIR)/$(3).dtb > $(KDIR)/vmlinux-$(3)
|
||||
gzip -9 -c $(KDIR)/vmlinux-$(3) > $(KDIR)/vmlinux-$(3).bin.gz
|
||||
gzip -9n -c $(KDIR)/vmlinux-$(3) > $(KDIR)/vmlinux-$(3).bin.gz
|
||||
dd if=$(KDIR)/vmlinux-$(3).bin.gz of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-vmlinux.gz bs=65536 conv=sync
|
||||
dd if=$(KDIR)/root.squashfs of="$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" bs=64k conv=sync
|
||||
echo -ne \\xDE\\xAD\\xC0\\xDE >> "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs"
|
||||
|
@ -144,5 +144,5 @@ release:
|
||||
find $$RELDIR/ocf -name CVS | xargs rm -rf; \
|
||||
cd $$RELDIR/..; \
|
||||
tar cvf ocf-linux-$$REL.tar ocf-linux-$$REL; \
|
||||
gzip -9 ocf-linux-$$REL.tar
|
||||
gzip -9n ocf-linux-$$REL.tar
|
||||
|
||||
|
@ -9,7 +9,7 @@ UBINIZE_OPTS = -m 2048 -p 128KiB
|
||||
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024)))
|
||||
|
||||
define Image/BuildKernel/FIT
|
||||
gzip -9 -c $(KDIR)/Image > $(KDIR)/Image.gz
|
||||
gzip -9n -c $(KDIR)/Image > $(KDIR)/Image.gz
|
||||
$(call CompressLzma,$(KDIR)/Image,$(KDIR)/Image.gz)
|
||||
$(call Image/BuildKernel/MkFIT,$(1), $(KDIR)/Image.gz, $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb,gzip,0x42208000,0x42208000)
|
||||
$(CP) $(KDIR)/fit-$(1).itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage.itb
|
||||
|
@ -16,7 +16,7 @@ define CompressLzma
|
||||
endef
|
||||
|
||||
define CompressGzip
|
||||
gzip -9 -c $(1) > $(2)
|
||||
gzip -9n -c $(1) > $(2)
|
||||
endef
|
||||
|
||||
define MkuImage
|
||||
|
@ -149,8 +149,8 @@ ifneq ($(CONFIG_VMDK_IMAGES),)
|
||||
endif
|
||||
|
||||
define Image/Build/gzip
|
||||
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
|
||||
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
|
||||
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
||||
|
@ -25,7 +25,7 @@ endef
|
||||
|
||||
|
||||
define MkImageGzip
|
||||
gzip -9 -c $(1) > $(1).gz
|
||||
gzip -9n -c $(1) > $(1).gz
|
||||
mkimage -A mips -O linux -T kernel -a 0x80010000 -C gzip \
|
||||
-e $(call kernel_entry,$(KDIR)/vmlinux.debug) -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
|
||||
-d $(1).gz $(2)
|
||||
|
Loading…
Reference in New Issue
Block a user