X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fimage-commands.mk;h=5f0ac6164d9241a2d89314dca1b8d134bd8c3d4d;hp=718ffe82c33d9ecf475e8b1e9de0c27272a49b7a;hb=6c76decd61ab062bfb7fce78da5de89a2b9fcc72;hpb=7d6c63d875421fc1f66833ba0e690914ea28f1a3 diff --git a/include/image-commands.mk b/include/image-commands.mk index 718ffe82c3..5f0ac6164d 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -7,7 +7,7 @@ define Build/uImage mkimage -A $(LINUX_KARCH) \ -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 + -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION))' -d $@ $@.new mv $@.new $@ endef @@ -60,7 +60,7 @@ endef define Build/netgear-dni $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(NETGEAR_BOARD_ID) -v LEDE.$(REVISION) \ + -B $(NETGEAR_BOARD_ID) -v OpenWrt.$(REVISION) \ $(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \ -r "$(1)" \ -i $@ -o $@.new @@ -83,7 +83,7 @@ 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' \ + -n '$(call toupper,$(LINUX_KARCH)) OpenWrt fakeroot' \ -s \ $@.fakeroot cat $@.fakeroot >> $@ @@ -102,8 +102,7 @@ define Build/tplink-safeloader endef define Build/append-dtb - $(call Image/BuildDTB,$(if $(DEVICE_DTS_DIR),$(DEVICE_DTS_DIR),$(DTS_DIR))/$(DEVICE_DTS).dts,$@.dtb) - cat $@.dtb >> $@ + cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@ endef define Build/install-dtb @@ -114,6 +113,11 @@ 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 $@ \ @@ -233,6 +237,35 @@ define Build/sysupgrade-tar $@ endef +define Build/tplink-v1-header + $(STAGING_DIR_HOST)/bin/mktplinkfw \ + -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \ + -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V $(REVISION) \ + -k $@ -o $@.new $(1) + @mv $@.new $@ +endef + +define Build/tplink-v2-header + $(STAGING_DIR_HOST)/bin/mktplinkfw2 \ + -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \ + -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \ + -T $(TPLINK_HVERSION) -V "ver. 2.0" \ + -k $@ -o $@.new $(1) + @mv $@.new $@ +endef + +define Build/tplink-v2-image + $(STAGING_DIR_HOST)/bin/mktplinkfw2 \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) \ + -w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \ + -T $(TPLINK_HVERSION) -V "ver. 2.0" -a 0x4 -j \ + -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1) + cat $@.new >> $@ + rm -rf $@.new +endef + json_quote=$(subst ','\'',$(subst ",\",$(1))) #")') metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))")))) @@ -248,7 +281,7 @@ metadata_json = \ }' define Build/append-metadata - $(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) + $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) endef define Build/kernel2minor