ar71xx: image: simplify Ubiquiti devices definitions

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This commit is contained in:
Piotr Dymacz 2017-06-10 18:57:56 +02:00
parent 01aa23acf7
commit 636ae9e9a0

View file

@ -36,52 +36,34 @@ endef
# UBNT_BOARD e.g. one of (XS2, XS5, RS, XM) # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
# UBNT_TYPE e.g. one of (BZ, XM, XW) # UBNT_TYPE e.g. one of (BZ, XM, XW)
# UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x) # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
define Device/ubnt-xm define Device/ubnt
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
DEVICE_PROFILE := UBNT DEVICE_PROFILE := UBNT
IMAGE_SIZE := 7552k 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_BOARD := XM
UBNT_CHIP := ar7240
IMAGES := sysupgrade.bin factory.bin IMAGES := sysupgrade.bin factory.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)
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
endef endef
define Device/ubnt-xm
$(Device/ubnt)
DEVICE_PACKAGES += kmod-usb-ohci
UBNT_TYPE := XM
UBNT_CHIP := ar7240
endef
define Device/ubnt-xw define Device/ubnt-xw
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 $(Device/ubnt)
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
UBNT_TYPE := XW UBNT_TYPE := XW
UBNT_BOARD := XM
UBNT_CHIP := ar934x UBNT_CHIP := ar934x
IMAGES := sysupgrade.bin factory.bin
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 endef
define Device/ubnt-bz define Device/ubnt-bz
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 $(Device/ubnt)
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
UBNT_TYPE := BZ UBNT_TYPE := BZ
UBNT_BOARD := XM
UBNT_CHIP := ar934x UBNT_CHIP := ar934x
IMAGES := sysupgrade.bin factory.bin
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-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
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
endef endef
define Device/rw2458n define Device/rw2458n
@ -119,14 +101,23 @@ define Device/ubnt-unifi
$(Device/ubnt-bz) $(Device/ubnt-bz)
DEVICE_TITLE := Ubiquiti UniFi DEVICE_TITLE := Ubiquiti UniFi
BOARDNAME := UBNT-UF BOARDNAME := UBNT-UF
DEVICE_PROFILE := UBNT UBNTUNIFI DEVICE_PROFILE += UBNTUNIFI
endef
define Device/ubnt-unifiac
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
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
endef endef
define Device/ubnt-unifiac-lite define Device/ubnt-unifiac-lite
$(Device/ubnt-unifiac) $(Device/ubnt-unifiac)
DEVICE_TITLE := Ubiquiti UniFi AC-Lite DEVICE_TITLE := Ubiquiti UniFi AC-Lite
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
DEVICE_PROFILE := UBNT UBNTUNIFIACLITE DEVICE_PROFILE += UBNTUNIFIACLITE
BOARDNAME := UBNT-UF-AC-LITE BOARDNAME := UBNT-UF-AC-LITE
endef endef
@ -138,8 +129,8 @@ endef
define Device/ubnt-unifiac-pro define Device/ubnt-unifiac-pro
$(Device/ubnt-unifiac) $(Device/ubnt-unifiac)
DEVICE_TITLE := Ubiquiti UniFi AC-Pro DEVICE_TITLE := Ubiquiti UniFi AC-Pro
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x kmod-usb-core kmod-usb2 DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
DEVICE_PROFILE := UBNT UBNTUNIFIACPRO DEVICE_PROFILE += UBNTUNIFIACPRO
BOARDNAME := UBNT-UF-AC-PRO BOARDNAME := UBNT-UF-AC-PRO
endef endef
@ -147,7 +138,7 @@ define Device/ubnt-unifi-outdoor
$(Device/ubnt-bz) $(Device/ubnt-bz)
DEVICE_TITLE := Ubiquiti UniFi Outdoor DEVICE_TITLE := Ubiquiti UniFi Outdoor
BOARDNAME := UBNT-U20 BOARDNAME := UBNT-U20
DEVICE_PROFILE := UBNT UBNTUNIFIOUTDOOR DEVICE_PROFILE += UBNTUNIFIOUTDOOR
endef endef
TARGET_DEVICES += ubnt-unifi ubnt-unifiac-lite ubnt-unifiac-mesh ubnt-unifiac-pro ubnt-unifi-outdoor TARGET_DEVICES += ubnt-unifi ubnt-unifiac-lite ubnt-unifiac-mesh ubnt-unifiac-pro ubnt-unifi-outdoor
@ -174,7 +165,6 @@ define Device/ubnt-rocket-m-ti
DEVICE_TITLE := Ubiquiti Rocket M TI DEVICE_TITLE := Ubiquiti Rocket M TI
BOARDNAME := UBNT-RM-TI BOARDNAME := UBNT-RM-TI
UBNT_TYPE := TI UBNT_TYPE := TI
UBNT_BOARD := XM
endef endef
TARGET_DEVICES += ubnt-nano-m-xw ubnt-loco-m-xw ubnt-rocket-m-xw ubnt-rocket-m-ti TARGET_DEVICES += ubnt-nano-m-xw ubnt-loco-m-xw ubnt-rocket-m-xw ubnt-rocket-m-ti
@ -182,12 +172,10 @@ define Device/ubnt-air-gateway
$(Device/ubnt-xm) $(Device/ubnt-xm)
DEVICE_TITLE := Ubiquiti Air Gateway DEVICE_TITLE := Ubiquiti Air Gateway
BOARDNAME := UBNT-AGW BOARDNAME := UBNT-AGW
UBNT_BOARD := XM
UBNT_TYPE := AirGW UBNT_TYPE := AirGW
UBNT_CHIP := ar933x UBNT_CHIP := ar933x
CONSOLE := ttyATH0,115200 CONSOLE := ttyATH0,115200
endef endef
TARGET_DEVICES += ubnt-air-gateway
define Device/ubnt-air-gateway-pro define Device/ubnt-air-gateway-pro
$(Device/ubnt-xm) $(Device/ubnt-xm)
@ -196,7 +184,6 @@ define Device/ubnt-air-gateway-pro
UBNT_TYPE := AirGWP UBNT_TYPE := AirGWP
UBNT_CHIP := ar934x UBNT_CHIP := ar934x
endef endef
TARGET_DEVICES += ubnt-air-gateway-pro
define Device/ubdev01 define Device/ubdev01
$(Device/ubnt-xm) $(Device/ubnt-xm)
@ -204,14 +191,12 @@ define Device/ubdev01
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7488k(firmware),64k(certs),256k(cfg)ro,64k(EEPROM)ro MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7488k(firmware),64k(certs),256k(cfg)ro,64k(EEPROM)ro
BOARDNAME := UBNT-UF BOARDNAME := UBNT-UF
UBNT_BOARD := UBDEV01 UBNT_BOARD := UBDEV01
UBNT_TYPE := XM
UBNT_CHIP := ar7240
endef endef
TARGET_DEVICES += ubdev01 TARGET_DEVICES += ubnt-air-gateway ubnt-air-gateway-pro ubdev01
define Device/ubnt-routerstation define Device/ubnt-routerstation
DEVICE_TITLE := Ubiquiti RouterStation
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
DEVICE_PROFILE := UBNT
IMAGE_SIZE := 16128k IMAGE_SIZE := 16128k
IMAGES := sysupgrade.bin factory.bin IMAGES := sysupgrade.bin factory.bin
IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage
@ -223,7 +208,7 @@ define Device/ubnt-rs
$(Device/ubnt-routerstation) $(Device/ubnt-routerstation)
DEVICE_TITLE := Ubiquiti RouterStation DEVICE_TITLE := Ubiquiti RouterStation
BOARDNAME := UBNT-RS BOARDNAME := UBNT-RS
DEVICE_PROFILE := UBNT UBNTRS DEVICE_PROFILE += UBNTRS
UBNT_BOARD := RS UBNT_BOARD := RS
UBNT_TYPE := RSx UBNT_TYPE := RSx
UBNT_CHIP := ar7100 UBNT_CHIP := ar7100
@ -233,7 +218,7 @@ define Device/ubnt-rspro
$(Device/ubnt-routerstation) $(Device/ubnt-routerstation)
DEVICE_TITLE := Ubiquiti RouterStation Pro DEVICE_TITLE := Ubiquiti RouterStation Pro
BOARDNAME := UBNT-RSPRO BOARDNAME := UBNT-RSPRO
DEVICE_PROFILE := UBNT UBNTRSPRO DEVICE_PROFILE += UBNTRSPRO
UBNT_BOARD := RSPRO UBNT_BOARD := RSPRO
UBNT_TYPE := RSPRO UBNT_TYPE := RSPRO
UBNT_CHIP := ar7100pro UBNT_CHIP := ar7100pro
@ -243,7 +228,6 @@ define Device/ubnt-ls-sr71
$(Device/ubnt-routerstation) $(Device/ubnt-routerstation)
DEVICE_TITLE := Ubiquiti LS-SR71 DEVICE_TITLE := Ubiquiti LS-SR71
BOARDNAME := UBNT-LS-SR71 BOARDNAME := UBNT-LS-SR71
DEVICE_PROFILE := UBNT
UBNT_BOARD := LS-SR71 UBNT_BOARD := LS-SR71
UBNT_TYPE := LS-SR71 UBNT_TYPE := LS-SR71
UBNT_CHIP := ar7100 UBNT_CHIP := ar7100