ar71xx: image: use simply expanded variables
[openwrt/openwrt.git] / target / linux / ar71xx / image / ubnt.mk
index 84eaaaa9652d8d1799a466752a358988d8fd3553..8b4b068925f8aa42ab03c2d0e84dd582d928ee14 100644 (file)
@@ -1,12 +1,10 @@
-# UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
-# UBNT_TYPE e.g. one of (BZ, XM, XW)
-# UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
+DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
 
 # mkubntimage is using the kernel image direct
 # routerboard creates partitions out of the ubnt header
 define Build/mkubntimage
        -$(STAGING_DIR_HOST)/bin/mkfwimage \
-               -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-OpenWrt-$(REVISION) \
+               -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
                -k $(IMAGE_KERNEL) \
                -r $@ \
                -o $@
@@ -19,7 +17,7 @@ define Build/mkubntimage-split
        dd if=$@ of=$@.old1 bs=1024k count=1; \
        dd if=$@ of=$@.old2 bs=1024k skip=1; \
        $(STAGING_DIR_HOST)/bin/mkfwimage \
-               -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-OpenWrt-$(REVISION) \
+               -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
                -k $@.old1 \
                -r $@.old2 \
                -o $@; \
@@ -28,13 +26,12 @@ endef
 
 define Build/mkubntimage2
        -$(STAGING_DIR_HOST)/bin/mkfwimage2 -f 0x9f000000 \
-               -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-OpenWrt-$(REVISION) \
+               -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
                -p jffs2:0x50000:0xf60000:0:0:$@ \
                -o $@.new
        @mv $@.new $@
 endef
 
-DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
 
 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
 # UBNT_TYPE e.g. one of (BZ, XM, XW)
@@ -43,48 +40,48 @@ define Device/ubnt-xm
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
   DEVICE_PROFILE := UBNT
   IMAGE_SIZE := 7552k
-  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
+  MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
   UBNT_TYPE := XM
   UBNT_BOARD := XM
   UBNT_CHIP := ar7240
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage-split
-  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
 
 define Device/ubnt-xw
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
   DEVICE_PROFILE := UBNT
   IMAGE_SIZE := 7552k
-  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
+  MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
   UBNT_TYPE := XW
   UBNT_BOARD := XM
   UBNT_CHIP := ar934x
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage-split
-  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
 
 define Device/ubnt-bz
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
   DEVICE_PROFILE := UBNT
   IMAGE_SIZE := 7552k
-  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
+  MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
   UBNT_TYPE := BZ
   UBNT_BOARD := XM
   UBNT_CHIP := ar934x
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage-split
-  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
 
 define Device/ubnt-unifiac
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
   DEVICE_PROFILE := UBNT
   IMAGE_SIZE := 7744k
-  MTDPARTS = spi0.0:384k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),7744k(ubnt-airos)ro,128k(bs)ro,256k(cfg)ro,64k(EEPROM)ro
+  MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),7744k(ubnt-airos)ro,128k(bs)ro,256k(cfg)ro,64k(EEPROM)ro
   IMAGES := sysupgrade.bin
-  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
 endef
 
 define Device/rw2458n
@@ -141,7 +138,7 @@ endef
 define Device/ubnt-unifiac-pro
   $(Device/ubnt-unifiac)
   DEVICE_TITLE := Ubiquiti UniFi AC-Pro
-  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x kmod-usb-core kmod-usb-ohci kmod-usb2
+  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x kmod-usb-core kmod-usb2
   DEVICE_PROFILE := UBNT UBNTUNIFIACPRO
   BOARDNAME := UBNT-UF-AC-PRO
 endef
@@ -188,7 +185,7 @@ define Device/ubnt-air-gateway
   UBNT_BOARD := XM
   UBNT_TYPE := AirGW
   UBNT_CHIP := ar933x
-  CONSOLE = ttyATH0,115200
+  CONSOLE := ttyATH0,115200
 endef
 TARGET_DEVICES += ubnt-air-gateway
 
@@ -210,7 +207,6 @@ define Device/ubdev01
   UBNT_TYPE := XM
   UBNT_CHIP := ar7240
 endef
-
 TARGET_DEVICES += ubdev01
 
 define Device/ubnt-routerstation
@@ -218,8 +214,8 @@ define Device/ubnt-routerstation
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
   IMAGE_SIZE := 16128k
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/factory.bin = append-rootfs | pad-rootfs | mkubntimage
-  IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage
+  IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE)
   KERNEL := kernel-bin | patch-cmdline | lzma | pad-to $$(BLOCKSIZE)
 endef
 
@@ -252,7 +248,6 @@ define Device/ubnt-ls-sr71
   UBNT_TYPE := LS-SR71
   UBNT_CHIP := ar7100
 endef
-
 TARGET_DEVICES += ubnt-rs ubnt-rspro ubnt-ls-sr71
 
 define Device/ubnt-uap-pro
@@ -266,8 +261,8 @@ define Device/ubnt-uap-pro
   DEVICE_PROFILE := UBNT UAPPRO
   KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 kernel0
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
-  IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage2
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2
 endef
 
 define Device/ubnt-unifi-outdoor-plus
@@ -277,5 +272,4 @@ define Device/ubnt-unifi-outdoor-plus
   BOARDNAME := UBNT-UOP
   DEVICE_PROFILE := UBNT
 endef
-
 TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus