From e773f686c932fa4866fbb30178500e8c894c1ed4 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 27 Jul 2016 05:37:23 +0200
Subject: [PATCH] ar71xx-generic: fix BOARDNAME for UAP AC Lite

Caused by a broken backport.

Fixes #689
---
 .../0043-ar71xx-Rename-unifiac-to-unifiac-lite.patch  | 11 ++++++-----
 ...1xx-Add-support-for-Ubiquiti-UniFi-AP-AC-PRO.patch |  4 ++--
 ...erate-sysupgrade-images-for-OpenMesh-devices.patch |  2 +-
 ...nd-build-image-for-the-OpenMesh-MR1750-board.patch |  2 +-
 ...d-build-image-for-the-OpenMesh-OM5P-AC-board.patch |  2 +-
 .../openwrt/0084-ar71xx-add-GL-AR150-support.patch    |  2 +-
 ...71xx-add-support-for-TP-LINK-TL-WR842N-ND-v3.patch |  2 +-
 ...-Fix-TL-WR841N-v11-LEDs-use-separate-machine.patch |  2 +-
 8 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/patches/openwrt/0043-ar71xx-Rename-unifiac-to-unifiac-lite.patch b/patches/openwrt/0043-ar71xx-Rename-unifiac-to-unifiac-lite.patch
index cbd40637c..19579875d 100644
--- a/patches/openwrt/0043-ar71xx-Rename-unifiac-to-unifiac-lite.patch
+++ b/patches/openwrt/0043-ar71xx-Rename-unifiac-to-unifiac-lite.patch
@@ -143,7 +143,7 @@ index 94eff18..eac0240 100644
  define Profile/UBNTUNIFIOUTDOOR
  	NAME:=Ubiquiti UniFiAP Outdoor
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index dd59f2d..31aff78 100644
+index dd59f2d..3efa2e1 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -741,14 +741,19 @@ endef
@@ -156,14 +156,15 @@ index dd59f2d..31aff78 100644
    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 $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
-+endef
+-  BOARDNAME := UBNT-UF-AC
+ endef
+-TARGET_DEVICES += ubnt-unifiac
 +
 +define Device/ubnt-unifiac-lite
 +  $(Device/ubnt-unifiac)
 +  DEVICE_PROFILE := UBNT UBNTUNIFIACLITE
-   BOARDNAME := UBNT-UF-AC
- endef
--TARGET_DEVICES += ubnt-unifiac
++  BOARDNAME := UBNT-UF-AC-LITE
++endef
 +TARGET_DEVICES += ubnt-unifiac-lite
  
  rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
diff --git a/patches/openwrt/0044-ar71xx-Add-support-for-Ubiquiti-UniFi-AP-AC-PRO.patch b/patches/openwrt/0044-ar71xx-Add-support-for-Ubiquiti-UniFi-AP-AC-PRO.patch
index 30cf6d462..1f28d0f47 100644
--- a/patches/openwrt/0044-ar71xx-Add-support-for-Ubiquiti-UniFi-AP-AC-PRO.patch
+++ b/patches/openwrt/0044-ar71xx-Add-support-for-Ubiquiti-UniFi-AP-AC-PRO.patch
@@ -193,12 +193,12 @@ index eac0240..69b8398 100644
  	NAME:=Ubiquiti UniFiAP Outdoor
  	PACKAGES:=
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index 31aff78..916d4e2 100644
+index 3efa2e1..58118f2 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -753,7 +753,13 @@ define Device/ubnt-unifiac-lite
    DEVICE_PROFILE := UBNT UBNTUNIFIACLITE
-   BOARDNAME := UBNT-UF-AC
+   BOARDNAME := UBNT-UF-AC-LITE
  endef
 -TARGET_DEVICES += ubnt-unifiac-lite
 +
