diff options
author | Rosen Penev <rosenp@gmail.com> | 2021-03-22 14:06:14 -0700 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-09-11 01:30:11 +0200 |
commit | 26a6a6a60ba74875b5ef819ac5765d3bcbbb930e (patch) | |
tree | abdc820f7c53e0c315bfbf8a1bce789e80c9da1b /target/linux/ramips/image/mt7621.mk | |
parent | fe609889e2f0f60f21bd36a05eb5ea7fee61bd1a (diff) | |
download | upstream-26a6a6a60ba74875b5ef819ac5765d3bcbbb930e.tar.gz upstream-26a6a6a60ba74875b5ef819ac5765d3bcbbb930e.tar.bz2 upstream-26a6a6a60ba74875b5ef819ac5765d3bcbbb930e.zip |
ramips: add support for Belkin RT1800
Belkin RT1800 is an 802.11ax (Wi-Fi 6) router, based on MediaTek
MT7621A.
Specifications:
- SoC: MT7621 (880MHz, 2 Cores)
- RAM: 256 MB
- Flash: 128 MB NAND
- Wi-Fi:
- MT7915D: 2.4/5 GHz (DBDC)
- Ethernet: 5x 1GiE MT7530
- USB: 1x USB 3.0
- UART: J4 (57600 baud)
- Pinout: [3V3] (TXD) (RXD) (blank) (GND)
Notes:
* This device has a dual-boot partition scheme, but this firmware works
only on boot partition 1.
Installation:
Upload the generated factory.bin image via the stock web firmware
updater.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'target/linux/ramips/image/mt7621.mk')
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index dbafaaddde..974299f26b 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -70,6 +70,30 @@ define Build/iodata-mstc-header ) endef +define Build/belkin-header + $(eval magic=$(word 1,$(1))) + $(eval hw_ver=$(word 2,$(1))) + $(eval fw_ver=$(word 3,$(1))) + + ( \ + type_fw_date=$$(printf "01%02x%02x%02x" \ + $$(date -d "@$(SOURCE_DATE_EPOCH)" "+%y %m %d")); \ + hw_fw_ver=$$(printf "%02x%02x%02x%02x" \ + $(hw_ver) $$(echo $(fw_ver) | cut -d. -f-3 | tr . ' ')); \ + fw_len_crc=$$(gzip -c $@ | tail -c 8 | od -An -tx8 | tr -d ' \n'); \ + fw_crc_len="$${fw_len_crc:8:8}$${fw_len_crc:0:8}"; \ + \ + printf "$(magic)" | dd bs=4 count=1 conv=sync 2>/dev/null; \ + printf "$$(echo $${type_fw_date}$${hw_fw_ver} | \ + sed 's/../\\x&/g')"; \ + printf "$$(echo $${fw_crc_len}$${fw_crc_len} | \ + sed 's/../\\x&/g')"; \ + printf "\x5c\x78\x00\x00"; \ + cat $@; \ + ) > $@.new + mv $@.new $@ +endef + define Build/ubnt-erx-factory-image if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \ echo '21001:7' > $(1).compat; \ @@ -341,6 +365,27 @@ define Device/beeline_smartbox-turbo endef TARGET_DEVICES += beeline_smartbox-turbo +define Device/belkin_rt1800 + $(Device/dsa-migration) + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_VENDOR := Belkin + DEVICE_MODEL := RT1800 + DEVICE_PACKAGES := kmod-mt7915e kmod-usb3 uboot-envtools + UBINIZE_OPTS := -E 5 + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \ + append-squashfs4-fakeroot + IMAGES += factory.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ + append-ubi | check-size | belkin-header RT18 1 9.9.9 +endef +TARGET_DEVICES += belkin_rt1800 + define Device/buffalo_wsr-1166dhp $(Device/dsa-migration) $(Device/uimage-lzma-loader) |