summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2023-07-15 18:10:31 +0200
committerDavid Bauer <mail@david-bauer.net>2023-07-21 20:28:13 +0200
commitf0445746f6fd96fc7c5394b238153bd2ff22bc5b (patch)
treebc803eaf0acb0265e199e6a7c8ca869f53ef4a72 /scripts
parent548c437f7ddfabc54ce8857a847be77c6235c2d0 (diff)
downloadopenwrt-f0445746f6fd96fc7c5394b238153bd2ff22bc5b.tar.gz
openwrt-f0445746f6fd96fc7c5394b238153bd2ff22bc5b.tar.bz2
openwrt-f0445746f6fd96fc7c5394b238153bd2ff22bc5b.zip
mediatek: add support for ZyXEL NWA50AX Pro
Hardware -------- CPU: Mediatek MT7981 RAM: 512M DDR4 FLASH: 256M NAND ETH: MaxLinear GPY211 (2.5GbE N Base-T) WiFi: Mediatek MT7981 (2.4GHz 2T2R:2 5GHz 3T3R:2 802.11ax) BTN: 1x Reset LED: 1x Multi-Color UART Console ------------ Available below the rubber cover next to the ethernet port. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. In case this is not the case, OpenWrt will boot only one time, returning to the ZyXEL firmware the second boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP / Recovery ---------------------------- This installation routine is especially useful in case of a bricked device. Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to nwa50axpro-openwrt-initramfs.bin. $ atnf nwa50axpro-openwrt-initramfs.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; setenv fdt_high 0xffffffffffffffff; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd9 get-status $ zyxel-bootconfig /dev/mtd9 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd9 set-active-image 0 Copy the OpenWrt sysupgrade image to the device using scp. Write the sysupgrade image to NAND using sysupgrade. $ sysupgrade -n image.bin Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkits-zyxel-fit-filogic.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/mkits-zyxel-fit-filogic.sh b/scripts/mkits-zyxel-fit-filogic.sh
new file mode 100755
index 0000000000..319e187f5a
--- /dev/null
+++ b/scripts/mkits-zyxel-fit-filogic.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+#
+# Licensed under the terms of the GNU GPL License version 2 or later.
+# Author: David Bauer <mail@david-bauer.net>, based on mkits-zyxel-factory.sh.
+
+usage() {
+ echo "Usage: `basename $0` output file compat-models"
+ exit 1
+}
+
+# We need at least 3 arguments
+[ "$#" -lt 3 ] && usage
+
+# Target output file
+OUTPUT="$1"; shift
+FILE="$1"; shift
+MODELS="$1"; shift
+
+# Create a default, fully populated DTS file
+echo "\
+/dts-v1/;
+
+/ {
+ timestamp = <0x684090B4>;
+ description = \"Zyxel FIT (Flattened Image Tree)\";
+ compat-models = [${MODELS}];
+ fw_version = \"9.99(###.1)\";
+ #address-cells = <1>;
+
+ images {
+ ubi {
+ data = /incbin/(\"${FILE}\");
+ type = \"firmware\";
+ compression = \"none\";
+ hash {
+ algo = \"sha256\";
+ };
+ };
+ };
+};" > ${OUTPUT}