diff --git a/patches/openwrt/0045-ar71xx-Generate-sysupgrade-images-for-OpenMesh-devices.patch b/patches/openwrt/0045-ar71xx-Generate-sysupgrade-images-for-OpenMesh-devices.patch
index 6470646d4..4f3580f53 100644
--- a/patches/openwrt/0045-ar71xx-Generate-sysupgrade-images-for-OpenMesh-devices.patch
+++ b/patches/openwrt/0045-ar71xx-Generate-sysupgrade-images-for-OpenMesh-devices.patch
@@ -15,7 +15,7 @@ Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
 Forwarded: https://patchwork.ozlabs.org/patch/624172/
 
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index 916d4e2..f91e20e 100644
+index 58118f2..7aee0c8 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -1877,6 +1877,9 @@ define Image/Build/OpenMesh
diff --git a/patches/openwrt/0052-ar71xx-create-profile-and-build-image-for-the-OpenMesh-MR1750-board.patch b/patches/openwrt/0052-ar71xx-create-profile-and-build-image-for-the-OpenMesh-MR1750-board.patch
index 2a166e169..1a8460490 100644
--- a/patches/openwrt/0052-ar71xx-create-profile-and-build-image-for-the-OpenMesh-MR1750-board.patch
+++ b/patches/openwrt/0052-ar71xx-create-profile-and-build-image-for-the-OpenMesh-MR1750-board.patch
@@ -35,7 +35,7 @@ index 41b462e..06cf135 100644
  
  define Profile/OPENMESH/Description
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index f91e20e..b74aa45 100644
+index 7aee0c8..0ebb7dc 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -2045,6 +2045,7 @@ $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P))
diff --git a/patches/openwrt/0071-ar71xx-create-profile-and-build-image-for-the-OpenMesh-OM5P-AC-board.patch b/patches/openwrt/0071-ar71xx-create-profile-and-build-image-for-the-OpenMesh-OM5P-AC-board.patch
index ce03a85fb..170aba919 100644
--- a/patches/openwrt/0071-ar71xx-create-profile-and-build-image-for-the-OpenMesh-OM5P-AC-board.patch
+++ b/patches/openwrt/0071-ar71xx-create-profile-and-build-image-for-the-OpenMesh-OM5P-AC-board.patch
@@ -31,7 +31,7 @@ index 06cf135..64aaa24 100644
          NAME:=OpenMesh MR600
          PACKAGES:=kmod-ath9k om-watchdog
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index b74aa45..06dbb77 100644
+index 0ebb7dc..0cf1df1 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -2043,6 +2043,7 @@ $(eval $(call SingleProfile,Netgear,64kraw,WPN824N,wpn824n,WPN824N,ttyS0,115200,
diff --git a/patches/openwrt/0084-ar71xx-add-GL-AR150-support.patch b/patches/openwrt/0084-ar71xx-add-GL-AR150-support.patch
index d8787a521..bd6bf1aa9 100644
--- a/patches/openwrt/0084-ar71xx-add-GL-AR150-support.patch
+++ b/patches/openwrt/0084-ar71xx-add-GL-AR150-support.patch
@@ -261,7 +261,7 @@ index 0000000..a6ad661
 +
 +$(eval $(call Profile,GL-AR150))
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index 06dbb77..a35ded9 100644
+index 0cf1df1..b790610 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -144,6 +144,14 @@ define Device/weio
diff --git a/patches/openwrt/0109-ar71xx-add-support-for-TP-LINK-TL-WR842N-ND-v3.patch b/patches/openwrt/0109-ar71xx-add-support-for-TP-LINK-TL-WR842N-ND-v3.patch
index a90e23885..f4756c6fd 100644
--- a/patches/openwrt/0109-ar71xx-add-support-for-TP-LINK-TL-WR842N-ND-v3.patch
+++ b/patches/openwrt/0109-ar71xx-add-support-for-TP-LINK-TL-WR842N-ND-v3.patch
@@ -218,7 +218,7 @@ index 3e5c2a2..0209603 100644
 +MIPS_MACHINE(ATH79_MACH_TL_WR842N_V3, "TL-WR842N-v3", "TP-LINK TL-WR842N/ND v3",
 +	     tl_wr842n_v3_setup);
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index a35ded9..392dec4 100644
+index b790610..e074f8a 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -607,6 +607,13 @@ define Device/tl-wr842n-v2
diff --git a/patches/openwrt/0110-ar71xx-Fix-TL-WR841N-v11-LEDs-use-separate-machine.patch b/patches/openwrt/0110-ar71xx-Fix-TL-WR841N-v11-LEDs-use-separate-machine.patch
index f9d3772c7..73a7b1941 100644
--- a/patches/openwrt/0110-ar71xx-Fix-TL-WR841N-v11-LEDs-use-separate-machine.patch
+++ b/patches/openwrt/0110-ar71xx-Fix-TL-WR841N-v11-LEDs-use-separate-machine.patch
@@ -175,7 +175,7 @@ index 0209603..f806568 100644
  {
  	tl_ap143_setup();
 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
-index 392dec4..6d46c1e 100644
+index e074f8a..f99ea2b 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -595,7 +595,7 @@ endef
-- 
GitLab