X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fimage-commands.mk;h=c1d89825a3bc383ac9200af2093867ba05f0960c;hb=5afe9a054cbcb1630a42200f3ac799432522a87d;hp=083a3890316c633e9a1ffaab6bd7790ebb29ea34;hpb=77265e00c70a7f6c01d2bc68c3a41de34b18deb3;p=openwrt%2Fstaging%2Fflorian.git diff --git a/include/image-commands.mk b/include/image-commands.mk index 083a389031..c1d89825a3 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -8,7 +8,40 @@ define Build/uImage -O linux -T kernel \ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION))' -d $@ $@.new - @mv $@.new $@ + 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 @@ -16,7 +49,7 @@ define Build/netgear-chk -o $@.new \ -k $@ \ -b $(NETGEAR_BOARD_ID) \ - -r $(NETGEAR_REGION) + $(if $(NETGEAR_REGION),-r $(NETGEAR_REGION),) mv $@.new $@ endef @@ -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) \ @@ -59,7 +104,7 @@ define Build/fit -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)) \ - -A $(ARCH) -v $(LINUX_VERSION) + -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef @@ -190,3 +235,8 @@ metadata_json = \ define Build/append-metadata $(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) endef + +define Build/kernel2minor + kernel2minor -k $@ -r $@.new $(1) + mv $@.new $@ +endef