X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fimage-commands.mk;h=49e438954a804f487652603d7e6682716b533c2b;hp=e0f2918a3876af03ecbb09b5d6ffc6596d5b24fd;hb=84e784671bd3ce6f09fc1d7492125ae76f18215a;hpb=aeba0fe466b5e850d0cf0697fc120070230d7831 diff --git a/include/image-commands.mk b/include/image-commands.mk index e0f2918a38..49e438954a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -11,6 +11,39 @@ define Build/uImage @mv $@.new $@ endef +define Build/buffalo-enc + $(eval product=$(word 1,$(1))) + $(eval version=$(word 2,$(1))) + $(eval args=$(wordlist 3,$(words $(1)),$(1))) + $(STAGING_DIR_HOST)/bin/buffalo-enc \ + -p $(product) -v $(version) $(args) \ + -i $@ -o $@.new + mv $@.new $@ +endef + +define Build/buffalo-enc-tag + $(call Build/buffalo-enc,'' '' -S 152 $(1)) +endef + +define Build/buffalo-tag-dhp + $(eval product=$(word 1,$(1))) + $(eval region=$(word 2,$(1))) + $(eval language=$(word 3,$(1))) + $(STAGING_DIR_HOST)/bin/buffalo-tag \ + -d 0x01000000 -w 1 \ + -a $(BUFFALO_TAG_PLATFORM) \ + -v $(BUFFALO_TAG_VERSION) -m $(BUFFALO_TAG_MINOR) \ + -b $(product) -p $(product) \ + -r $(region) -r $(region) -l $(language) \ + -I $@ -o $@.new + mv $@.new $@ +endef + +define Build/buffalo-dhp-image + $(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new + mv $@.new $@ +endef + define Build/netgear-chk $(STAGING_DIR_HOST)/bin/mkchkimg \ -o $@.new \ @@ -29,6 +62,18 @@ define Build/netgear-dni mv $@.new $@ endef +# append a fake/empty rootfs uImage header, to fool the bootloaders +# rootfs integrity check +define Build/append-uImage-fakeroot-hdr + rm -f $@.fakeroot + $(STAGING_DIR_HOST)/bin/mkimage \ + -A $(LINUX_KARCH) -O linux -T filesystem -C none \ + -n '$(call toupper,$(LINUX_KARCH)) LEDE fakeroot' \ + -s \ + $@.fakeroot + cat $@.fakeroot >> $@ +endef + define Build/tplink-safeloader -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ -B $(TPLINK_BOARD_NAME) \ @@ -110,10 +155,6 @@ define Build/append-rootfs dd if=$(IMAGE_ROOTFS) >> $@ endef -define Build/append-file - cat "$(1)" >> "$@" -endef - define Build/append-ubi sh $(TOPDIR)/scripts/ubinize-image.sh \ $(if $(UBOOTENV_IN_UBI),--uboot-env) \