Re: [LEDE-DEV] [PATCH v4] ramips: Add support for Sanlinking D240

2017-02-05 Thread Rafał Miłecki
On 4 February 2017 at 21:28, Kristian Evensen
 wrote:
> The Sanlinking Technologies D240
> (http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the 
> same
> device as the ZBT WE826, so adding support for it in LEDE is straight forward.
> The differences is that the D240 has two mini-PCIe slots (instead of one), 
> blue
> LEDs and supports PoE.
>
> Specification:
> * CPU: MT7620A
> * 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps.
> * 16 MB Flash.
> * 128 MB RAM.
> * 1x USB 2.0 port.
> * 2x mini-PCIe slots.
> * 2x SIM slots.
> * 1x 2.4Ghz WIFI.
> * 1x button.
>
> Wifi, USB, switch and both mini-PCIe slots are working. I have not been able 
> to
> test the SD card reader.
>
> The device comes pre-installed with an older version of OpenWRT, including 
> Luci.
> In order to install LEDE, you need to follow the existing procedure for 
> updating
> OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the 
> firmware
> using the sysupgrade-image. Remember to select that you do not want to keep
> existing settings. The default router address is 192.168.10.1 and
> username/password admin/root (at least on my devices).
>
> If you brick the device, the procedure for recovery is the same as for the
> WE826. Please see the wiki page for that device for instructions.
>
> v3->v4:
> * Fixed formatting of dts file (thanks Piotr Dymacz).
>
> v2->v3:
> * Rename Sanlinking-D240 to D240 in order to follow convention that board name
> should not contain manufacturer name (thanks Piotr Dymacz).
> * Add BSD license to DTS file (thanks Rafał Miłecki).
> * Add details on how to install LEDE on the router (thanks Mathias Kresin).
>
> v1->v2:
> * Misc. code cleanup (thanks Mathias Kresin)
>
> Signed-off-by: Kristian Evensen 
>
> blabla

Looks OK except for the "blabla" :D

John: can you drop that line when pushing the patch?

Thanks Kristian!

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v4] ramips: Add support for Sanlinking D240

2017-02-04 Thread Kristian Evensen
The Sanlinking Technologies D240
(http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the same
device as the ZBT WE826, so adding support for it in LEDE is straight forward.
The differences is that the D240 has two mini-PCIe slots (instead of one), blue
LEDs and supports PoE.

Specification:
* CPU: MT7620A
* 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps.
* 16 MB Flash.
* 128 MB RAM.
* 1x USB 2.0 port.
* 2x mini-PCIe slots.
* 2x SIM slots.
* 1x 2.4Ghz WIFI.
* 1x button.

Wifi, USB, switch and both mini-PCIe slots are working. I have not been able to
test the SD card reader.

The device comes pre-installed with an older version of OpenWRT, including Luci.
In order to install LEDE, you need to follow the existing procedure for updating
OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the firmware
using the sysupgrade-image. Remember to select that you do not want to keep
existing settings. The default router address is 192.168.10.1 and
username/password admin/root (at least on my devices).

If you brick the device, the procedure for recovery is the same as for the
WE826. Please see the wiki page for that device for instructions.

v3->v4:
* Fixed formatting of dts file (thanks Piotr Dymacz).

v2->v3:
* Rename Sanlinking-D240 to D240 in order to follow convention that board name
should not contain manufacturer name (thanks Piotr Dymacz).
* Add BSD license to DTS file (thanks Rafał Miłecki).
* Add details on how to install LEDE on the router (thanks Mathias Kresin).

v1->v2:
* Misc. code cleanup (thanks Mathias Kresin)

Signed-off-by: Kristian Evensen 

blabla
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   4 +
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/D240.dts   | 157 +
 target/linux/ramips/image/mt7620.mk|   8 ++
 7 files changed, 175 insertions(+)
 create mode 100644 target/linux/ramips/dts/D240.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 545d6a4..4e6eeb2 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -109,6 +109,10 @@ d105)
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
set_usb_led "$board:green:usb"
;;
+d240)
+   set_wifi_led "$board:blue:wifi"
+   set_usb_led "$board:blue:usb"
+   ;;
 db-wrt01)
ucidef_set_led_default "power" "power" "$board:orange:power" "1"
;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index c001dfe..3ef04e6 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -73,6 +73,7 @@ ramips_setup_interfaces()
3g-6200n|\
ac1200pro|\
ai-br100|\
+   d240|\
db-wrt01|\
dir-300-b7|\
dir-320-b1|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 5fb2213..744ff3c 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -108,6 +108,7 @@ get_status_led() {
w502u)
status_led="$board:blue:wps"
;;
+   d240|\
dap-1350|\
na930|\
pbr-m1|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index d9918cc..3072531 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -112,6 +112,9 @@ ramips_board_detect() {
*"D105")
name="d105"
;;
+   *"D240")
+   name="d240"
+   ;;
*"DAP-1350")
name="dap-1350"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index d83e5c1..acdfdaf 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -35,6 +35,7 @@ platform_check_image() {
cf-wr800n|\
cs-qr10|\
d105|\
+   d240|\
dap-1350|\
db-wrt01|\
dcs-930|\
diff --git a/target/linux/ramips/dts/D240.dts b/target/linux/ramips/dts/D240.dts
new file mode 100644
index 000..2f11ce9
--- /dev/null
+++ b/target/linux/ramips/dts/D240.dts
@@ -0,0 +1,157 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2017 Kristian Evensen .
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *