aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7620
diff options
context:
space:
mode:
authorDavid Yang <mmyangfl@gmail.com>2021-06-09 00:53:27 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2022-08-06 19:58:46 +0200
commitb00a02aaa0fff867acfe02229f39bc47158f0874 (patch)
tree1091248d80c7fdff4715fbbfd630cf47dfed05fa /target/linux/ramips/mt7620
parent45255aa0e870f09eac3954ad0df5a88f13d25ea9 (diff)
downloadupstream-b00a02aaa0fff867acfe02229f39bc47158f0874.tar.gz
upstream-b00a02aaa0fff867acfe02229f39bc47158f0874.tar.bz2
upstream-b00a02aaa0fff867acfe02229f39bc47158f0874.zip
ramips: add support for Netgear PR2000
This patch adds support for Netgear PR2000, sold as "Travel Router and Range Extender". Specifications: -------------- * SoC: Mediatek MT7620N * RAM: 64MB DDR2 * Flash: 16MB SPI NOR flash (Macronix MX25L12805D) * WiFi 2.4GHz: builtin * Ethernet: builtin * LED: Power, Internet, WiFi, USB * Buttons: Reset (GPIO 1/2) * UART: Serial console (57600 8n1) * USB: 1 x USB2 SPECIAL NOTES: ------------- Problem: WiFi is super weak, but SSID beacons seems to be right. Solve: Change 36h in factory partition (namely 0xf60036) to be 0x0. Explain: Clearly Netgear have different ideas on how EEPROM is used. Bit 2 of 36h indicates the presence of External LNA for 11g (2.4 GHz) band, which seems to be incorrectly set by Netgear (originally 0x04). Lifting it solves the problem of weak RX signal. Installation: ------------ There are two possible ways to install the firmware. Flashing via web interface of original firmware is not tested due to a broken firmware. 1) Open the shell and use a UART2USB convert to gain TTY access (TP7: RXD, TP9: TXD, TP10: GND). Please notice you have to remove resistance R54 next to TP7 otherwise you won't be able to input anything. 2) Use well-known Netgear debug switch. Access http://192.168.168.1/setup.cgi?todo=debug to start telnet service (username: root, password: <none>). Please back up firmware if you want to go back to the original. After you can control the device, flash the firmware as usual. Here are some hints for that. Option 1 (via nmrpflash): 1) Download nmrpflash from https://github.com/jclehner/nmrpflash 2) Use *-factory.img and flash: nmrpflash -L nmrpflash -i net* -f <your-firmware-name> 3) Turn off then turn on the device, wait it finishing flash. Option 2 (replacing u-boot via breed): 1) Download breed-mt7620-reset1.bin from https://breed.hackpascal.net/ 2) Setup HTTP server on your computer, for example: python3 -m http.server You can skip this step if your breed is already accessible from HTTP, since the original wget does not support HTTPS. 3) Connect to the route and flash breed: cd /tmp wget http://<your-computer-host>/breed-mt7620-reset1.bin dd if=breed-mt7620-reset1.bin of=/dev/mtdblock0 bs=64k 4) Reboot. Hold reset key or press any key in TTY to enter breed. 5) Access breed web interface (http://192.168.1.1/). Choose memory layout to be 0x40000 and flash new firmware. Remark: ------ As a "Range Extender", it has a switch to switch between Wired mode (GPIO 21 low) and Wireless mode (GPIO 20 low), which is not implemented in this patch. However, the router will be turned off when it switches to the middle, which makes this switch much less useful. MAC addresses: ------------- The OEM firmware uses one single MAC for all interfaces, located at 0xf700b0. Signed-off-by: David Yang <mmyangfl@gmail.com>
Diffstat (limited to 'target/linux/ramips/mt7620')
-rw-r--r--target/linux/ramips/mt7620/base-files/etc/board.d/01_leds3
-rw-r--r--target/linux/ramips/mt7620/base-files/etc/board.d/02_network1
2 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index 1293c34cbf..889818c631 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -177,6 +177,9 @@ netgear,jwnr2010-v5)
ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x01"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
;;
+netgear,pr2000)
+ ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
+ ;;
phicomm,psg1208)
ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0"
;;
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index f7bc41669f..7b1766766b 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -202,6 +202,7 @@ ramips_setup_interfaces()
ucidef_add_switch "switch1" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;;
+ netgear,pr2000|\
nexx,wt3020-4m|\
nexx,wt3020-8m)
ucidef_add_switch "switch0" \