ath79: add support for ON Networks N150R
authorZoltan HERPAI <wigyori@uid0.hu>
Wed, 20 Jun 2018 14:21:08 +0000 (16:21 +0200)
committerJohn Crispin <john@phrozen.org>
Tue, 26 Jun 2018 05:05:44 +0000 (07:05 +0200)
This is a rebranded Netgear WNR612v2, specs are the same.

 - Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
target/linux/ath79/base-files/etc/board.d/01_leds
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/dts/ar7240_on_n150r.dts [new file with mode: 0644]
target/linux/ath79/image/tiny-netgear.mk

index 68f94ed3c30f5b249c16606828d265ac8c890e6d..29416ad83ea7ce89f23bc065338ac98f41d5b640 100755 (executable)
@@ -22,7 +22,8 @@ case "$board" in
        ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
        ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
        ;;
-"netgear,wnr612-v2")
+"netgear,wnr612-v2"|\
+"on,n150r")
        ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
        ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
index 2caf443fe8bc649db6b70d474888dd5fd63fca89..743b877aba92d8184cdf1cb77452eb34fb7e1eb2 100755 (executable)
@@ -33,7 +33,8 @@ ath79_setup_interfaces()
                ucidef_set_interfaces_lan_wan "eth1" "eth0"
                ;;
 
-       "netgear,wnr612-v2")
+       "netgear,wnr612-v2"|\
+       "on,n150r")
                ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
                ucidef_add_switch "switch0" \
                "0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4"
index 1ed74608c87046751d6064f0f4bb1440b650eb61..5b22b1544f8189e50f6bce3e95bcd4b5c9884749 100644 (file)
@@ -55,6 +55,7 @@ case "$FIRMWARE" in
                ath9k_eeprom_extract "art" 20480 1088
                ;;
        "netgear,wnr612-v2"|\
+       "on,n150r"|\
        "tplink,tl-wr740n-v2"|\
        "ubnt,unifi")
                ath9k_eeprom_extract "art" 4096 2048
diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts b/target/linux/ath79/dts/ar7240_on_n150r.dts
new file mode 100644 (file)
index 0000000..cb4cf92
--- /dev/null
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_netgear_wnr612-v2.dtsi"
+
+/ {
+       model = "ON Network N150R";
+       compatible = "on,n150r";
+};
+
index 81f83fd0737c6d15ff40206e6d82ffc99ed1575a..48d14e9e2e7300f3e6e507c17725686e60c7b661 100644 (file)
@@ -17,3 +17,20 @@ define Device/netgear_wnr612-v2
   SUPPORTED_DEVICES := netgear,wnr612-v2 wnr612-v2
 endef
 TARGET_DEVICES += netgear_wnr612-v2
+
+define Device/n150r
+  ATH_SOC := ar7240
+  DEVICE_TITLE := ON Network N150R
+  DEVICE_DTS := ar7240_on_n150r
+  NETGEAR_KERNEL_MAGIC := 0x32303631
+  KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
+  NETGEAR_BOARD_ID := N150R
+  IMAGE_SIZE := 3904k
+  IMAGES := sysupgrade.bin factory.img
+  IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
+  SUPPORTED_DEVICES := on,n150r n150r
+endef
+TARGET_DEVICES += n150r