Re: [OpenWrt-Devel] [PATCH v5] ar71xx: Add Gainstrong MiniBox v1.0 support to trunk

2015-10-19 Thread Stijn Segers
Can someone pick this up please?

Patch was good to go, same for the 15.05 version.

Thank you!

Stijn

>From b9f1eb74cea4a654c3a31c97a5e94369b0a01849 Mon Sep 17 00:00:00 2001
From: Stijn Segers 
Date: Sat, 19 Sep 2015 02:19:10 +0200
Subject: [PATCH v5] ar71xx: Add Gainstrong MiniBox v1.0 support to trunk

This patch supersedes the v4 from September 17th.

Bumping the patch version - the MiniBox profile showed up under M, but
since it's called 'Gainstrong MiniBox v1.0' now it looks out of place.
Renamed the profile to gs-minibox-v1.mk to fix that.

The following patch adds support for the Gainstrong MiniBox into trunk
(or 'Designated Driver' :D ).

Fixed items:

- Inverted LED polarity (OOLITE seems to suffer from the same problem).
- Changed uppercase MINIBOX_V1_ prefix as requested.
- Prefixes are now gs_minibox_ similar to gs_oolite_ (same vendor).
- Mention the vendor (Gainstrong) in code headers.

Compiles fine, has been confirmed working by owners on 15.05.

Question: I've seen some boards use tools/firmware-utils/src/mktplinkfw.c,
the MiniBox images build fine without, so I'm wondering: do I need to add
it in there as well? Any added benefit?

Thank you

Signed-off by: Stijn Segers 

---
 target/linux/ar71xx/base-files/etc/diag.sh |  3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  6 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
 target/linux/ar71xx/config-4.1 |  1 +
 .../files/arch/mips/ath79/mach-gs-minibox-v1.c | 85 ++
 target/linux/ar71xx/generic/profiles/minibox-v1.mk | 17 +
 target/linux/ar71xx/image/Makefile |  9 +++
 .../799-MIPS-ath79-add-minibox-v1-support.patch| 39 ++
 9 files changed, 162 insertions(+)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c
 create mode 100644 target/linux/ar71xx/generic/profiles/minibox-v1.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index cfba6b4..2732994 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -225,6 +225,9 @@ get_status_led() {
smart-300)
status_led="nc-link:green:system"
;;
+   minibox-v1)
+   status_led="minibox-v1:green:system"
+   ;;
oolite)
status_led="oolite:red:system"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 880953c..a93a9ad 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -433,6 +433,7 @@ dir-615-e4 |\
 hiwifi-hc6361 |\
 ja76pf |\
 mc-mac1200r|\
+minibox-v1 |\
 mynet-n600 |\
 oolite |\
 qihoo-c301 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index efb3d16..edaad73 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -119,6 +119,9 @@ tplink_board_detect() {
"3C0001"*)
model="OOLITE"
;;
+   "3C0002"*)
+   model="MINIBOX_V1"
+   ;;
"070300"*)
model="TP-Link TL-WR703N"
;;
@@ -514,6 +517,9 @@ ar71xx_board_detect() {
*"MAC1200R")
name="mc-mac1200r"
;;
+   *"MiniBox V1.0")
+   name="minibox-v1"
+   ;;
*MR12)
name="mr12"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index cad8b43..043b6ed 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -317,6 +317,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   minibox-v1 |\
onion-omega | \
oolite | \
smart-300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 51f2f2f..883d0d7 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -75,6 +75,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_INET=y
+CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
 CONFIG_ATH79_MACH_HIWIFI_HC6361=y
 CONFIG_ATH79_MACH_HORNET_UB=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c
new file mode 100644
index 000..47eeb65
--- /dev/null
+++ 

[OpenWrt-Devel] [PATCH v5] ar71xx: Add Gainstrong MiniBox v1.0 support to trunk

2015-09-20 Thread Stijn Segers
This patch supersedes the v1 from September 17th.

Bumping the patch version - the MiniBox profile showed up under M, but
since it's called 'Gainstrong MiniBox v1.0' now it looks out of place.
Renamed the profile to gs-minibox-v1.mk to fix that.

The following patch adds support for the Gainstrong MiniBox into trunk
(or 'Designated Driver' :D ).

Fixed items:

- Inverted LED polarity (OOLITE seems to suffer from the same problem).
- Changed uppercase MINIBOX_V1_ prefix as requested.
- Prefixes are now gs_minibox_ similar to gs_oolite_ (same vendor).
- Mention the vendor (Gainstrong) in code headers.

Compiles fine, has been confirmed working by owners on 15.05.

Question: I've seen some boards use tools/firmware-utils/src/mktplinkfw.c,
the MiniBox images build fine without, so I'm wondering: do I need to add
it in there as well? Any added benefit?

Thank you

Signed-off by: Stijn Segers 

---
 target/linux/ar71xx/base-files/etc/diag.sh |  3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  6 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
 target/linux/ar71xx/config-4.1 |  1 +
 .../files/arch/mips/ath79/mach-gs-minibox-v1.c | 85 ++
 target/linux/ar71xx/generic/profiles/minibox-v1.mk | 17 +
 target/linux/ar71xx/image/Makefile |  9 +++
 .../799-MIPS-ath79-add-minibox-v1-support.patch| 39 ++
 9 files changed, 162 insertions(+)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c
 create mode 100644 target/linux/ar71xx/generic/profiles/minibox-v1.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index cfba6b4..2732994 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -225,6 +225,9 @@ get_status_led() {
smart-300)
status_led="nc-link:green:system"
;;
+   minibox-v1)
+   status_led="minibox-v1:green:system"
+   ;;
oolite)
status_led="oolite:red:system"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 880953c..a93a9ad 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -433,6 +433,7 @@ dir-615-e4 |\
 hiwifi-hc6361 |\
 ja76pf |\
 mc-mac1200r|\
+minibox-v1 |\
 mynet-n600 |\
 oolite |\
 qihoo-c301 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index efb3d16..edaad73 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -119,6 +119,9 @@ tplink_board_detect() {
"3C0001"*)
model="OOLITE"
;;
+   "3C0002"*)
+   model="MINIBOX_V1"
+   ;;
"070300"*)
model="TP-Link TL-WR703N"
;;
@@ -514,6 +517,9 @@ ar71xx_board_detect() {
*"MAC1200R")
name="mc-mac1200r"
;;
+   *"MiniBox V1.0")
+   name="minibox-v1"
+   ;;
*MR12)
name="mr12"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index cad8b43..043b6ed 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -317,6 +317,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   minibox-v1 |\
onion-omega | \
oolite | \
smart-300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 51f2f2f..883d0d7 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -75,6 +75,7 @@ CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_GL_INET=y
+CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
 CONFIG_ATH79_MACH_HIWIFI_HC6361=y
 CONFIG_ATH79_MACH_HORNET_UB=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c
new file mode 100644
index 000..47eeb65
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gs-minibox-v1.c
@@ -0,0 +1,85 @@
+/*
+ *  Gainstrong MiniBox V1.0 board support
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include 
+