ath79: add support for Buffalo BHR-4GRV
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Tue, 11 Sep 2018 11:50:35 +0000 (20:50 +0900)
committerMathias Kresin <dev@kresin.me>
Wed, 26 Sep 2018 18:35:07 +0000 (20:35 +0200)
Buffalo BHR-4GRV is a wired router, based on Atheros AR7242.

Specification:

- Atheros AR7242
- 64 MB of RAM
- 32 MB of Flash
  - 2x 16 MB SPI-NOR flash
- 5x 10/100/1000 Mbps Ethernet
- 3x LEDs, 2x keys
- 1x USB 2.0 Type-A
- UART header on PCB
  - JP1: Vcc, GND, TX, RX from reset button side

Flash instruction using factory image:

1. Boot the BHR-4GRV normaly and connect the computer to its LAN port
2. Access to
"http://192.168.11.1/cgi-bin/cgi?req=frm&frm=py-db/firmup.html"
with user "bufpy" and password "otdpopy"
3. Select the OpenWrt factory image and click "OK" button to perform
firmware upgrade
4. Wait ~200 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts [new file with mode: 0644]
target/linux/ath79/image/generic.mk

index 54fbe7b35009ba69f20459aa7aa42fbc0047abe1..e608825fb8d1c48240de9fdd74f047bd5f82ff35 100755 (executable)
@@ -27,11 +27,7 @@ ath79_setup_interfaces()
        wd,mynet-wifi-rangeextender)
                ucidef_set_interface_lan "eth0"
                ;;
-       buffalo,wzr-hp-ag300h)
-               ucidef_set_interface_wan "eth1"
-               ucidef_add_switch "switch0" \
-                       "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
-               ;;
+       buffalo,bhr-4grv|\
        buffalo,wzr-hp-g450h)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
@@ -40,6 +36,11 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
                ;;
+       buffalo,wzr-hp-ag300h)
+               ucidef_set_interface_wan "eth1"
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
+               ;;
        dlink,dir-825-b1)
                ucidef_set_interface_wan "eth1"
                ucidef_add_switch "switch0" \
diff --git a/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts b/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts
new file mode 100644 (file)
index 0000000..7ce9f64
--- /dev/null
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7242_buffalo_wzr-bhr.dtsi"
+
+/ {
+       compatible = "buffalo,bhr-4grv", "qca,ar7242";
+       model = "Buffalo BHR-4GRV";
+};
+
+&sec_vpn {
+       label = "buffalo:orange:vpn";
+};
index 91325cf4d48a4fdf9b279a53080f8973ea84acd5..39f59524d91b3e6a9b50444559896ddd2c649a9d 100644 (file)
@@ -69,6 +69,19 @@ define Device/avm_fritz4020
 endef
 TARGET_DEVICES += avm_fritz4020
 
+define Device/buffalo_bhr-4grv
+  ATH_SOC := ar7242
+  DEVICE_TITLE := Buffalo BHR-4GRV
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
+  IMAGE_SIZE := 32256k
+  IMAGES += factory.bin tftp.bin
+  IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV
+  IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
+  SUPPORTED_DEVICES += wzr-hp-g450h
+endef
+TARGET_DEVICES += buffalo_bhr-4grv
+
 define Device/buffalo_wzr-hp-ag300h
   ATH_SOC := ar7161
   DEVICE_TITLE := Buffalo WZR-HP-AG300H