[source] ar71xx: add userspace support for D-Link DIR-869 A1, generate images

LEDE Commits lede-commits at lists.infradead.org
Tue Oct 11 14:00:39 PDT 2016


neoraider pushed a commit to source.git, branch master:
https://git.lede-project.org/5abeba3450f0ca436a8e83089a0031fd279fc569

commit 5abeba3450f0ca436a8e83089a0031fd279fc569
Author: Florian Beier <beier.florian at gmail.com>
AuthorDate: Tue Oct 11 20:32:26 2016 +0200

    ar71xx: add userspace support for D-Link DIR-869 A1, generate images
    
    Signed-off-by: Florian Beier <beier.florian at gmail.com>
    [Matthias Schiffer: fix factory image, improve commit message]
    Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 target/linux/ar71xx/base-files/etc/board.d/02_network    |  2 ++
 target/linux/ar71xx/base-files/etc/diag.sh               |  3 +++
 .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata  |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh             |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh   |  1 +
 target/linux/ar71xx/image/generic.mk                     | 16 +++++++++++++++-
 6 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index a2bd6b1..4ef43cf 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -285,6 +285,7 @@ ar71xx_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0:lan" "1:lan" "3 at eth1"
 		;;
+	dir-869-a1|\
 	epg5000|\
 	esr1750)
 		ucidef_add_switch "switch0" \
@@ -434,6 +435,7 @@ ar71xx_setup_macs()
 	esr900)
 		wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
 		;;
+	dir-869-a1|\
 	mynet-n750)
 		wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
 		;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d6e257d..d5ddb51 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -110,6 +110,9 @@ get_status_led() {
 	dir-835-a1)
 		status_led="d-link:amber:power"
 		;;
+	dir-869-a1)
+		status_led="d-link:white:status"
+		;;
 	dlan-hotspot)
 		status_led="devolo:green:wifi"
 		;;
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 0e93feb..a0a111b 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -62,6 +62,7 @@ case "$FIRMWARE" in
 		ath10kcal_extract "caldata" 20480 2116
 		ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2)
 		;;
+	dir-869-a1 | \
 	qihoo-c301)
 		ath10kcal_extract "radiocfg" 20480 2116
 		ath10kcal_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index dae6fb2..a8ea7d4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -536,6 +536,9 @@ ar71xx_board_detect() {
 	*"DIR-835 rev. A1")
 		name="dir-835-a1"
 		;;
+	*"DIR-869 rev. A1")
+		name="dir-869-a1"
+		;;
 	*"dLAN Hotspot")
 		name="dlan-hotspot"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 559f97d..010442c 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -453,6 +453,7 @@ platform_check_image() {
 		merakinand_do_platform_check $board $1
 		return $?
 		;;
+	dir-869-a1|\
 	mynet-n600|\
 	mynet-n750|\
 	qihoo-c301)
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index c96a992..c2a2577 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -505,6 +505,20 @@ define Device/seama
   DEVICE_VARS += SEAMA_SIGNATURE
 endef
 
+define Device/dir-869-a1
+$(Device/seama)
+  DEVICE_TITLE := D-Link DIR-869 rev. A1
+  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
+  BOARDNAME = DIR-869-A1
+  IMAGE_SIZE = 15872k
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
+  SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
+  IMAGE/factory.bin := \
+	$$(IMAGE/default) | pad-rootfs -x 64 | \
+	seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
+	check-size $$$$(IMAGE_SIZE)
+endef
+
 define Device/mynet-n600
 $(Device/seama)
   DEVICE_TITLE := Western Digital My Net N600
@@ -535,4 +549,4 @@ $(Device/seama)
   SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
 endef
 
-TARGET_DEVICES += mynet-n600 mynet-n750 qihoo-c301
+TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 qihoo-c301



More information about the lede-commits mailing list