X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fimage-commands.mk;h=4d3f025b123f44cfd48d5b6cf081ae7633577277;hb=a3dd6c939df83753256566565cad707c9413fbcb;hp=adef8f2759536495519e3f13ff4e2abfa33aa6cb;hpb=cde71a543c629f63e6f01850fd8b6f3f94cdd25d;p=openwrt%2Fopenwrt.git diff --git a/include/image-commands.mk b/include/image-commands.mk index adef8f2759..4d3f025b12 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -60,7 +60,7 @@ endef define Build/netgear-dni $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(REVISION) \ + -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \ $(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \ -r "$(1)" \ -i $@ -o $@.new @@ -77,16 +77,17 @@ define Build/append-squashfs-fakeroot-be cat $@.fakesquashfs >> $@ endef -# append a fake/empty rootfs uImage header, to fool the bootloaders -# rootfs integrity check -define Build/append-uImage-fakeroot-hdr - rm -f $@.fakeroot +# append a fake/empty uImage header, to fool bootloaders rootfs integrity check +# for example +define Build/append-uImage-fakehdr + touch $@.fakehdr $(STAGING_DIR_HOST)/bin/mkimage \ - -A $(LINUX_KARCH) -O linux -T filesystem -C none \ - -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) fakeroot' \ + -A $(LINUX_KARCH) -O linux -T $(1) -C none \ + -n '$(VERSION_DIST) fake $(1)' \ + -d $@.fakehdr \ -s \ - $@.fakeroot - cat $@.fakeroot >> $@ + $@.fakehdr + cat $@.fakehdr >> $@ endef define Build/tplink-safeloader @@ -113,16 +114,12 @@ define Build/install-dtb ) endef -define Build/install-zImage - $(CP) $(KDIR)/zImage \ - $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage -endef - define Build/fit $(TOPDIR)/scripts/mkits.sh \ -D $(DEVICE_NAME) -o $@.its -k $@ \ $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \ -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \ -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ @@ -138,7 +135,7 @@ define Build/lzma-no-dict endef define Build/gzip - gzip -9n -c $@ $(1) > $@.new + gzip -f -9n -c $@ $(1) > $@.new @mv $@.new $@ endef @@ -189,6 +186,10 @@ define Build/append-ubi rm $@.tmp endef +define Build/append-uboot + dd if=$(UBOOT_PATH) >> $@ +endef + define Build/pad-to dd if=$@ of=$@.new bs=$(1) conv=sync mv $@.new $@