From a9d91d421246691aca8091b5a7977cfaa6fb20db Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 8 Nov 2017 18:40:37 +0100 Subject: [PATCH] build: replace uses of OpenWrt with $(VERSION_DIST) This makes the distribution name more configurable. Signed-off-by: Felix Fietkau --- include/image-commands.mk | 6 +++--- include/image.mk | 2 +- target/linux/apm821xx/image/Makefile | 2 +- target/linux/ar71xx/image/generic.mk | 6 +++--- target/linux/ar71xx/image/legacy.mk | 14 +++++++------- target/linux/ar71xx/image/senao.mk | 2 +- target/linux/ar71xx/image/tp-link.mk | 4 ++-- target/linux/ath25/image/Makefile | 2 +- target/linux/brcm63xx/image/bcm63xx.mk | 6 +++--- target/linux/cns3xxx/image/Makefile | 4 ++-- target/linux/lantiq/image/Makefile | 2 +- target/linux/mcs814x/image/Makefile | 2 +- target/linux/ramips/image/Makefile | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 5f0ac6164d..4b29695d9a 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)) OpenWrt Linux-$(LINUX_VERSION))' -d $@ $@.new + -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) 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 OpenWrt.$(REVISION) \ + -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(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)) OpenWrt fakeroot' \ + -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) fakeroot' \ -s \ $@.fakeroot cat $@.fakeroot >> $@ diff --git a/include/image.mk b/include/image.mk index 605cb06672..7635063c27 100644 --- a/include/image.mk +++ b/include/image.mk @@ -136,7 +136,7 @@ endef define Image/BuildKernel/MkuImage mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \ - -n '$(call toupper,$(ARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $(4) $(5) + -n '$(call toupper,$(ARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(4) $(5) endef define Image/BuildKernel/MkFIT diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index ee85292d57..58ea2945f4 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -116,7 +116,7 @@ define Build/create-uImage-dtb # flat_dt target expect FIT image - which WNDR4700's uboot doesn't support -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) \ -O linux -T kernel -C none \ - -n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' \ + -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ -d $(IMAGE_KERNEL).dtb $@.new @mv $@.new $@ endef diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 58eb3fd922..2cd579f1b9 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -12,7 +12,7 @@ define Build/mkwrggimg $(STAGING_DIR_HOST)/bin/mkwrggimg -b \ -i $@ -o $@.imghdr -d /dev/mtdblock/1 \ -m $(BOARDNAME) -s $(DAP_SIGNATURE) \ - -v OpenWrt -B $(REVISION) + -v $(VERSION_DIST) -B $(REVISION) mv $@.imghdr $@ endef @@ -30,7 +30,7 @@ define Build/netgear-squashfs -A mips -O linux -T filesystem -C none \ -M $(NETGEAR_KERNEL_MAGIC) \ -a 0xbf070000 -e 0xbf070000 \ - -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ + -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ -d $@.squashfs $@ rm -rf $@.squashfs $@.fs endef @@ -66,7 +66,7 @@ define Build/uImageHiWiFi mkimage -A $(LINUX_KARCH) \ -O linux -T kernel \ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new + -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $@ $@.new @mv $@.new $@ endef diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk index 01d7e50631..7033b45448 100644 --- a/target/linux/ar71xx/image/legacy.mk +++ b/target/linux/ar71xx/image/legacy.mk @@ -87,7 +87,7 @@ ifneq ($(SUBTARGET),mikrotik) # $(4): output file. define MkuImage mkimage -A mips -O linux -T kernel -a 0x80060000 -C $(1) $(2) \ - -e 0x80060000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ + -e 0x80060000 -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ -d $(3) $(4) endef @@ -485,11 +485,11 @@ define Image/Build/Belkin $(eval rootsize=$(call mtdpartsize,rootfs,$(4))) $(call Sysupgrade/RKuImage,$(1),$(2),$(kernsize),$(rootsize)) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ - edimax_fw_header -m $(5) -v "$(shell echo -n OpenWrt$(REVISION) | cut -c -13)" \ + edimax_fw_header -m $(5) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)" \ -n "uImage" \ -i $(KDIR_TMP)/vmlinux-$(2).uImage \ -o $(KDIR_TMP)/$(2)-uImage; \ - edimax_fw_header -m $(5) -v "$(shell echo -n OpenWrt$(REVISION) | cut -c -13)" \ + edimax_fw_header -m $(5) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)" \ -n "rootfs" \ -i $(KDIR)/root.$(1) \ -o $(KDIR_TMP)/$(2)-rootfs; \ @@ -662,7 +662,7 @@ define Image/Build/Netgear/buildkernel ) > $(KDIR_TMP)/vmlinux-$(2).uImage.squashfs.tmp2 mkimage -A mips -O linux -T filesystem -C none -M $(5) \ -a 0xbf070000 -e 0xbf070000 \ - -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ + -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ -d $(KDIR_TMP)/vmlinux-$(2).uImage.squashfs.tmp2 \ $(KDIR_TMP)/vmlinux-$(2).uImage.squashfs endef @@ -674,7 +674,7 @@ define Image/Build/Netgear for r in $(7) ; do \ [ -n "$$r" ] && dashr="-$$r" || dashr= ; \ $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(6) -v OpenWrt.$(REVISION) -r "$$r" $(8) \ + -B $(6) -v $(VERSION_DIST).$(REVISION) -r "$$r" $(8) \ -i $(call sysupname,$(1),$(2)) \ -o $(call imgname,$(1),$(2))-factory$$dashr.img; \ done; \ @@ -715,7 +715,7 @@ define Image/Build/NetgearNAND/buildkernel dd if=/dev/zero of=$(KDIR_TMP)/fakeroot-$(2) bs=131072 count=1 mkimage -A mips -O linux -T filesystem -C none \ -a 0xbf070000 -e 0xbf070000 \ - -n 'MIPS OpenWrt fakeroot' \ + -n 'MIPS $(VERSION_DIST) fakeroot' \ -d $(KDIR_TMP)/fakeroot-$(2) \ -M $(5) \ $(KDIR_TMP)/fakeroot-$(2).uImage @@ -746,7 +746,7 @@ define Image/Build/NetgearNAND dd if=$(KDIR_TMP)/$(2)-root.ubi \ ) > $(imageraw) $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(6) -v OpenWrt.$(REVISION) -r "$$r" $(8) \ + -B $(6) -v $(VERSION_DIST).$(REVISION) -r "$$r" $(8) \ -i $(imageraw) \ -o $(call imgname,ubi,$(2))-factory.img diff --git a/target/linux/ar71xx/image/senao.mk b/target/linux/ar71xx/image/senao.mk index dbb7b69f94..f400dfa2da 100644 --- a/target/linux/ar71xx/image/senao.mk +++ b/target/linux/ar71xx/image/senao.mk @@ -4,7 +4,7 @@ define Build/senao-factory-image mkdir -p $@.senao - touch $@.senao/FWINFO-OpenWrt-$(REVISION)-$(board) + touch $@.senao/FWINFO-$(VERSION_DIST)-$(REVISION)-$(board) $(CP) $(IMAGE_KERNEL) $@.senao/openwrt-senao-$(board)-uImage-lzma.bin $(CP) $(rootfs) $@.senao/openwrt-senao-$(board)-root.squashfs diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk index f21d0d7f79..1194478690 100644 --- a/target/linux/ar71xx/image/tp-link.mk +++ b/target/linux/ar71xx/image/tp-link.mk @@ -24,7 +24,7 @@ endef # -X reserve bytes in the firmware image (hexval prefixed with 0x) define Build/mktplinkfw -$(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N $(VERSION_DIST) -V $(REVISION) \ -m $(TPLINK_HEADER_VERSION) \ -k $(IMAGE_KERNEL) \ -r $@ \ @@ -39,7 +39,7 @@ define Build/uImageArcher mkimage -A $(LINUX_KARCH) \ -O linux -T kernel \ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new + -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $@ $@.new @mv $@.new $@ endef diff --git a/target/linux/ath25/image/Makefile b/target/linux/ath25/image/Makefile index 5144ed8a0a..5a20bdb644 100644 --- a/target/linux/ath25/image/Makefile +++ b/target/linux/ath25/image/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/image.mk define Build/mkfwimage $(STAGING_DIR_HOST)/bin/mkfwimage \ - -B $(1).OpenWrt.$(REVISION) \ + -B $(1).$(VERSION_DIST).$(REVISION) \ -k $(IMAGE_KERNEL) \ -r $(IMAGE_ROOTFS) \ -o $@.new && \ diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk index 4e90eb0504..99d479c732 100644 --- a/target/linux/brcm63xx/image/bcm63xx.mk +++ b/target/linux/brcm63xx/image/bcm63xx.mk @@ -978,7 +978,7 @@ define Device/NEUFBOX4-SER DEVICE_DTS := nb4-ser-r0 CFE_BOARD_ID := 96358VW CFE_CHIP_ID := 6358 - CFE_EXTRAS += --rsa-signature "OpenWrt-$(firstword $(subst -,$(space),$(REVISION)))" + CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))" DEVICE_PACKAGES := \ $(B43_PACKAGES) $(USB2_PACKAGES) endef @@ -990,7 +990,7 @@ define Device/NEUFBOX4-FXC DEVICE_DTS := nb4-fxc-r1 CFE_BOARD_ID := 96358VW CFE_CHIP_ID := 6358 - CFE_EXTRAS += --rsa-signature "OpenWrt-$(firstword $(subst -,$(space),$(REVISION)))" + CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))" DEVICE_PACKAGES := \ $(B43_PACKAGES) $(USB2_PACKAGES) endef @@ -1002,7 +1002,7 @@ define Device/NEUFBOX6 DEVICE_DTS := nb6-ser-r0 CFE_BOARD_ID := NB6-SER-r0 CFE_CHIP_ID := 6362 - CFE_EXTRAS += --rsa-signature "OpenWrt-$(firstword $(subst -,$(space),$(REVISION)))" + CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))" DEVICE_PACKAGES := \ $(B43_PACKAGES) $(USB2_PACKAGES) endef diff --git a/target/linux/cns3xxx/image/Makefile b/target/linux/cns3xxx/image/Makefile index 99bb7f1a22..d095ce11f4 100644 --- a/target/linux/cns3xxx/image/Makefile +++ b/target/linux/cns3xxx/image/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk define Image/Prepare - mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n 'OpenWrt Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage $(KDIR)/uImage + mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage $(KDIR)/uImage endef LEGACY_NOR_KERNEL_SIZE = 2048k @@ -27,7 +27,7 @@ define BuildFirmware/Legacy endef define Image/BuildKernel/Initramfs - mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n 'OpenWrt Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-initramfs-uImage + mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-initramfs-uImage endef define Image/Build diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 596c46110f..2c90163add 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -39,7 +39,7 @@ endef define Build/fullimage mkimage -A mips -O linux -C lzma -T filesystem -a 0x00 \ - -e 0x00 -n 'OpenWrt RootFS' \ + -e 0x00 -n '$(VERSION_DIST) RootFS' \ -d $(IMAGE_ROOTFS) $(IMAGE_ROOTFS).new cat $(IMAGE_KERNEL) $(IMAGE_ROOTFS).new > $@.tmp diff --git a/target/linux/mcs814x/image/Makefile b/target/linux/mcs814x/image/Makefile index 3afd660c14..ff905b3085 100644 --- a/target/linux/mcs814x/image/Makefile +++ b/target/linux/mcs814x/image/Makefile @@ -20,7 +20,7 @@ UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage define Image/Build/MkuImage mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) \ - -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' -d $(1) $(2); + -n 'ARM $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(1) $(2); endef define Image/Build/DTB diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index c70761b250..ddd037e305 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -118,7 +118,7 @@ endef # $(2), filename of image data # $(3), output filename define MkImage - $(eval imagename=$(if $(4),$(4),MIPS OpenWrt Linux-$(LINUX_VERSION))) + $(eval imagename=$(if $(4),$(4),MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION))) -mkimage -A mips -O linux -T kernel -C $(1) -a $(loadaddr-y) -e $(loadaddr-y) \ -n "$(imagename)" \ -d $(2) $(3) -- 2.30.2