openwrt/target/linux/ramips/image/mt7621.mk

1792 lines
50 KiB
Makefile
Raw Normal View History

#
# MT7621 Profiles
#
include ./common-tp-link.mk
DEFAULT_SOC := mt7621
KERNEL_DTB += -d21
DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
ramips: add support for Linksys E5600 This submission relied heavily on the work of Linksys EA7300 v1/ v2. Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: 128M DDR3-1600 * Flash: 128M NAND * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/MT7613BE (2.4 GHz & 5 GHz) * Antennae: 2 internal fixed in the casing and 2 on the PCB * LEDs: Blue (x4 Ethernet) Blue+Orange (x2 Power + WPS and Internet) * Buttons: Reset (x1) WPS (x1) Installation: Flash factory image through GUI. This device has 2 partitions for the firmware called firmware and alt_firmware. To successfully flash and boot the device, the device should have been running from alt_firmware partition. To get the device booted through alt_firmware partition, download the OEM firmware from Linksys website and upgrade the firmware from web GUI. Once this is done, flash the OpenWrt Factory firmware from web GUI. Reverting to factory firmware: 1. Boot to 'alt_firmware'(where stock firmware resides) by doing one of the following: Press the "wps" button as soon as power LED turns on when booting. (OR) Hard-reset the router consecutively three times to force it to boot from 'alt_firmware'. 2. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: Aashish Kulkarni <aashishkul@gmail.com> [fix hanging indents and wrap to 74 characters per line, add kmod-mt7663-firmware-sta package for 5GHz STA mode to work, remove sysupgrade.bin and concatenate IMAGES instead in mt7621.mk, set default-state "on" for power LED] Signed-off-by: Sannihith Kinnera <digislayer@protonmail.com> [move check-size before append-metadata, remove trailing whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-02 06:10:14 +01:00
define Build/gemtek-trailer
printf "%s%08X" ".GEMTEK." "$$(cksum $@ | cut -d ' ' -f1)" >> $@
endef
ramips: add support for I-O DATA WN-AX1167GR I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 15:47:13 +02:00
define Build/iodata-factory
$(eval fw_size=$(word 1,$(1)))
$(eval fw_type=$(word 2,$(1)))
$(eval product=$(word 3,$(1)))
$(eval factory_bin=$(word 4,$(1)))
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
$(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
$(STAGING_DIR_HOST)/bin/mksenaofw \
-r 0x30a -p $(product) -t $(fw_type) \
-e $(factory_bin) -o $(factory_bin).new; \
mv $(factory_bin).new $(factory_bin); \
$(CP) $(factory_bin) $(BIN_DIR)/; \
ramips: add support for I-O DATA WN-AX1167GR I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 15:47:13 +02:00
else \
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
fi
endef
2019-04-09 07:48:31 +02:00
define Build/iodata-mstc-header
( \
data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \
tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
)
dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
( \
header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | gzip -c | \
tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
)
2019-04-09 07:48:31 +02:00
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; \
$(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
\
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
$(MKHASH) md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
\
echo "dummy" > $(1).rootfs; \
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
\
$(MKHASH) md5 $(1).rootfs > $(1).md5; \
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
\
echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
$(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
\
$(CP) $(1) $(BIN_DIR)/; \
else \
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
fi
endef
ramips: mt7621: Add support for ZyXEL NR7101 The ZyXEL NR7101 is an 802.3at PoE powered 5G outdoor (IP68) CPE with integrated directional 5G/LTE antennas. Specifications: - SoC: MediaTek MT7621AT - RAM: 256 MB - Flash: 128 MB MB NAND (MX30LF1G18AC) - WiFi: MediaTek MT7603E - Switch: 1 LAN port (Gigabiti) - 5G/LTE: Quectel RG502Q-EA connected by USB3 to SoC - SIM: 2 micro-SIM slots under transparent cover - Buttons: Reset, WLAN under same cover - LEDs: Multicolour green/red/yellow under same cover (visible) - Power: 802.3at PoE via LAN port The device is built as an outdoor ethernet to 5G/LTE bridge or router. The Wifi interface is intended for installation and/or temporary management purposes only. UART Serial: 57600N1 Located on populated 5 pin header J5: [o] GND [ ] key - no pin [o] RX [o] TX [o] 3.3V Vcc Remove the SIM/button/LED cover, the WLAN button and 12 screws holding the back plate and antenna cover together. The GPS antenna is fixed to the cover, so be careful with the cable. Remove 4 screws fixing the antenna board to the main board, again being careful with the cables. A bluetooth TTL adapter is recommended for permanent console access, to keep the router water and dustproof. The 3.3V pin is able to power such an adapter. MAC addresses: OpenWrt OEM Address Found as lan eth2 08:26:97:*:*:BC Factory 0xe000 (hex), label wlan0 ra0 08:26:97:*:*:BD Factory 0x4 (hex) wwan0 usb0 random WARNING!! ISP managed firmware might at any time update itself to a version where all known workarounds have been disabled. Never boot an ISP managed firmware with a SIM in any of the slots if you intend to use the router with OpenWrt. The bootloader lock can only be disabled with root access to running firmware. The flash chip is physically inaccessible without soldering. Installation from OEM web GUI: - Log in as "supervisor" on https://172.17.1.1/ - Upload OpenWrt initramfs-recovery.bin image on the Maintenance -> Firmware page - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot Installation from OEM ssh: - Log in as "root" on 172.17.1.1 port 22022 - scp OpenWrt initramfs-recovery.bin image to 172.17.1.1:/tmp - Prepare bootloader config by running: nvram setro uboot DebugFlag 0x1 nvram setro uboot CheckBypass 0 nvram commit - Run "mtd_write -w write initramfs-recovery.bin Kernel" and reboot - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot Copying OpenWrt to the recovery partition: - Verify that you are running a working OpenWrt recovery image from flash - ssh to root@192.168.1.1 and run: fw_setenv CheckBypass 0 mtd -r erase Kernel2 - Wait while the bootloader mirrors Image1 to Image2 NOTE: This should only be done after successfully booting the OpenWrt recovery image from the primary partition during installation. Do not do this after having sysupgraded OpenWrt! Reinstalling the recovery image on normal upgrades is not required or recommended. Installation from Z-Loader: - Halt boot by pressing Escape on console - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Type "ATNR 1,initramfs-recovery.bin" at the "ZLB>" prompt - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - Sysupgrade to the OpenWrt sysupgrade image NOTE: ATNR will write the recovery image to both primary and recovery partitions in one go. Booting from RAM: - Halt boot by pressing Escape on console - Type "ATGU" at the "ZLB>" prompt to enter the U-Boot menu - Press "4" to select "4: Entr boot command line interface." - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Load it using "tftpboot 0x88000000 initramfs-recovery.bin" - Boot with "bootm 0x8800017C" to skip the 380 (0x17C) bytes ZyXEL header This method can also be used to RAM boot OEM firmware. The warning regarding OEM applies! Never boot an unknown OEM firmware, or any OEM firmware with a SIM in any slot. NOTE: U-Boot configuration is incomplete (on some devices?). You may have to configure a working mac address before running tftp using "setenv eth0addr <mac>" Unlocking the bootloader: If you are unebale to halt boot, then the bootloader is locked. The OEM firmware locks the bootloader on every boot by setting DebugFlag to 0. Setting it to 1 is therefore only temporary when OEM firmware is installed. - Run "nvram setro uboot DebugFlag 0x1; nvram commit" in OEM firmware - Run "fw_setenv DebugFlag 0x1" in OpenWrt NOTE: OpenWrt does this automatically on first boot if necessary NOTE2: Setting the flag to 0x1 avoids the reset to 0 in known OEM versions, but this might change. WARNING: Writing anything to flash while the bootloader is locked is considered extremely risky. Errors might cause a permanent brick! Enabling management access from LAN: Temporary workaround to allow installing OpenWrt if OEM firmware has disabled LAN management: - Connect to console - Log in as "root" - Run "iptables -I INPUT -i br0 -j ACCEPT" Notes on the OEM/bootloader dual partition scheme The dual partition scheme on this device uses Image2 as a recovery image only. The device will always boot from Image1, but the bootloader might copy Image2 to Image1 under specific conditions. This scheme prevents repurposing of the space occupied by Image2 in any useful way. Validation of primary and recovery images is controlled by the variables CheckBypass, Image1Stable, and Image1Try. The bootloader sets CheckBypass to 0 and reboots if Image1 fails validation. If CheckBypass is 0 and Image1 is invalid then Image2 is copied to Image1. If CheckBypass is 0 and Image2 is invalid, then Image1 is copied to Image2. If CheckBypass is 1 then all tests are skipped and Image1 is booted unconditionally. CheckBypass is set to 1 after each successful validation of Image1. Image1Try is incremented if Image1Stable is 0, and Image2 is copied to Image1 if Image1Try is 3 or larger. But the bootloader only tests Image1Try if CheckBypass is 0, which is impossible unless the booted image sets it to 0 before failing. The system is therefore not resilient against runtime errors like failure to mount the rootfs, unless the kernel image sets CheckBypass to 0 before failing. This is not yet implemented in OpenWrt. Setting Image1Stable to 1 prevents the bootloader from updating Image1Try on every boot, saving unnecessary writes to the environment partition. Keeping an OpenWrt initramfs recovery as Image2 is recommended primarily to avoid unwanted OEM firmware boots on failure. Ref the warning above. It enables console-less recovery in case of some failures to boot from Image1. Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-04-19 13:00:56 +02:00
define Build/zytrx-header
$(eval board=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/zytrx -B '$(board)' -v '$(version)' -i $@ -o $@.new
mv $@.new $@
endef
define Device/dsa-migration
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
endef
define Device/adslr_g7
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := ADSLR
DEVICE_MODEL := G7
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += adslr_g7
define Device/afoundry_ew1200
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := AFOUNDRY
DEVICE_MODEL := EW1200
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += ew1200
endef
TARGET_DEVICES += afoundry_ew1200
ramips: add support for ALFA Network Quad-E4G ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM, USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support. Specification: - MT7621A (880 MHz) - 256/512 MB of RAM (DDR3) - 16/32+ MB of FLASH (SPI NOR) - optional second SPI flash (8-pin WSON/SOIC) - 1x microSD (SDXC) flash card reader - 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1 - optional 802.3at/af PoE module for WAN - 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V) - 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM) - RTC (TI BQ32002, I2C bus) with backup battery (CR2032) - external hardware watchdog (EM Microelectronic EM6324) - 1x USB 2.0 Type-A - 1x micro USB Type-B for system serial console (Holtek HT42B534) - 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator) - 3x button (reset, user1, user2) - 1x I2C (4-pin, 2.54 mm pitch) header on PCB - 4x SIM (6-pin, 2.00 mm pitch) headers on PCB - 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB - 1x mechanical power switch - 1x DC jack with lock (24 V) Other: - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board has additional logic circuit for M.2 SIM switching. The 'sim-select' will work only if both SIM slots are occupied. Otherwise, always slot with SIM inside is selected, no matter 'sim-select' value. - U-Boot enables power in all three miniPCIe and M.2 slots before loading the kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) - all three miniPCIe slots have additional 5 V supply on pins 47 and 49 - the board allows to install up to two oversized miniPCIe cards (vendor has dedicated MediaTek MT7615N/D cards for this board) - this board has additional logic circuit controlling PERSTn pins inside miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe slots but setting GPIO22 to high allows PERSTn control per slot, using GPIO23-25 (value is inverted) You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2019-11-03 12:12:44 +01:00
define Device/alfa-network_quad-e4g
$(Device/dsa-migration)
ramips: add support for ALFA Network Quad-E4G ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM, USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support. Specification: - MT7621A (880 MHz) - 256/512 MB of RAM (DDR3) - 16/32+ MB of FLASH (SPI NOR) - optional second SPI flash (8-pin WSON/SOIC) - 1x microSD (SDXC) flash card reader - 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1 - optional 802.3at/af PoE module for WAN - 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V) - 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM) - RTC (TI BQ32002, I2C bus) with backup battery (CR2032) - external hardware watchdog (EM Microelectronic EM6324) - 1x USB 2.0 Type-A - 1x micro USB Type-B for system serial console (Holtek HT42B534) - 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator) - 3x button (reset, user1, user2) - 1x I2C (4-pin, 2.54 mm pitch) header on PCB - 4x SIM (6-pin, 2.00 mm pitch) headers on PCB - 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB - 1x mechanical power switch - 1x DC jack with lock (24 V) Other: - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board has additional logic circuit for M.2 SIM switching. The 'sim-select' will work only if both SIM slots are occupied. Otherwise, always slot with SIM inside is selected, no matter 'sim-select' value. - U-Boot enables power in all three miniPCIe and M.2 slots before loading the kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) - all three miniPCIe slots have additional 5 V supply on pins 47 and 49 - the board allows to install up to two oversized miniPCIe cards (vendor has dedicated MediaTek MT7615N/D cards for this board) - this board has additional logic circuit controlling PERSTn pins inside miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe slots but setting GPIO22 to high allows PERSTn control per slot, using GPIO23-25 (value is inverted) You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2019-11-03 12:12:44 +01:00
IMAGE_SIZE := 16064k
DEVICE_VENDOR := ALFA Network
DEVICE_MODEL := Quad-E4G
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \
-wpad-basic-wolfssl
SUPPORTED_DEVICES += quad-e4g
ramips: add support for ALFA Network Quad-E4G ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM, USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support. Specification: - MT7621A (880 MHz) - 256/512 MB of RAM (DDR3) - 16/32+ MB of FLASH (SPI NOR) - optional second SPI flash (8-pin WSON/SOIC) - 1x microSD (SDXC) flash card reader - 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1 - optional 802.3at/af PoE module for WAN - 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V) - 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM) - RTC (TI BQ32002, I2C bus) with backup battery (CR2032) - external hardware watchdog (EM Microelectronic EM6324) - 1x USB 2.0 Type-A - 1x micro USB Type-B for system serial console (Holtek HT42B534) - 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator) - 3x button (reset, user1, user2) - 1x I2C (4-pin, 2.54 mm pitch) header on PCB - 4x SIM (6-pin, 2.00 mm pitch) headers on PCB - 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB - 1x mechanical power switch - 1x DC jack with lock (24 V) Other: - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board has additional logic circuit for M.2 SIM switching. The 'sim-select' will work only if both SIM slots are occupied. Otherwise, always slot with SIM inside is selected, no matter 'sim-select' value. - U-Boot enables power in all three miniPCIe and M.2 slots before loading the kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) - all three miniPCIe slots have additional 5 V supply on pins 47 and 49 - the board allows to install up to two oversized miniPCIe cards (vendor has dedicated MediaTek MT7615N/D cards for this board) - this board has additional logic circuit controlling PERSTn pins inside miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe slots but setting GPIO22 to high allows PERSTn control per slot, using GPIO23-25 (value is inverted) You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2019-11-03 12:12:44 +01:00
endef
TARGET_DEVICES += alfa-network_quad-e4g
ramips: add support for Amped Wireless ALLY router and extender Amped Wireless ALLY is a whole-home WiFi kit, with a router (model ALLY-R1900K) and an Extender (model ALLY-00X19K). Both are devices are 11ac and based on MediaTek MT7621AT and MT7615N chips. The units are nearly identical, except the Extender lacks a USB port and has a single Ethernet port. Specification: - SoC: MediaTek MT7621AT (2C/4T) @ 880MHz - RAM: 128MB DDR3 (Nanya NT5CC64M16GP-DI) - FLASH: 128MB NAND (Winbond W29N01GVSIAA) - WiFi: 2.4/5 GHz 4T4R - 2.4GHz MediaTek MT7615N bgn - 5GHz MediaTek MT7615N nac - Switch: SoC integrated Gigabit Switch - USB: 1x USB3 (Router only) - BTN: Reset, WPS - LED: single RGB - UART: through-hole on PCB. J1: pin1 (square pad, towards rear)=3.3V, pin2=RX, pin3=GND, pin4=TX. Settings: 57600/8N1. Note regarding dual system partitions ------------------------------------- The vendor firmware and boot loader use a dual partition scheme. The boot partition is decided by the bootImage U-boot environment variable: 0 for the 1st partition, 1 for the 2nd. OpenWrt does not support this scheme and will always use the first OS partition. It will set bootImage to 0 during installation, making sure the first partition is selected by the boot loader. Also, because we can't be sure which partition is active to begin with, a 2-step flash process is used. We first flash an initramfs image, then follow with a regular sysupgrade. Installation: Router (ALLY-R1900K) 1) Install the flashable initramfs image via the OEM web-interface. (Alternatively, you can use the TFTP recovery method below.) You can use WiFi or Ethernet. The direct URL is: http://192.168.3.1/07_06_00_firmware.html a. No login is needed, and you'll be in their setup wizard. b. You might get a warning about not being connected to the Internet. c. Towards the bottom of the page will be a section entitled "Or Manually Upgrade Firmware from a File:" where you can manually choose and upload a firmware file. d: Click "Choose File", select the OpenWRT "initramfs" image and click "Upload." 2) The Router will flash the OpenWrt initramfs image and reboot. After booting, LuCI will be available on 192.168.1.1. 3) Log into LuCI as root; there is no password. 4) Optional (but recommended) is to backup the OEM firmware before continuing; see process below. 5) Complete the Installation by flashing a full OpenWRT image. Note: you may use the sysupgrade command line tool in lieu of the UI if you prefer. a. Choose System -> Backup/Flash Firmware. b. Click "Flash Image..." under "Flash new firmware image" c. Click "Browse..." and then select the sysupgrade file. d. Click Upload to upload the sysupgrade file. e. Important: uncheck "Keep settings and retain the current configuration" for this initial installation. f. Click "Continue" to flash the firmware. g. The device will reboot and OpenWRT is installed. Extender (ALLY-00X19K) 1) This device requires a TFTP recovery procedure to do an initial load of OpenWRT. Start by configuring a computer as a TFTP client: a. Install a TFTP client (server not necessary) b. Configure an Ethernet interface to 192.168.1.x/24; don't use .1 or .6 c. Connect the Ethernet to the sole Ethernet port on the X19K. 2) Put the ALLY Extender in TFTP recovery mode. a. Do this by pressing and holding the reset button on the bottom while connecting the power. b. As soon as the LED lights up green (roughly 2-3 seconds), release the button. 3) Start the TFTP transfer of the Initramfs image from your setup machine. For example, from Linux: tftp -v -m binary 192.168.1.6 69 -c put initramfs.bin 4) The Extender will flash the OpenWrt initramfs image and reboot. After booting, LuCI will be available on 192.168.1.1. 5) Log into LuCI as root; there is no password. 6) Optional (but recommended) is to backup the OEM firmware before continuing; see process below. 7) Complete the Installation by flashing a full OpenWRT image. Note: you may use the sysupgrade command line tool in lieu of the UI if you prefer. a. Choose System -> Backup/Flash Firmware. b. Click "Flash Image..." under "Flash new firmware image" c. Click "Browse..." and then select the sysupgrade file. d. Click Upload to upload the sysupgrade file. e. Important: uncheck "Keep settings and retain the current configuration" for this initial installation. f. Click "Continue" to flash the firmware. g. The device will reboot and OpenWRT is installed. Backup the OEM Firmware: ----------------------- There isn't any downloadable firmware for the ALLY devices on the Amped Wireless web site. Reverting back to the OEM firmware is not possible unless we have a backup of the original OEM firmware. The OEM firmware may be stored on either /dev/mtd3 ("firmware") or /dev/mtd6 ("oem"). We can't be sure which was overwritten with the initramfs image, so backup both partitions to be safe. 1) Once logged into LuCI, navigate to System -> Backup/Flash Firmware. 2) Under "Save mtdblock contents," first select "firmware" and click "Save mtdblock" to download the image. 3) Repeat the process, but select "oem" from the pull-down menu. Revert to the OEM Firmware: -------------------------- * U-boot TFTP: Follow the TFTP recovery steps for the Extender, and use the backup image. * OpenWrt "Flash Firmware" interface: Upload the backup image and select "Force update" before continuing. Signed-off-by: Jonathan Sturges <jsturges@redhat.com>
2021-06-05 14:17:42 +02:00
define Device/ampedwireless_ally_common
$(Device/dsa-migration)
DEVICE_VENDOR := Amped Wireless
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware uboot-envtools
IMAGE_SIZE := 32768k
KERNEL_SIZE := 4096k
BLOCKSIZE := 128k
PAGESIZE := 2048
UBINIZE_OPTS := -E 5
KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'flashable-initramfs' |\
edimax-header -s CSYS -m RN68 -f 0x001c0000 -S 0x01100000
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/ampedwireless_ally-r1900k
$(Device/ampedwireless_ally_common)
DEVICE_MODEL := ALLY-R1900K
DEVICE_PACKAGES += kmod-usb3
endef
TARGET_DEVICES += ampedwireless_ally-r1900k
define Device/ampedwireless_ally-00x19k
$(Device/ampedwireless_ally_common)
DEVICE_MODEL := ALLY-00X19K
endef
TARGET_DEVICES += ampedwireless_ally-00x19k
define Device/asiarf_ap7621-001
$(Device/dsa-migration)
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 16000k
DEVICE_VENDOR := AsiaRF
DEVICE_MODEL := AP7621-001
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
endef
TARGET_DEVICES += asiarf_ap7621-001
define Device/asiarf_ap7621-nv1
$(Device/dsa-migration)
IMAGE_SIZE := 16000k
DEVICE_VENDOR := AsiaRF
DEVICE_MODEL := AP7621-NV1
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
endef
TARGET_DEVICES += asiarf_ap7621-nv1
define Device/asus_rt-ac57u
$(Device/dsa-migration)
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-AC57U
IMAGE_SIZE := 16064k
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += asus_rt-ac57u
define Device/asus_rt-ac65p
$(Device/dsa-migration)
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-AC65P
IMAGE_SIZE := 51200k
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
endef
TARGET_DEVICES += asus_rt-ac65p
define Device/asus_rt-ac85p
$(Device/dsa-migration)
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-AC85P
IMAGE_SIZE := 51200k
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
endef
TARGET_DEVICES += asus_rt-ac85p
define Device/asus_rt-n56u-b1
$(Device/dsa-migration)
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-N56U
DEVICE_VARIANT := B1
IMAGE_SIZE := 16064k
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += asus_rt-n56u-b1
define Device/buffalo_wsr-1166dhp
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 15936k
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WSR-1166DHP
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
SUPPORTED_DEVICES += wsr-1166
endef
TARGET_DEVICES += buffalo_wsr-1166dhp
define Device/buffalo_wsr-2533dhpl
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 7936k
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WSR-2533DHPL
DEVICE_ALT0_VENDOR := Buffalo
DEVICE_ALT0_MODEL := WSR-2533DHP
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += buffalo_wsr-2533dhpl
define Device/buffalo_wsr-600dhp
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WSR-600DHP
DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci
SUPPORTED_DEVICES += wsr-600
endef
TARGET_DEVICES += buffalo_wsr-600dhp
define Device/cudy_wr1300
$(Device/dsa-migration)
IMAGE_SIZE := 15872k
DEVICE_VENDOR := Cudy
DEVICE_MODEL := WR1300
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += cudy_wr1300
define Device/cudy_wr2100
$(Device/dsa-migration)
DEVICE_VENDOR := Cudy
DEVICE_MODEL := WR2100
IMAGE_SIZE := 15872k
UIMAGE_NAME := R11
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += cudy_wr2100
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
define Device/dlink_dir-8xx-a1
$(Device/dsa-migration)
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
IMAGE_SIZE := 16000k
DEVICE_VENDOR := D-Link
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
KERNEL := $$(KERNEL) | uimage-sgehdr
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
IMAGES += factory.bin
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
check-size | append-metadata
IMAGE/factory.bin := append-kernel | append-rootfs | check-size
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
endef
define Device/dlink_dir-8xx-r1
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := D-Link
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
KERNEL_INITRAMFS := $$(KERNEL)
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
check-size | append-metadata
endef
ramips: add support for D-Link DIR-1960 A1 This patch adds support for D-Link DIR-1960 A1. Given the similarity with the DIR-1760/2660 A1, this patch also introduces a common DTSI which can be shared with these devices, with support to be added in future commits. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 256 MB (DDR3) * Flash: 128 MB (NAND) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white), WiFi 5G (white), USB 3.0 (white) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 MAC addresses: lan factory 0xe000 *:EB (label) wan factory 0xe006 *:EE 2.4 factory 0xe000 +1 *:EC 5.0 factory 0xe000 +2 *:ED Seems like vendor didn't replace the dummy entrys in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [fix whitespace issues, create patch to merge DIR-1960 first, move special WiFi MAC settings to DTS, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 17:39:21 +02:00
define Device/dlink_dir-xx60-a1
$(Device/dsa-migration)
ramips: add support for D-Link DIR-1960 A1 This patch adds support for D-Link DIR-1960 A1. Given the similarity with the DIR-1760/2660 A1, this patch also introduces a common DTSI which can be shared with these devices, with support to be added in future commits. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 256 MB (DDR3) * Flash: 128 MB (NAND) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white), WiFi 5G (white), USB 3.0 (white) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 MAC addresses: lan factory 0xe000 *:EB (label) wan factory 0xe006 *:EE 2.4 factory 0xe000 +1 *:EC 5.0 factory 0xe000 +2 *:ED Seems like vendor didn't replace the dummy entrys in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [fix whitespace issues, create patch to merge DIR-1960 first, move special WiFi MAC settings to DTS, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 17:39:21 +02:00
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGE_SIZE := 40960k
UBINIZE_OPTS := -E 5
DEVICE_VENDOR := D-Link
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
kmod-usb-ledtrig-usbport
KERNEL := $$(KERNEL) | uimage-sgehdr
ramips: add support for D-Link DIR-1960 A1 This patch adds support for D-Link DIR-1960 A1. Given the similarity with the DIR-1760/2660 A1, this patch also introduces a common DTSI which can be shared with these devices, with support to be added in future commits. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 256 MB (DDR3) * Flash: 128 MB (NAND) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white), WiFi 5G (white), USB 3.0 (white) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 MAC addresses: lan factory 0xe000 *:EB (label) wan factory 0xe006 *:EE 2.4 factory 0xe000 +1 *:EC 5.0 factory 0xe000 +2 *:ED Seems like vendor didn't replace the dummy entrys in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [fix whitespace issues, create patch to merge DIR-1960 first, move special WiFi MAC settings to DTS, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-14 17:39:21 +02:00
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
endef
define Device/dlink_dir-1960-a1
$(Device/dlink_dir-xx60-a1)
DEVICE_MODEL := DIR-1960
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-1960-a1
define Device/dlink_dir-2640-a1
$(Device/dlink_dir-xx60-a1)
DEVICE_MODEL := DIR-2640
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-2640-a1
define Device/dlink_dir-2660-a1
$(Device/dlink_dir-xx60-a1)
DEVICE_MODEL := DIR-2660
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-2660-a1
ramips: add support for D-Link DIR-853 A3 Specifications: * SoC: MT7621AT * RAM: 256MB * Flash: 128MB NAND flash * WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC * LAN: 5x1000M * Firmware layout is Uboot with extra 96 bytes in header * Base PCB is DIR-1360 REV1.0 * LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue, USB Blue * Buttons Reset,WPS, Wifi MAC addresses on OEM firmware: lan factory 0xe000 f4:*:*:a8:*:65 (label) wan factory 0xe006 f4:*:*:a8:*:68 2.4 GHz [not on flash] f6:*:*:c8:*:66 5.0 GHz factory 0x4 f4:*:*:a8:*:66 The increment of the 4th byte for the 2.4g address appears to vary. Reported cases: 5g 2.4g increment f4:XX:XX:a8:XX:66 f6:XX:XX:c8:XX:66 +0x20 x0:xx:xx:68:xx:xx x2:xx:xx:48:xx:xx -0x20 x4:xx:xx:6a:xx:xx x6:xx:xx:4a:xx:xx -0x20 Since increment is inconsistent and there is no obvious pattern in swapping bytes, and the 2.4g address has local bit set anyway, it seems safer to use the LAN address with flipped byte here in order to prevent collisions between OpenWrt devices and OEM devices for this interface. This way we at least use an address as base that is definitely owned by the device at hand. Flashing instruction: The Dlink "Emergency Room" cannot be accessed through the reset button on this device. You can either use console or use the encrypted factory image availble in the openwrt forum. Once the encrypted image is flashed throuh the stock Dlink web interface, the sysupgrade images can be used. Header pins needs to be soldered near the WPS and Wifi buttons. The layout for the pins is (VCC,RX,TX,GND). No need to connect the VCC. the settings are: Bps/Par/Bits : 57600 8N1 Hardware Flow Control : No Software Flow Control : No Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.101 / 255.255.255.0. Call the recovery page or tftp for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device At the time of adding support the wireless config needs to be set up by editing the wireless config file: * Setting the country code is mandatory, otherwise the router loses connectivity at the next reboot. This is mandatory and can be done from luci. After setting the country code the router boots correctly. A reset with the reset button will fix the issue and the user has to reconfigure. * This is minor since the 5g interface does not come up online although it is not set as disabled. 2 options here: 1- Either run the "wifi" command. Can be added from LUCI in system - startup - local startup and just add wifi above "exit 0". 2- Or add the serialize option in the wireless config file as shown below. This one would work and bring both interfaces automatically at every boot: config wifi-device 'radio0' option serialize '1' config wifi-device 'radio1' option serialize '1' Signed-off-by: Karim Dehouche <karimdplay@gmail.com> [rebase, improve MAC table, update wireless config comment, fix 2.4g macaddr setup] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-18 09:19:16 +02:00
define Device/dlink_dir-853-a3
$(Device/dlink_dir-xx60-a1)
DEVICE_MODEL := DIR-853
DEVICE_VARIANT := A3
endef
TARGET_DEVICES += dlink_dir-853-a3
ramips: add support for D-Link DIR-853-R1 This PR adds support for router D-Link DIR-853-R1 Specifications: SoC: MT7621AT RAM: 128MB Flash: 16MB SPI WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC (This mode allows this single chip act as an 2x2 11n radio and an 2x2 11ac radio at the same time) LAN: 5x1000M LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue USB Blue Buttons Reset,WPS, Wifi MAC addresses: |Interface | MAC | Factory |Comment |------------|-----------------|-------------|---------------- |WAN sticker |C4:XX:XX:6E:XX:2A| |Sticker |LAN |C4:XX:XX:6E:XX:2B| | |Wifi (5g) |C4:XX:XX:6E:XX:2C|0x4 | |Wifi (2.4g) |C6:XX:XX:7E:XX:2C| | | | | | | |C4:XX:XX:6E:XX:2E|0x8004 0xe000| | |C4:XX:XX:6E:XX:2F|0xe006 | The increment of the 4th byte for the 2.4g address appears to vary. Reported cases: 5g 2.4g increment C4:XX:XX:6E:XX:2C C6:XX:XX:7E:XX:2C 0x10 f4:XX:XX:16:XX:32 f6:XX:XX:36:XX:32 0x20 F4:XX:XX:A6:XX:E3 F6:XX:XX:B6:XX:E3 0x10 Since increment is inconsistent and there is no obvious pattern in swapping bytes, and the 2.4g address has local bit set anyway, it seems safer to use the LAN address with flipped byte here in order to prevent collisions between OpenWrt devices and OEM devices for this interface. This way we at least use an address as base that is definitely owned by the device at hand. Flashing instruction: The Dlink "Emergency Room" Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.101 / 255.255.255.0. Then, power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the internet LED stops flashing Call the recovery page or tftp for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device. Signed-off-by: Stas Fiduchi <fiduchi@protonmail.com> [commit title/message improvements, use correct label MAC address, calculate MAC addresses based on 0x4, minor DTS style fixes, add uart2 to state_default, remove factory image, add 2.4g MAC address, use partition DTSI, add macaddr comment in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-12 10:35:27 +02:00
define Device/dlink_dir-853-r1
$(Device/dlink_dir-8xx-r1)
DEVICE_MODEL := DIR-853
DEVICE_VARIANT := R1
DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += dlink_dir-853-r1
define Device/dlink_dir-860l-b1
$(Device/dsa-migration)
$(Device/seama)
SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \
lzma -a0 | uImage lzma
IMAGE_SIZE := 16064k
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-860L
DEVICE_VARIANT := B1
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += dir-860l-b1
endef
TARGET_DEVICES += dlink_dir-860l-b1
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
define Device/dlink_dir-867-a1
$(Device/dlink_dir-8xx-a1)
DEVICE_MODEL := DIR-867
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-867-a1
define Device/dlink_dir-878-a1
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
$(Device/dlink_dir-8xx-a1)
DEVICE_MODEL := DIR-878
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-878-a1
ramips: add support for D-Link DIR-867/DIR-882 A1 This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-15 23:45:39 +02:00
define Device/dlink_dir-882-a1
$(Device/dlink_dir-8xx-a1)
DEVICE_MODEL := DIR-882
DEVICE_VARIANT := A1
DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += dlink_dir-882-a1
define Device/dlink_dir-882-r1
$(Device/dlink_dir-8xx-r1)
DEVICE_MODEL := DIR-882
DEVICE_VARIANT := R1
DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | append-rootfs | check-size | \
sign-dlink-ru 57c5375741c30ca9ebcb36713db4ba51 \
ab0dff19af8842cdb70a86b4b68d23f7
endef
TARGET_DEVICES += dlink_dir-882-r1
define Device/d-team_newifi-d2
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := Newifi
DEVICE_MODEL := D2
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += d-team_newifi-d2
define Device/d-team_pbr-m1
$(Device/dsa-migration)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := PandoraBox
DEVICE_MODEL := PBR-M1
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += pbr-m1
endef
TARGET_DEVICES += d-team_pbr-m1
define Device/edimax_ra21s
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Edimax
DEVICE_MODEL := RA21S
DEVICE_ALT0_VENDOR := Edimax
DEVICE_ALT0_MODEL := Gemini RA21S
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elx-header 02020040 8844A2D168B45A2D
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += edimax_ra21s
ramips: add support for Edimax Gemini RE23S Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-20 01:27:56 +02:00
define Device/edimax_re23s
$(Device/dsa-migration)
ramips: add support for Edimax Gemini RE23S Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-20 01:27:56 +02:00
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 15680k
DEVICE_VENDOR := Edimax
DEVICE_MODEL := RE23S
DEVICE_ALT0_VENDOR := Edimax
DEVICE_ALT0_MODEL := Gemini RE23S
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
check-size | append-metadata
ramips: add support for Edimax Gemini RE23S Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-20 01:27:56 +02:00
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | append-rootfs | \
edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
check-size
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
ramips: add support for Edimax Gemini RE23S Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-20 01:27:56 +02:00
endef
TARGET_DEVICES += edimax_re23s
define Device/edimax_rg21s
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Edimax
DEVICE_MODEL := Gemini AC2600 RG21S
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elx-header 02020038 8844A2D168B45A2D
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += edimax_rg21s
define Device/elecom_wrc-1167ghbk2-s
$(Device/dsa-migration)
IMAGE_SIZE := 15488k
DEVICE_VENDOR := ELECOM
DEVICE_MODEL := WRC-1167GHBK2-S
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += elecom_wrc-1167ghbk2-s
define Device/elecom_wrc-gs
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := ELECOM
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \
append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME)
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
define Device/elecom_wrc-1167gs2-b
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 11264k
DEVICE_MODEL := WRC-1167GS2-B
ELECOM_HWNAME := WRC-1167GS2
endef
TARGET_DEVICES += elecom_wrc-1167gs2-b
define Device/elecom_wrc-1167gst2
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 24576k
DEVICE_MODEL := WRC-1167GST2
ELECOM_HWNAME := WRC-1167GST2
endef
TARGET_DEVICES += elecom_wrc-1167gst2
define Device/elecom_wrc-1750gs
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 11264k
DEVICE_MODEL := WRC-1750GS
ELECOM_HWNAME := WRC-1750GS
endef
TARGET_DEVICES += elecom_wrc-1750gs
define Device/elecom_wrc-1750gst2
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 24576k
DEVICE_MODEL := WRC-1750GST2
ELECOM_HWNAME := WRC-1750GST2
endef
TARGET_DEVICES += elecom_wrc-1750gst2
define Device/elecom_wrc-1750gsv
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 11264k
DEVICE_MODEL := WRC-1750GSV
ELECOM_HWNAME := WRC-1750GSV
endef
TARGET_DEVICES += elecom_wrc-1750gsv
define Device/elecom_wrc-1900gst
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 11264k
DEVICE_MODEL := WRC-1900GST
ELECOM_HWNAME := WRC-1900GST
endef
TARGET_DEVICES += elecom_wrc-1900gst
define Device/elecom_wrc-2533ghbk-i
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := ELECOM
DEVICE_MODEL := WRC-2533GHBK-I
IMAGE_SIZE := 9856k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elx-header 0107002d 8844A2D168B45A2D | \
elecom-product-header WRC-2533GHBK-I
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += elecom_wrc-2533ghbk-i
define Device/elecom_wrc-2533gst
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 11264k
DEVICE_MODEL := WRC-2533GST
ELECOM_HWNAME := WRC-2533GST
endef
TARGET_DEVICES += elecom_wrc-2533gst
define Device/elecom_wrc-2533gst2
$(Device/elecom_wrc-gs)
IMAGE_SIZE := 24576k
DEVICE_MODEL := WRC-2533GST2
ELECOM_HWNAME := WRC-2533GST2
endef
TARGET_DEVICES += elecom_wrc-2533gst2
define Device/firefly_firewrt
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Firefly
DEVICE_MODEL := FireWRT
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += firewrt
endef
TARGET_DEVICES += firefly_firewrt
define Device/gehua_ghl-r-001
$(Device/dsa-migration)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := GeHua
DEVICE_MODEL := GHL-R-001
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += gehua_ghl-r-001
ramips: add support for GL.iNet GL-MT1300 The GL-MT1300 is a high-performance new generation pocket-sized router that offers a powerful hardware and first-class cybersecurity protocol with unique and modern design. Specifications: - SoC: MT7621A, Dual-Core @880MHz - RAM: 256 MB DDR3 - Flash: 32 MB - Ethernet: 3 x 10/100/1000: 2 x LAN + 1 x WAN - Wireless: 1 x MT7615D Dual-Band 2.4GHz(400Mbps) + 5GHz(867Mbps) - USB: 1 x USB 3.0 port - Slot: 1 x MicroSD card slot - Button: 1 x Reset button - Switch: 1 x Mode switch - LED: 1 x Blue LED + 1 x White LED MAC addresses based on vendor firmware: WAN : factory 0x4000 LAN : Mac from factory 0x4000 + 1 2.4GHz : factory 0x4 5GHz : Mac form factory 0x4 + 1 Flashing instructions: 1.Connect to one of LAN ports. 2.Set the static IP on the PC to 192.168.1.2. 3.Press the Reset button and power the device (do not release the button). After waiting for the blue led to flash 5 times, the white led will come on and release the button. 4.Browse the 192.168.1.1 web page and update firmware according to web tips. 5.The blue led will flash when the firmware is being upgraded. 6.The blue led stops blinking to indicate that the firmware upgrade is complete and U-Boot automatically starts the firmware. For more information on GL-MT1300, see the OFFICIAL GL.iNet website: https://www.gl-inet.com/products/gl-mt1300/ Signed-off-by: Xinfa Deng <xinfa.deng@gl-inet.com> [add input-type for switch, wrap long line in 10_fix_wifi_mac] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-16 08:58:28 +01:00
define Device/glinet_gl-mt1300
$(Device/dsa-migration)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-MT1300
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
endef
TARGET_DEVICES += glinet_gl-mt1300
define Device/gnubee_gb-pc1
$(Device/dsa-migration)
DEVICE_VENDOR := GnuBee
DEVICE_MODEL := Personal Cloud One
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
IMAGE_SIZE := 32448k
endef
TARGET_DEVICES += gnubee_gb-pc1
define Device/gnubee_gb-pc2
$(Device/dsa-migration)
DEVICE_VENDOR := GnuBee
DEVICE_MODEL := Personal Cloud Two
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
IMAGE_SIZE := 32448k
endef
TARGET_DEVICES += gnubee_gb-pc2
ramips: add support for HiLink HLK-7621A evaluation board Specifications: - SoC: MediaTek MT7621AT - RAM: 256 MB (DDR3) - Flash: 32 MB SPI NOR 44MHz - Switch: 1 WAN, 4 LAN (Gigabit) - LEDs: 1 WAN, 4 LAN (controlled by PHY) - USB Ports: 1 x USB2, 1 x USB3 - WLAN: 1 x 2.4, 5 GHz 866Mbps (MT7612E) - Button: 1 button (reset) - UART Serial: UART1 as console : 57600 baud - Power: 12VDC, 1A Installation: Update openWRT firmware using internal GNUBEE uboot: https://github.com/gnubee-git/GnuBee-MT7621-uboot By HTTP: Initial uboot address is http://10.10.10.123, your address needs to be 10.10.10.x, and mask 255.255.255.0. By TFTP: Uboot is in client mode, the address of the firmware must be tftp://10.10.10.3/uboot.bin Recovery: Manufacturer provides MTK OpenWrt 14.07 source code, compile then flash it by uboot. HLK-7621A is a stamp hole package module for embedded development, users have to design IO boards to use it. MAC addresses: - u-boot-env contains a placeholder address: > mtd_get_mac_ascii u-boot-env ethaddr 03:17:73:ab:cd:ef - phy0 gets a valid-looking address: > cat /sys/class/ieee80211/phy0/macaddress f8:62:aa:**:**:a8 - Calibration data for &pcie2 contains a valid address, however the zeros in the right half look like it's not real: 8c:88:2b:00:00:1b - Since it's an evaluation board and there is no solid information about the MAC address assignment, the ethernet MAC address is left random. Signed-off-by: Chen Yijun <cyjason@bupt.edu.cn> [add keys and pcie nodes to properly support evaluation board] Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> [remove ethernet address, wrap lines properly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-04-04 08:50:26 +02:00
define Device/hilink_hlk-7621a-evb
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := HiLink
DEVICE_MODEL := HLK-7621A evaluation board
DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3
IMAGE_SIZE := 32448k
endef
TARGET_DEVICES += hilink_hlk-7621a-evb
define Device/hiwifi_hc5962
$(Device/dsa-migration)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
UBINIZE_OPTS := -E 5
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 32768k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_VENDOR := HiWiFi
DEVICE_MODEL := HC5962
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
endef
TARGET_DEVICES += hiwifi_hc5962
ramips: add support for I-O DATA WN-AX1167GR I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 15:47:13 +02:00
define Device/iodata_wn-ax1167gr
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
ramips: add support for I-O DATA WN-AX1167GR I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 15:47:13 +02:00
IMAGE_SIZE := 15552k
KERNEL_INITRAMFS := $$(KERNEL) | \
iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
DEVICE_VENDOR := I-O DATA
DEVICE_MODEL := WN-AX1167GR
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
ramips: add support for I-O DATA WN-AX1167GR I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - MT7621A (2-Cores, 4-Threads) - 64 MB of RAM (DDR2) - 16 MB of Flash (SPI) - 2T2R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 2x LEDs, 4x keys (2x buttons, 1x slide switch) - UART header on PCB - Vcc, GND, TX, RX from ethernet port side - baudrate: 115200 bps (U-Boot, OpenWrt) Stock firmware: In the stock firmware, WN-AX1167GR has two os images each composed of Linux kernel and rootfs. These images are stored in "Kernel" and "app" partition of the following partitions, respectively. (excerpt from dmesg): MX25L12805D(c2 2018c220) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 10 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config " 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "iNIC_rf" 0x000000060000-0x0000007e0000 : "Kernel" 0x000000800000-0x000000f80000 : "app" 0x000000f90000-0x000000fa0000 : "Key" 0x000000fa0000-0x000000fb0000 : "backup" 0x000000fb0000-0x000001000000 : "storage" The flag for boot partition is stored in "Key" partition, and U-Boot reads this and determines the partition to boot. If the image that U-Boot first reads according to the flag is "Bad Magic Number", U-Boot then tries to boot from the other image. If the second image is correct, change the flag to the number corresponding to that image and boot from that image. (example): ## Booting image at bc800000 ... Bad Magic Number,FFFFFFFF Boot from KERNEL 1 !! ## Booting image at bc060000 ... Image Name: MIPS OpenWrt Linux-4.14.50 Image Type: MIPS Linux kernel Image (lzma compressed) Data Size: 1865917 Bytes = 1.8 MB Load Address: 80001000 Entry Point: 80001000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK raspi_erase_write: offs:f90000, count:34 . . Done! Starting kernel ... Flash instruction using factory image: 1. Connect the computer to the LAN port of WN-AX1167GR 2. Connect power cable to WN-AX1167GR and turn on it 3. Access to "192.168.0.1" on the web browser and open firmware update page ("ファームウェア") 4. Select the OpenWrt factory image and perform firmware update 5. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR 6. Wait ~180 seconds to complete flasing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 15:47:13 +02:00
endef
TARGET_DEVICES += iodata_wn-ax1167gr
define Device/iodata_nand
$(Device/dsa-migration)
DEVICE_VENDOR := I-O DATA
2019-08-26 13:27:22 +02:00
BLOCKSIZE := 128k
PAGESIZE := 2048
UBINIZE_OPTS := -E 5
KERNEL_SIZE := 4096k
IMAGE_SIZE := 51200k
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma | uImage lzma
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
# The OEM webinterface expects an kernel with initramfs which has the uImage
# header field ih_name.
# We don't want to set the header name field for the kernel include in the
# sysupgrade image as well, as this image shouldn't be accepted by the OEM
# webinterface. It will soft-brick the board.
define Device/iodata_wn-ax1167gr2
$(Device/iodata_nand)
DEVICE_MODEL := WN-AX1167GR2
KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
2019-08-26 13:27:22 +02:00
endef
TARGET_DEVICES += iodata_wn-ax1167gr2
ramips: add support for I-O DATA WN-AX2033GR I-O DATA WN-AX2033GR is roughly the same as I-O DATA WN-AX1167GR2. The difference is Wi-Fi feature. Specification ============= - SoC: MediaTek MT7621A - RAM: DDR3 128 MiB - Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100) - Wi-Fi: MediaTek MT7603E - Wi-Fi: MediaTek MT7615 - Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN) - LED: 2x green LED - Input: 2x tactile switch, 1x slide switch - Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND) - Power: DC 12V This device only supports channel 1-13 and 36-140. Thus, narrower frequency limits compared to other devices are required for limiting wi-fi frequency correctly. Without this, non-supported frequencies are activated. Flash instructions ================== 1. Open the router management page (192.168.0.1). 2. Update router firmware using "initramfs-kernel.bin". 3. After updating, run sysupgrade with "sysupgrade.bin". Recovery instructions ===================== WN-AX2033GR contains Zyxel Z-LOADER 1. Setup TFTP server (IP address: 10.10.10.3). 2. Put official firmware into TFTP server directory (distribution site: https://www.iodata.jp/lib/software/w/2068.htm) 3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server. 4. Connect to serial console. 5. Interrupt booting by Esc key. 6. Flash firmware using "ATNR 1,[firmware filename]" command. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [adjust for kernel 5.4, add recovery instructions/frequency comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-06 04:00:47 +01:00
define Device/iodata_wn-ax2033gr
$(Device/iodata_nand)
ramips: add support for I-O DATA WN-AX2033GR I-O DATA WN-AX2033GR is roughly the same as I-O DATA WN-AX1167GR2. The difference is Wi-Fi feature. Specification ============= - SoC: MediaTek MT7621A - RAM: DDR3 128 MiB - Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100) - Wi-Fi: MediaTek MT7603E - Wi-Fi: MediaTek MT7615 - Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN) - LED: 2x green LED - Input: 2x tactile switch, 1x slide switch - Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND) - Power: DC 12V This device only supports channel 1-13 and 36-140. Thus, narrower frequency limits compared to other devices are required for limiting wi-fi frequency correctly. Without this, non-supported frequencies are activated. Flash instructions ================== 1. Open the router management page (192.168.0.1). 2. Update router firmware using "initramfs-kernel.bin". 3. After updating, run sysupgrade with "sysupgrade.bin". Recovery instructions ===================== WN-AX2033GR contains Zyxel Z-LOADER 1. Setup TFTP server (IP address: 10.10.10.3). 2. Put official firmware into TFTP server directory (distribution site: https://www.iodata.jp/lib/software/w/2068.htm) 3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server. 4. Connect to serial console. 5. Interrupt booting by Esc key. 6. Flash firmware using "ATNR 1,[firmware filename]" command. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [adjust for kernel 5.4, add recovery instructions/frequency comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-06 04:00:47 +01:00
DEVICE_MODEL := WN-AX2033GR
KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
ramips: add support for I-O DATA WN-AX2033GR I-O DATA WN-AX2033GR is roughly the same as I-O DATA WN-AX1167GR2. The difference is Wi-Fi feature. Specification ============= - SoC: MediaTek MT7621A - RAM: DDR3 128 MiB - Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100) - Wi-Fi: MediaTek MT7603E - Wi-Fi: MediaTek MT7615 - Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN) - LED: 2x green LED - Input: 2x tactile switch, 1x slide switch - Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND) - Power: DC 12V This device only supports channel 1-13 and 36-140. Thus, narrower frequency limits compared to other devices are required for limiting wi-fi frequency correctly. Without this, non-supported frequencies are activated. Flash instructions ================== 1. Open the router management page (192.168.0.1). 2. Update router firmware using "initramfs-kernel.bin". 3. After updating, run sysupgrade with "sysupgrade.bin". Recovery instructions ===================== WN-AX2033GR contains Zyxel Z-LOADER 1. Setup TFTP server (IP address: 10.10.10.3). 2. Put official firmware into TFTP server directory (distribution site: https://www.iodata.jp/lib/software/w/2068.htm) 3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server. 4. Connect to serial console. 5. Interrupt booting by Esc key. 6. Flash firmware using "ATNR 1,[firmware filename]" command. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [adjust for kernel 5.4, add recovery instructions/frequency comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-06 04:00:47 +01:00
endef
TARGET_DEVICES += iodata_wn-ax2033gr
2019-04-09 07:48:31 +02:00
define Device/iodata_wn-dx1167r
$(Device/iodata_nand)
2019-04-09 07:48:31 +02:00
DEVICE_MODEL := WN-DX1167R
KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
2019-04-09 07:48:31 +02:00
endef
TARGET_DEVICES += iodata_wn-dx1167r
ramips: add support for I-O DATA WN-DX1200GR I-O DATA WN-DX1200GR is a 2.4/5 GHz band 11ac (WiFi-5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : raw NAND 128 MiB - WLAN : 2.4/5 GHz 2T2R - 2.4 GHz : MediaTek MT7603E - 5 GHz : MediaTek MT7613BE - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LEDs/keys : 2x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J5: 3.3V, TX, RX, NC, GND from triangle-mark - 57600n8 - Power : 12 VDC, 1 A Flash instruction using initramfs image: 1. Boot WN-DX1200GR normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs image and click update ("更新") button to perform firmware update 4. On the initramfs image, perform sysupgrade with the squashfs-sysupgrade image 5. Wait ~120 seconds to complete flashing Notes: - currently, mt7615e driver in mt76 doesn't fully support MT7613 (MT7663) wifi chip - the eeprom data in flash is not used by mt7615e driver and the driver reports the tx-power up to 3dBm - the correct MAC address for MT7613BE in eeprom data cannot be assigned to the phy - last 0x80000 (512 KiB) in NAND flash is not used on stock firmware - stock firmware requires "customized uImage header" (called as "combo image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't - uImage magic ( 0x0 - 0x3 ) : 0x434F4D43 ("COMC") - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32" - image name (0x20 - 0x37) : model ID and firmware versions - data length (0x38 - 0x3b) : kernel + rootfs - data crc32 (0x3c - 0x3f) : kernel + rootfs MAC addresses: LAN: 50:41:B9:xx:xx:08 (Ubootenv, ethaddr (text) / Factory, 0x1E000 (hex)) WAN: 50:41:B9:xx:xx:0A (Factory, 0x1E006 (hex)) 2.4GHz: 50:41:B9:xx:xx:08 (Factory, 0x4 (hex)) 5GHz: 50:41:B9:xx:xx:09 (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [add check whether dflag_offset is set] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-26 15:50:51 +01:00
define Device/iodata_wn-dx1200gr
$(Device/iodata_nand)
DEVICE_MODEL := WN-DX1200GR
KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
uImage lzma -M 0x434f4d43 -n '3.10(XIQ.0)b20' | iodata-mstc-header
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap
endef
TARGET_DEVICES += iodata_wn-dx1200gr
ramips: add support for I-O DATA WN-DX2033GR I-O DATA WN-DX2033GR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : Raw NAND 128 MiB (Macronix MX30LF1G18AC-TI) - WLAN : 2.4/5 GHz - 2.4 GHz : 2T2R, MediaTek MT7603E - 5 GHz : 4T4R, MediaTek MT7615 - Ethernet : 5x 10/100/1000 Mbps - Switch : MediaTek MT7530 (SoC) - LEDs/Keys : 2x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J5: 3.3V, TX, RX, NC, GND from triangle mark - 57600n8 - Power : 12 VDC, 1 A Flash instruction using initramfs image: 1. Boot WN-DX2033GR normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs image and click update ("更新") button to perform firmware update 4. On the initramfs image, download the sysupgrade.bin image to the device and perform sysupgrade with it 5. Wait ~120 seconds to complete flashing Notes: - The hardware of WN-DX2033GR and WN-AX2033GR are almost the same, and it is certified under the same radio-wave related regulations in Japan - The last 0x80000 (512 KiB) in NAND flash is not used on stock firmware - stock firmware requires "customized uImage header" (called as "combo image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't - uImage magic ( 0x0 - 0x3 ) : 0x434F4D42 ("COMB") - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32" - image name (0x20 - 0x37) : model ID and firmware versions - data length (0x38 - 0x3b) : kernel + rootfs - data crc32 (0x3c - 0x3f) : kernel + rootfs - There are 2x important flags in the flash: - bootnum : select os partition for booting (persist, 0x4) - 0x01: firmware - 0x02: firmware_2 - debugflag : allow interrupt kernel loader, it's named as "Z-LOADER" (Factory, 0xFE75) - 0x00: disable debug - 0x01: enable debug MAC addresses: LAN : 50:41:B9:xx:xx:90 (Factory, 0xE000 (hex) / Ubootenv, ethaddr (text)) WAN : 50:41:B9:xx:xx:92 (Factory, 0xE006 (hex)) 2.4 GHz : 50:41:B9:xx:xx:90 (Factory, 0x4 (hex)) 5 GHz : 50:41:B9:xx:xx:91 (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-18 14:39:04 +02:00
define Device/iodata_wn-dx2033gr
$(Device/iodata_nand)
DEVICE_MODEL := WN-DX2033GR
KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
uImage lzma -M 0x434f4d42 -n '3.10(XID.0)b30' | iodata-mstc-header
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += iodata_wn-dx2033gr
define Device/iodata_wn-gx300gr
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 7616k
DEVICE_VENDOR := I-O DATA
DEVICE_MODEL := WN-GX300GR
DEVICE_PACKAGES := kmod-mt7603
endef
TARGET_DEVICES += iodata_wn-gx300gr
define Device/iodata_wnpr2600g
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := I-O DATA
DEVICE_MODEL := WNPR2600G
IMAGE_SIZE := 13952k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
elx-header 0104003a 8844A2D168B45A2D
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += iodata_wnpr2600g
define Device/iptime_a3004ns-dual
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16128k
UIMAGE_NAME := a3004nd
DEVICE_VENDOR := ipTIME
DEVICE_MODEL := A3004NS-dual
DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += iptime_a3004ns-dual
define Device/iptime_a6ns-m
$(Device/dsa-migration)
IMAGE_SIZE := 16128k
UIMAGE_NAME := a6nm
DEVICE_VENDOR := ipTIME
DEVICE_MODEL := A6ns-M
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += iptime_a6ns-m
define Device/iptime_a8004t
$(Device/dsa-migration)
IMAGE_SIZE := 16128k
UIMAGE_NAME := a8004t
DEVICE_VENDOR := ipTIME
DEVICE_MODEL := A8004T
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
endef
TARGET_DEVICES += iptime_a8004t
define Device/jcg_jhr-ac876m
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | jcg-header 89.1
JCG_MAXSIZE := 16064k
DEVICE_VENDOR := JCG
DEVICE_MODEL := JHR-AC876M
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += jcg_jhr-ac876m
define Device/jcg_q20
$(Device/dsa-migration)
BLOCKSIZE := 128k
PAGESIZE := 2048
UBINIZE_OPTS := -E 5
KERNEL_SIZE := 4096k
IMAGE_SIZE := 91136k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_VENDOR := JCG
DEVICE_MODEL := Q20
DEVICE_PACKAGES := kmod-mt7915e uboot-envtools
endef
TARGET_DEVICES += jcg_q20
define Device/jcg_y2
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | jcg-header 95.1
JCG_MAXSIZE := 16064k
DEVICE_VENDOR := JCG
DEVICE_MODEL := Y2
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
endef
TARGET_DEVICES += jcg_y2
define Device/lenovo_newifi-d1
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := Newifi
DEVICE_MODEL := D1
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += newifi-d1
endef
TARGET_DEVICES += lenovo_newifi-d1
ramips: add support for Linksys E5600 This submission relied heavily on the work of Linksys EA7300 v1/ v2. Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: 128M DDR3-1600 * Flash: 128M NAND * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/MT7613BE (2.4 GHz & 5 GHz) * Antennae: 2 internal fixed in the casing and 2 on the PCB * LEDs: Blue (x4 Ethernet) Blue+Orange (x2 Power + WPS and Internet) * Buttons: Reset (x1) WPS (x1) Installation: Flash factory image through GUI. This device has 2 partitions for the firmware called firmware and alt_firmware. To successfully flash and boot the device, the device should have been running from alt_firmware partition. To get the device booted through alt_firmware partition, download the OEM firmware from Linksys website and upgrade the firmware from web GUI. Once this is done, flash the OpenWrt Factory firmware from web GUI. Reverting to factory firmware: 1. Boot to 'alt_firmware'(where stock firmware resides) by doing one of the following: Press the "wps" button as soon as power LED turns on when booting. (OR) Hard-reset the router consecutively three times to force it to boot from 'alt_firmware'. 2. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: Aashish Kulkarni <aashishkul@gmail.com> [fix hanging indents and wrap to 74 characters per line, add kmod-mt7663-firmware-sta package for 5GHz STA mode to work, remove sysupgrade.bin and concatenate IMAGES instead in mt7621.mk, set default-state "on" for power LED] Signed-off-by: Sannihith Kinnera <digislayer@protonmail.com> [move check-size before append-metadata, remove trailing whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-02 06:10:14 +01:00
define Device/linksys_e5600
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGE_SIZE := 26624k
DEVICE_VENDOR := Linksys
DEVICE_MODEL := E5600
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
uboot-envtools
ramips: add support for Linksys E5600 This submission relied heavily on the work of Linksys EA7300 v1/ v2. Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: 128M DDR3-1600 * Flash: 128M NAND * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/MT7613BE (2.4 GHz & 5 GHz) * Antennae: 2 internal fixed in the casing and 2 on the PCB * LEDs: Blue (x4 Ethernet) Blue+Orange (x2 Power + WPS and Internet) * Buttons: Reset (x1) WPS (x1) Installation: Flash factory image through GUI. This device has 2 partitions for the firmware called firmware and alt_firmware. To successfully flash and boot the device, the device should have been running from alt_firmware partition. To get the device booted through alt_firmware partition, download the OEM firmware from Linksys website and upgrade the firmware from web GUI. Once this is done, flash the OpenWrt Factory firmware from web GUI. Reverting to factory firmware: 1. Boot to 'alt_firmware'(where stock firmware resides) by doing one of the following: Press the "wps" button as soon as power LED turns on when booting. (OR) Hard-reset the router consecutively three times to force it to boot from 'alt_firmware'. 2. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: Aashish Kulkarni <aashishkul@gmail.com> [fix hanging indents and wrap to 74 characters per line, add kmod-mt7663-firmware-sta package for 5GHz STA mode to work, remove sysupgrade.bin and concatenate IMAGES instead in mt7621.mk, set default-state "on" for power LED] Signed-off-by: Sannihith Kinnera <digislayer@protonmail.com> [move check-size before append-metadata, remove trailing whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-02 06:10:14 +01:00
UBINIZE_OPTS := -E 5
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
append-ubi | check-size | gemtek-trailer
endef
TARGET_DEVICES += linksys_e5600
define Device/linksys_ea7xxx
$(Device/dsa-migration)
ramips: add support for Linksys EA7500 v2 The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
2020-05-12 01:27:50 +02:00
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGE_SIZE := 36864k
DEVICE_VENDOR := Linksys
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware \
uboot-envtools
ramips: add support for Linksys EA7500 v2 The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
2020-05-12 01:27:50 +02:00
UBINIZE_OPTS := -E 5
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
ramips: add support for Linksys EA7500 v2 The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
2020-05-12 01:27:50 +02:00
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
endef
define Device/linksys_ea7300-v1
$(Device/linksys_ea7xxx)
DEVICE_MODEL := EA7300
DEVICE_VARIANT := v1
LINKSYS_HWNAME := EA7300
endef
TARGET_DEVICES += linksys_ea7300-v1
define Device/linksys_ea7300-v2
$(Device/linksys_ea7xxx)
DEVICE_MODEL := EA7300
DEVICE_VARIANT := v2
LINKSYS_HWNAME := EA7300v2
DEVICE_PACKAGES += kmod-mt7603
endef
TARGET_DEVICES += linksys_ea7300-v2
define Device/linksys_ea7500-v2
$(Device/linksys_ea7xxx)
DEVICE_MODEL := EA7500
DEVICE_VARIANT := v2
LINKSYS_HWNAME := EA7500v2
ramips: add support for Linksys EA7500 v2 The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
2020-05-12 01:27:50 +02:00
endef
TARGET_DEVICES += linksys_ea7500-v2
define Device/linksys_ea8100-v1
$(Device/linksys_ea7xxx)
DEVICE_MODEL := EA8100
DEVICE_VARIANT := v1
LINKSYS_HWNAME := EA8100
endef
TARGET_DEVICES += linksys_ea8100-v1
define Device/linksys_ea8100-v2
$(Device/linksys_ea7xxx)
DEVICE_MODEL := EA8100
DEVICE_VARIANT := v2
LINKSYS_HWNAME := EA8100v2
endef
TARGET_DEVICES += linksys_ea8100-v2
define Device/linksys_re6500
$(Device/dsa-migration)
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Linksys
DEVICE_MODEL := RE6500
DEVICE_PACKAGES := kmod-mt76x2
SUPPORTED_DEVICES += re6500
ramips: add support for Xiaomi Mi Router 3 Pro Hardware: CPU: MediaTek MT7621AT (2x880MHz) RAM: 512MB DDR3 FLASH: 256MB NAND WiFi: 2.4GHz 4x4 MT7615 b/g/n (Needs driver, See Issues!) WiFI: 5GHz 4x4 MT7615 a/n/ac (Needs driver, See Issues!) USB: 1x 3.0 ETH: 1x WAN 10/100/1000 3x LAN 10/100/1000 LED: Power/Status BTN: RESET UART: 115200 8n1 Partition layout and boot: Stock Xiaomi firmware has the MTD split into (among others) - kernel0 (@0x200000) - kernel1 (@0x600000) - rootfs0 - rootfs1 - overlay (ubi) Xiaomi uboot expects to find kernels at 0x200000 & 0x600000 referred to as system 1 & system 2 respectively. a kernel is considered suitable for handing control over if its linux magic number exists & uImage CRC are correct. If either of those conditions fail, a matching sys'n'_fail flag is set in uboot env & a restart performed in the hope that the alternate kernel is okay. If neither kernel checksums ok and both are marked failed, system 2 is booted anyway. Note uboot's tftp flash install writes the transferred image to both kernel partitions. Installation: Similar to the Xiaomi MIR3G, we keep stock Xiaomi firmware in kernel0 for ease of recovery, and install OpenWRT into kernel1 and after. The installation file for OpenWRT is a *squashfs-factory.bin file that contains the kernel and a ubi partition. This is flashed as follows: nvram set flag_try_sys1_failed=1 nvram set flag_try_sys2_failed=0 nvram commit dd if=factory.bin bs=1M count=4 | mtd write - kernel1 dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0 reboot Reverting to stock: The part of stock firmware we've kept in kernel0 allows us to run stock recovery, which will re-flash stock firmware from a *.bin file on a USB. For this we do the following: fw_setenv flag_try_sys1_failed 0 fw_setenv flag_try_sys2_failed 1 reboot After reboot the LED status light will blink red, at which point pressing the 'reset' button will cause stock firmware to be installed from USB. Issues: OpenWRT currently does not have support for the MT7615 wifi chips. There is ongoing work to add mt7615 support to the open source mt76 driver. Until that support is in place, there are closed-source kernel modules that can be used. See: https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/170 Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [02_network remaps, Added link to notes]
2019-03-05 09:41:37 +01:00
endef
TARGET_DEVICES += linksys_re6500
ramips: add support for Xiaomi Mi Router 3 Pro Hardware: CPU: MediaTek MT7621AT (2x880MHz) RAM: 512MB DDR3 FLASH: 256MB NAND WiFi: 2.4GHz 4x4 MT7615 b/g/n (Needs driver, See Issues!) WiFI: 5GHz 4x4 MT7615 a/n/ac (Needs driver, See Issues!) USB: 1x 3.0 ETH: 1x WAN 10/100/1000 3x LAN 10/100/1000 LED: Power/Status BTN: RESET UART: 115200 8n1 Partition layout and boot: Stock Xiaomi firmware has the MTD split into (among others) - kernel0 (@0x200000) - kernel1 (@0x600000) - rootfs0 - rootfs1 - overlay (ubi) Xiaomi uboot expects to find kernels at 0x200000 & 0x600000 referred to as system 1 & system 2 respectively. a kernel is considered suitable for handing control over if its linux magic number exists & uImage CRC are correct. If either of those conditions fail, a matching sys'n'_fail flag is set in uboot env & a restart performed in the hope that the alternate kernel is okay. If neither kernel checksums ok and both are marked failed, system 2 is booted anyway. Note uboot's tftp flash install writes the transferred image to both kernel partitions. Installation: Similar to the Xiaomi MIR3G, we keep stock Xiaomi firmware in kernel0 for ease of recovery, and install OpenWRT into kernel1 and after. The installation file for OpenWRT is a *squashfs-factory.bin file that contains the kernel and a ubi partition. This is flashed as follows: nvram set flag_try_sys1_failed=1 nvram set flag_try_sys2_failed=0 nvram commit dd if=factory.bin bs=1M count=4 | mtd write - kernel1 dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0 reboot Reverting to stock: The part of stock firmware we've kept in kernel0 allows us to run stock recovery, which will re-flash stock firmware from a *.bin file on a USB. For this we do the following: fw_setenv flag_try_sys1_failed 0 fw_setenv flag_try_sys2_failed 1 reboot After reboot the LED status light will blink red, at which point pressing the 'reset' button will cause stock firmware to be installed from USB. Issues: OpenWRT currently does not have support for the MT7615 wifi chips. There is ongoing work to add mt7615 support to the open source mt76 driver. Until that support is in place, there are closed-source kernel modules that can be used. See: https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/170 Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [02_network remaps, Added link to notes]
2019-03-05 09:41:37 +01:00
define Device/mediatek_ap-mt7621a-v60
$(Device/dsa-migration)
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Mediatek
DEVICE_MODEL := AP-MT7621A-V60 EVB
DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-wolfssl
endef
TARGET_DEVICES += mediatek_ap-mt7621a-v60
define Device/mediatek_mt7621-eval-board
$(Device/dsa-migration)
BLOCKSIZE := 64k
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 15104k
DEVICE_VENDOR := MediaTek
DEVICE_MODEL := MT7621 EVB
DEVICE_PACKAGES := -wpad-basic-wolfssl
SUPPORTED_DEVICES += mt7621
endef
TARGET_DEVICES += mediatek_mt7621-eval-board
define Device/MikroTik
$(Device/dsa-migration)
DEVICE_VENDOR := MikroTik
BLOCKSIZE := 64k
IMAGE_SIZE := 16128k
DEVICE_PACKAGES := kmod-usb3
KERNEL_NAME := vmlinuz
KERNEL := kernel-bin | append-dtb-elf
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | \
append-metadata
endef
define Device/mikrotik_routerboard-750gr3
$(Device/MikroTik)
DEVICE_MODEL := RouterBOARD 750Gr3
DEVICE_PACKAGES += -wpad-basic-wolfssl
SUPPORTED_DEVICES += mikrotik,rb750gr3
endef
TARGET_DEVICES += mikrotik_routerboard-750gr3
ramips: add support for MikroTik RouterBOARD 760iGS (hEX S) This patch adds support for the MikroTik RouterBOARD 760iGS router. It is similar to the already supported RouterBOARD 750Gr3. The 760iGS device features an added SFP cage, and passive PoE out on port 5 compared to the RB750Gr3. https://mikrotik.com/product/hex_s Specifications: - SoC: MediaTek MT7621A - CPU: 880MHz - Flash: 16 MB - RAM: 256 MB - Ethernet: 5x 10/100/1000 Mbps - SFP cage - USB port - microSD slot Unsupported: - Beeper (requires PWM driver) - ZT2046Q (ADS7846 compatible) on SPI as slave 1 (CS1) The linux driver requires an interrupt, and pendown GPIO These are unknown, and not needed with the touchscreen only used for temperature and voltage monitoring. ads7846 hwmon: temp0 is degrees Celsius temp1 is voltage * 32 GPIOs: - 07: input passive PoE out (lan5) compatible (Mikrotik) device connected - 17: output passive PoE out (lan5) switch Installation through RouterBoot follows the usual MikroTik method https://openwrt.org/toh/mikrotik/common To boot to intramfs image in RAM: 1. Setup TFTP server to serve intramfs image. 2. Plug Ethernet cable into WAN port. 3. Unplug power, hold reset button and plug power in. Wait (~25 seconds) for beep and then release reset button. The SFP LED will be lit in RouterBoot, but will not be lit in OpenWRT. 4. Wait for a minute. Router should be running OpenWrt, check by plugging in to port 2-5 and going to 192.168.1.1. To install OpenWrt to flash: 1. Follow steps above to boot intramfs image in RAM. 2. Flash the sysupgrade.bin image with web interface or sysupgrade. 3. Once the router reboots you will be running OpenWrt from flash. OEM firmware differences: - RouterOS assigns a different MAC address for each port - The first address (E01 on the sticker) is used for wan (ether1 in OEM). - The next address is used for lan2. - The last address (E06 on the sticker) is used for sfp. [Initial port work, shared dtsi] Signed-off-by: Vince Grassia <vincenzo.grassia@zionark.com> [SFP support and GPIO identification] Signed-off-by: Luka Logar <luka.logar@iname.com> [Misc. fixes and submission] Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> [rebase, drop uart3 from state_default on 750gr3, minor commit title/message facelift] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-11 00:15:40 +02:00
define Device/mikrotik_routerboard-760igs
$(Device/MikroTik)
DEVICE_MODEL := RouterBOARD 760iGS
DEVICE_PACKAGES += kmod-sfp -wpad-basic-wolfssl
ramips: add support for MikroTik RouterBOARD 760iGS (hEX S) This patch adds support for the MikroTik RouterBOARD 760iGS router. It is similar to the already supported RouterBOARD 750Gr3. The 760iGS device features an added SFP cage, and passive PoE out on port 5 compared to the RB750Gr3. https://mikrotik.com/product/hex_s Specifications: - SoC: MediaTek MT7621A - CPU: 880MHz - Flash: 16 MB - RAM: 256 MB - Ethernet: 5x 10/100/1000 Mbps - SFP cage - USB port - microSD slot Unsupported: - Beeper (requires PWM driver) - ZT2046Q (ADS7846 compatible) on SPI as slave 1 (CS1) The linux driver requires an interrupt, and pendown GPIO These are unknown, and not needed with the touchscreen only used for temperature and voltage monitoring. ads7846 hwmon: temp0 is degrees Celsius temp1 is voltage * 32 GPIOs: - 07: input passive PoE out (lan5) compatible (Mikrotik) device connected - 17: output passive PoE out (lan5) switch Installation through RouterBoot follows the usual MikroTik method https://openwrt.org/toh/mikrotik/common To boot to intramfs image in RAM: 1. Setup TFTP server to serve intramfs image. 2. Plug Ethernet cable into WAN port. 3. Unplug power, hold reset button and plug power in. Wait (~25 seconds) for beep and then release reset button. The SFP LED will be lit in RouterBoot, but will not be lit in OpenWRT. 4. Wait for a minute. Router should be running OpenWrt, check by plugging in to port 2-5 and going to 192.168.1.1. To install OpenWrt to flash: 1. Follow steps above to boot intramfs image in RAM. 2. Flash the sysupgrade.bin image with web interface or sysupgrade. 3. Once the router reboots you will be running OpenWrt from flash. OEM firmware differences: - RouterOS assigns a different MAC address for each port - The first address (E01 on the sticker) is used for wan (ether1 in OEM). - The next address is used for lan2. - The last address (E06 on the sticker) is used for sfp. [Initial port work, shared dtsi] Signed-off-by: Vince Grassia <vincenzo.grassia@zionark.com> [SFP support and GPIO identification] Signed-off-by: Luka Logar <luka.logar@iname.com> [Misc. fixes and submission] Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> [rebase, drop uart3 from state_default on 750gr3, minor commit title/message facelift] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-11 00:15:40 +02:00
endef
TARGET_DEVICES += mikrotik_routerboard-760igs
define Device/mikrotik_routerboard-m11g
$(Device/MikroTik)
DEVICE_MODEL := RouterBOARD M11G
DEVICE_PACKAGES := -wpad-basic-wolfssl
SUPPORTED_DEVICES += mikrotik,rbm11g
endef
TARGET_DEVICES += mikrotik_routerboard-m11g
define Device/mikrotik_routerboard-m33g
$(Device/MikroTik)
DEVICE_MODEL := RouterBOARD M33G
DEVICE_PACKAGES := -wpad-basic-wolfssl
SUPPORTED_DEVICES += mikrotik,rbm33g
endef
TARGET_DEVICES += mikrotik_routerboard-m33g
define Device/mqmaker_witi
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := MQmaker
DEVICE_MODEL := WiTi
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
endef
TARGET_DEVICES += mqmaker_witi
define Device/mtc_wr1201
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16000k
DEVICE_VENDOR := MTC
DEVICE_MODEL := Wireless Router WR1201
KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'WR1201_8_128'
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += mtc_wr1201
define Device/netgear_ex6150
$(Device/dsa-migration)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := EX6150
DEVICE_PACKAGES := kmod-mt76x2
NETGEAR_BOARD_ID := U12H318T00_NETGEAR
IMAGE_SIZE := 14848k
IMAGES += factory.chk
IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | netgear-chk
endef
TARGET_DEVICES += netgear_ex6150
define Device/netgear_sercomm_nand
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
ramips: add support for Netgear R6350 Netgear R6350 is a wireless router, aka Netgear AC1750. Specification: - SoC: Mediatek MT7621AT (2 CPU cores, 4 threads) - RAM: 128MiB (Nanya NT5CC64M16GP-DI) - ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI) - Wireless: for 11b/g/n (upto 300Mbps): MT7603 for 11a/ac (upto 1450Mbps) : MT7615, is not avaliable now - Ethernet LAN speed: up to 1000Mbps - Ethernet LAN ports: 4 - Ethernet WAN speed: up to 1000Mbps - Ethernet WAN ports: 1 - USB ports: 1 (USB 2.0) - LEDs: 4 (all can be controlled by SoC's GPIO) - buttons: 2 - serial ports: unknown Installation through telnet: - Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port on the router. - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug (login if required, default: admin password) - You will see "Debug Enabled!" - Telnet 192.168.1.1 and login with "root" - ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for example. - cd /mnt/shares/myUdisk - mtd_write write rootfs.bin Rootfs - mtd_write write kernel.bin Kernel - reboot recovery when bricked: nmrpflash can be used to recover to the netgear firmware if a broken image was flashed. The SC_PART_MAP partition suggests that an on flash partition table exists. After implementing a partition parser/builder for the sercom partition format, the definitions don't match the flash layout used by the stock firmware. It either means the partition format has not yet been completely understood or it isn't used by the stock firmware. For now, use fixed partitions instead. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [apply latest ramips changes and document the on flash partition map issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-08-24 03:36:13 +02:00
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
UBINIZE_OPTS := -E 5
IMAGES += factory.img kernel.bin rootfs.bin
IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | \
append-ubi | pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
ramips: add support for Netgear R6350 Netgear R6350 is a wireless router, aka Netgear AC1750. Specification: - SoC: Mediatek MT7621AT (2 CPU cores, 4 threads) - RAM: 128MiB (Nanya NT5CC64M16GP-DI) - ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI) - Wireless: for 11b/g/n (upto 300Mbps): MT7603 for 11a/ac (upto 1450Mbps) : MT7615, is not avaliable now - Ethernet LAN speed: up to 1000Mbps - Ethernet LAN ports: 4 - Ethernet WAN speed: up to 1000Mbps - Ethernet WAN ports: 1 - USB ports: 1 (USB 2.0) - LEDs: 4 (all can be controlled by SoC's GPIO) - buttons: 2 - serial ports: unknown Installation through telnet: - Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port on the router. - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug (login if required, default: admin password) - You will see "Debug Enabled!" - Telnet 192.168.1.1 and login with "root" - ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for example. - cd /mnt/shares/myUdisk - mtd_write write rootfs.bin Rootfs - mtd_write write kernel.bin Kernel - reboot recovery when bricked: nmrpflash can be used to recover to the netgear firmware if a broken image was flashed. The SC_PART_MAP partition suggests that an on flash partition table exists. After implementing a partition parser/builder for the sercom partition format, the definitions don't match the flash layout used by the stock firmware. It either means the partition format has not yet been completely understood or it isn't used by the stock firmware. For now, use fixed partitions instead. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [apply latest ramips changes and document the on flash partition map issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-08-24 03:36:13 +02:00
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/kernel.bin := append-kernel
IMAGE/rootfs.bin := append-ubi | check-size
DEVICE_VENDOR := NETGEAR
DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport
endef
define Device/netgear_r6220
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6220
SERCOMM_HWNAME := R6220
SERCOMM_HWID := AYA
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0086
IMAGE_SIZE := 28672k
DEVICE_PACKAGES += kmod-mt76x2
SUPPORTED_DEVICES += r6220
ramips: add support for Netgear R6350 Netgear R6350 is a wireless router, aka Netgear AC1750. Specification: - SoC: Mediatek MT7621AT (2 CPU cores, 4 threads) - RAM: 128MiB (Nanya NT5CC64M16GP-DI) - ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI) - Wireless: for 11b/g/n (upto 300Mbps): MT7603 for 11a/ac (upto 1450Mbps) : MT7615, is not avaliable now - Ethernet LAN speed: up to 1000Mbps - Ethernet LAN ports: 4 - Ethernet WAN speed: up to 1000Mbps - Ethernet WAN ports: 1 - USB ports: 1 (USB 2.0) - LEDs: 4 (all can be controlled by SoC's GPIO) - buttons: 2 - serial ports: unknown Installation through telnet: - Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port on the router. - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug (login if required, default: admin password) - You will see "Debug Enabled!" - Telnet 192.168.1.1 and login with "root" - ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for example. - cd /mnt/shares/myUdisk - mtd_write write rootfs.bin Rootfs - mtd_write write kernel.bin Kernel - reboot recovery when bricked: nmrpflash can be used to recover to the netgear firmware if a broken image was flashed. The SC_PART_MAP partition suggests that an on flash partition table exists. After implementing a partition parser/builder for the sercom partition format, the definitions don't match the flash layout used by the stock firmware. It either means the partition format has not yet been completely understood or it isn't used by the stock firmware. For now, use fixed partitions instead. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [apply latest ramips changes and document the on flash partition map issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-08-24 03:36:13 +02:00
endef
TARGET_DEVICES += netgear_r6220
ramips: add support for Netgear R6350 Netgear R6350 is a wireless router, aka Netgear AC1750. Specification: - SoC: Mediatek MT7621AT (2 CPU cores, 4 threads) - RAM: 128MiB (Nanya NT5CC64M16GP-DI) - ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI) - Wireless: for 11b/g/n (upto 300Mbps): MT7603 for 11a/ac (upto 1450Mbps) : MT7615, is not avaliable now - Ethernet LAN speed: up to 1000Mbps - Ethernet LAN ports: 4 - Ethernet WAN speed: up to 1000Mbps - Ethernet WAN ports: 1 - USB ports: 1 (USB 2.0) - LEDs: 4 (all can be controlled by SoC's GPIO) - buttons: 2 - serial ports: unknown Installation through telnet: - Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port on the router. - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug (login if required, default: admin password) - You will see "Debug Enabled!" - Telnet 192.168.1.1 and login with "root" - ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for example. - cd /mnt/shares/myUdisk - mtd_write write rootfs.bin Rootfs - mtd_write write kernel.bin Kernel - reboot recovery when bricked: nmrpflash can be used to recover to the netgear firmware if a broken image was flashed. The SC_PART_MAP partition suggests that an on flash partition table exists. After implementing a partition parser/builder for the sercom partition format, the definitions don't match the flash layout used by the stock firmware. It either means the partition format has not yet been completely understood or it isn't used by the stock firmware. For now, use fixed partitions instead. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [apply latest ramips changes and document the on flash partition map issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-08-24 03:36:13 +02:00
define Device/netgear_r6260
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6260
SERCOMM_HWNAME := R6260
SERCOMM_HWID := CHJ
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6260
define Device/netgear_r6350
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6350
SERCOMM_HWNAME := R6350
SERCOMM_HWID := CHJ
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6350
ramips: add support for MikroTik RouterBOARD RBM11g This commit adds support for the MikroTik RouterBOARD RBM11g. =Hardware= The RBM11g is a mt7621 based device featuring one GbE port and one miniPCIe slot with a sim card socket and USB 2.0. ==Switch== The single onboard Ethernet port is connected the CPU directly. The internal switch of the mt7621 SoC is disabled. ==Flash== The device has one spi nor flash chip. It is a 128 Mbit winbond 25Q128FVS connected to CS0. ==PCIe== The board features a single miniPCIe slot. It has a dedicated mini SIM socket and a USB 2.0 port. Power to the miniPCIe slot is controlled via GPIO9. ==USB== There are no external USB ports. ==Power== The board can accept both, passive PoE and external power via a 2.1 mm barrel jack (center-positive). The input voltage range is 11-32 V. ==Serial port== The device does have an onboard UART on an unpopulated header next to the flash chip: GND: pin 2 TX: pin 7 RX: pin 6 Settings: 115200, 8N1 See below illustration for positioning of the header. 0 = screw hole * = some pin T = TX pin R = RX pin G = GND pin Pinout: +--------------- |O | __ | / \ | \__/ | | | | +---+ | |RAM| | +--+ | | | |**| <- unpopulated header with UART | |*T| +---+ | |R*| +--------+ | |**| | | | |G*| | CPU | | +--+ | | | +--+ | | | | | +--------+ | +--+ <- flash chip |O | +-----+ | | | |+--+ | | || | | | +--------------------- =Installation= To install an OpenWRT image to the device two components must be built: 1. A openwrt initramfs image 2. A openwrt sysupgrade image ===initramfs & sysupgrade image=== Select target devices "Mikrotik RBM11G" in openwrt menuconfig and build the images. This will create the images "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" and "openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" in the output directory. ==Installing== **Make sure to back up your RouterOS license in case you do ever want to go back to RouterOS using "/system license output" and back up the created license file.** When rebooted the board will try booting via ethernet first. If your board does not boot via ethernet automatically you will have to attach to the serial port and set ethernet as boot device within RouterBOOT. 1. Set up a dhcp server that points the bootfile to tftp server serving the "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" initramfs image 2. Connect to ethernet port on board 3. Power on the board 4. Wait for OpenWrt to boot Right now OpenWrt will be running with a SSH server listening. Now OpenWrt must be flashed to the devices flash: 1. Copy "openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" to the device using scp. 2. Write openwrt to flash using "sysupgrade openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" Once the flashing completes the board will reboot. Disconnect from the devices ethernet port or stop the DHCP/TFTP server to prevent the device from booting via ethernet again. The device should now boot straight to OpenWrt. Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2018-06-25 22:51:43 +02:00
define Device/netgear_r6700-v2
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6700
DEVICE_VARIANT := v2
DEVICE_ALT0_VENDOR := NETGEAR
DEVICE_ALT0_MODEL := Nighthawk AC2400
DEVICE_ALT0_VARIANT := v1
DEVICE_ALT1_VENDOR := NETGEAR
DEVICE_ALT1_MODEL := Nighthawk AC2100
DEVICE_ALT1_VARIANT := v1
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1032
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6700-v2
define Device/netgear_r6800
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6800
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0062
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6800
define Device/netgear_r6850
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6850
SERCOMM_HWNAME := R6850
SERCOMM_HWID := CHJ
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0052
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6850
define Device/netgear_r6900-v2
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R6900
DEVICE_VARIANT := v2
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1032
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r6900-v2
define Device/netgear_r7200
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R7200
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1032
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r7200
define Device/netgear_r7450
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := R7450
SERCOMM_HWNAME := R6950
SERCOMM_HWID := BZV
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1032
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_r7450
define Device/netgear_wac104
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := WAC104
SERCOMM_HWNAME := WAC104
SERCOMM_HWID := CAY
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0006
IMAGE_SIZE := 28672k
DEVICE_PACKAGES += kmod-mt76x2
endef
TARGET_DEVICES += netgear_wac104
define Device/netgear_wac124
$(Device/netgear_sercomm_nand)
DEVICE_MODEL := WAC124
SERCOMM_HWNAME := WAC124
SERCOMM_HWID := CTL
SERCOMM_HWVER := A003
SERCOMM_SWVER := 0x0402
IMAGE_SIZE := 40960k
DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += netgear_wac124
define Device/netgear_wndr3700-v5
$(Device/dsa-migration)
$(Device/netgear_sercomm_nor)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 15232k
DEVICE_MODEL := WNDR3700
DEVICE_VARIANT := v5
SERCOMM_HWNAME := WNDR3700v5
SERCOMM_HWID := AYB
SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1054
SERCOMM_PAD := 320k
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += wndr3700v5
ramips: add support for MTC Wireless Router WR1201 MTC Wireless Router WR1201 is the OEM name of the board. It is also sold rebranded as STRONG Dual Band Gigabit Router 1200. Specification: - SoC: MediaTek MT7621A (880 MHz) - Flash: 16 MiB - RAM: 128 MiB - Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN) - Ethernet speed: 10/100/1000 - Ethernet ports: 4+1 - 1x USB 3.0 - 1x microSD reader - Serial baud rate of Bootloader and factory firmware: 57600 The OEM webinterface writes only as much bytes as listed in the uImage header field to the flash. Also, the OEM webinterface evaluates the name field of uImage header before flashing (the string "WR1201_8_128") To flash via webinterface, is mandatory to use first initramfs.bin and after (from the OpenWrt) the sysupgrade.bin Some notes: - Some microSD will not work: mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: card claims to support voltages below defined range mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
2018-11-30 00:13:53 +01:00
endef
TARGET_DEVICES += netgear_wndr3700-v5
ramips: add support for MTC Wireless Router WR1201 MTC Wireless Router WR1201 is the OEM name of the board. It is also sold rebranded as STRONG Dual Band Gigabit Router 1200. Specification: - SoC: MediaTek MT7621A (880 MHz) - Flash: 16 MiB - RAM: 128 MiB - Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN) - Ethernet speed: 10/100/1000 - Ethernet ports: 4+1 - 1x USB 3.0 - 1x microSD reader - Serial baud rate of Bootloader and factory firmware: 57600 The OEM webinterface writes only as much bytes as listed in the uImage header field to the flash. Also, the OEM webinterface evaluates the name field of uImage header before flashing (the string "WR1201_8_128") To flash via webinterface, is mandatory to use first initramfs.bin and after (from the OpenWrt) the sysupgrade.bin Some notes: - Some microSD will not work: mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: card claims to support voltages below defined range mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising SDIO card mtk-sd 1e130000.sdhci: no support for card's volts mmc0: error -22 whilst initialising MMC card Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
2018-11-30 00:13:53 +01:00
define Device/netis_wf2881
$(Device/dsa-migration)
BLOCKSIZE := 128k
PAGESIZE := 2048
FILESYSTEMS := squashfs
KERNEL_SIZE := 4096k
IMAGE_SIZE := 129280k
UBINIZE_OPTS := -E 5
UIMAGE_NAME := WF2881_0.0.00
KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_VENDOR := NETIS
DEVICE_MODEL := WF2881
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += netis_wf2881
define Device/phicomm_k2p
$(Device/dsa-migration)
IMAGE_SIZE := 15744k
DEVICE_VENDOR := Phicomm
DEVICE_MODEL := K2P
DEVICE_ALT0_VENDOR := Phicomm
DEVICE_ALT0_MODEL := KE 2P
SUPPORTED_DEVICES += k2p
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += phicomm_k2p
define Device/planex_vr500
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 65216k
DEVICE_VENDOR := Planex
DEVICE_MODEL := VR500
DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
SUPPORTED_DEVICES += vr500
endef
TARGET_DEVICES += planex_vr500
define Device/samknows_whitebox-v8
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := SamKnows
DEVICE_MODEL := Whitebox 8
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport uboot-envtools
SUPPORTED_DEVICES += sk-wb8
endef
TARGET_DEVICES += samknows_whitebox-v8
define Device/sercomm_na502
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 20480k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
UBINIZE_OPTS := -E 5
KERNEL_SIZE := 4096k
DEVICE_VENDOR := SERCOMM
DEVICE_MODEL := NA502
DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3
endef
TARGET_DEVICES += sercomm_na502
define Device/storylink_sap-g3200u3
$(Device/dsa-migration)
IMAGE_SIZE := 7872k
DEVICE_VENDOR := STORYLiNK
DEVICE_MODEL := SAP-G3200U3
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += sap-g3200u3
endef
TARGET_DEVICES += storylink_sap-g3200u3
define Device/telco-electronics_x1
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Telco Electronics
DEVICE_MODEL := X1
DEVICE_PACKAGES := kmod-usb3 kmod-mt76
endef
TARGET_DEVICES += telco-electronics_x1
ramips: add support for Tenbay T-MB5EU-V01 Hardware -------- MediaTek MT7621 SoC 256M DDR3 16MB BoHong SPI-NOR MediaTek MT7905+7975 2x2T2R DBDC bgnax / acax RGB LED WPS + RESET Button UART on compute module (silkscreened / 115200n8) The router itself is just a board with Power / USB / RJ-45 connectors and DC/DC converters. The SoC and WiFi components are on a daughterboard which connect using two M.2 connectors. The compute module has the model number "T-CB1800K-DM2 V02" printed on it. The main baord has "T-MB5EU V01" printed on it. This information might be useful, as it's highly likely either of these two will be reused in similar designs. The router itself is sold as Tenbay T-MB5EU directly from the OEM as well as "KuWFI AX1800 Smart WiFi 6 Eouter" on Amazon.de for ~50€ in a slightly different case. Installation ------------ A Tool for creating a factory image for the Vendor Web Interface can be found here: https://github.com/blocktrron/t-mb5eu-v01-factory-creator/ As the OEM Firmware is just a modified LEDE 17.01, you can also access failsafe mode via UART while the OS boots, by connecting to UART and pressing "f" when prompted. The Router is reachable at 192.168.1.1 via root without password. Transfer the OpenWrt sysupgrade image via scp and apply with sysupgrade using the -n and -F flags. Alternatively, the board can be flashed by attaching to the UART console, interrupting the boot process by keeping "0" pressed while attaching power. Serve the OpenWrt initramfs using a TFTP server with address 192.168.1.66. Rename the initramfs to ax1800.bin. Attach your TFTP server to one of the LAN ports. Execute the following commands. $ setenv ipaddr 192.168.1.67 $ setenv serverip 192.168.1.66 $ tftpboot 0x84000000 ax1800.bin $ bootm Wait for the device to boot. Then transfer the OpenWrt sysupgrade image to the device using SCP and apply sysupgrade. Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-06 18:07:18 +02:00
define Device/tenbay_t-mb5eu-v01
$(Device/dsa-migration)
DEVICE_VENDOR := Tenbay
DEVICE_MODEL := T-MB5EU-V01
DEVICE_DTS_CONFIG := config@1
DEVICE_PACKAGES += kmod-mt7915e kmod-usb3
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
IMAGE_SIZE := 15808k
SUPPORTED_DEVICES += mt7621-dm2-t-mb5eu-v01-nor
endef
TARGET_DEVICES += tenbay_t-mb5eu-v01
define Device/thunder_timecloud
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Thunder
DEVICE_MODEL := Timecloud
DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
SUPPORTED_DEVICES += timecloud
endef
TARGET_DEVICES += thunder_timecloud
define Device/totolink_a7000r
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
UIMAGE_NAME := C8340R1C-9999
DEVICE_VENDOR := TOTOLINK
DEVICE_MODEL := A7000R
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += totolink_a7000r
define Device/totolink_x5000r
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
UIMAGE_NAME := C8343R-9999
DEVICE_VENDOR := TOTOLINK
DEVICE_MODEL := X5000R
DEVICE_PACKAGES := kmod-mt7915e
endef
TARGET_DEVICES += totolink_x5000r
ramips: add support for TP-Link Archer A6 v3 The patch adds support for the TP-Link Archer A6 v3 The router is sold in US and India with FCC ID TE7A6V3 Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-a6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated from serial console only. Press 'x' while u-boot is starting Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Thanks to: Frankis for Randmon MAC address fix. Signed-off-by: Vinay Patil <post2vinay@gmail.com> [remove superfluous factory image definition, whitespacing] Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-19 03:22:51 +02:00
define Device/tplink_archer-a6-v3
$(Device/dsa-migration)
$(Device/tplink-safeloader)
DEVICE_MODEL := Archer A6
DEVICE_VARIANT := V3
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \
kmod-mt7663-firmware-ap
ramips: add support for TP-Link Archer A6 v3 The patch adds support for the TP-Link Archer A6 v3 The router is sold in US and India with FCC ID TE7A6V3 Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-a6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated from serial console only. Press 'x' while u-boot is starting Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Thanks to: Frankis for Randmon MAC address fix. Signed-off-by: Vinay Patil <post2vinay@gmail.com> [remove superfluous factory image definition, whitespacing] Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-19 03:22:51 +02:00
TPLINK_BOARD_ID := ARCHER-A6-V3
KERNEL := $(KERNEL_DTB) | uImage lzma
IMAGE_SIZE := 15744k
endef
TARGET_DEVICES += tplink_archer-a6-v3
ramips: add support for TP-Link Archer C6 v3 The patch adds support for the TP-Link Archer C6 v3 (FCC ID TE7A6V3) The patch adds identification changes to the existing TP-Link Archer A6, by Vinay Patil <post2vinay@gmail.com>, which has identical hardware. Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-c6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated by powercycling the router four times before the boot process is complete. Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Signed-off-by: Amish Vishwakarma <vishwakarma.amish@gmail.com> [fix indent] Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-05 09:01:00 +02:00
define Device/tplink_archer-c6-v3
$(Device/dsa-migration)
$(Device/tplink-safeloader)
DEVICE_MODEL := Archer C6
DEVICE_VARIANT := V3
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \
kmod-mt7663-firmware-ap
ramips: add support for TP-Link Archer C6 v3 The patch adds support for the TP-Link Archer C6 v3 (FCC ID TE7A6V3) The patch adds identification changes to the existing TP-Link Archer A6, by Vinay Patil <post2vinay@gmail.com>, which has identical hardware. Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-c6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated by powercycling the router four times before the boot process is complete. Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Signed-off-by: Amish Vishwakarma <vishwakarma.amish@gmail.com> [fix indent] Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-05 09:01:00 +02:00
TPLINK_BOARD_ID := ARCHER-C6-V3
KERNEL := $(KERNEL_DTB) | uImage lzma
IMAGE_SIZE := 15744k
endef
TARGET_DEVICES += tplink_archer-c6-v3
ramips: add support for TP-Link Archer C6U v1 (EU) This patch adds support for TP-Link Archer C6U v1 (EU). The device is also known in some market as Archer C6 v3. This patch supports only Archer C6U v1 (EU). Specifications: -------------- * SoC: Mediatek MT7621AT 2C2T, 880MHz * RAM: 128MB DDR3 * Flash: 16MB SPI NOR flash (Winbond 25Q128) * WiFi 5GHz: Mediatek MT7613BEN (2x2:2) * WiFi 2.4GHz: Mediatek MT7603EN (2x2:2) * Ethernet: MT7630, 5x 1000Base-T. * LED: Power, WAN, LAN, WiFi 2GHz and 5GHz, USB * Buttons: Reset, WPS. * UART: Serial console (115200 8n1), J1(GND:3) * USB: One USB2 port. Installation: ------------ Install the OpenWrt factory image for C6U is from the TP-Link web interface. 1) Go to "Advanced/System Tools/Firmware Update". 2) Click "Browse" and upload the OpenWrt factory image: openwrt-ramips-mt7621-tplink_archer-c6u-v1-squashfs-factory.bin. 3) Click the "Upgrade" button, and select "Yes" when prompted. Recovery to stock firmware: -------------------------- The C6U bootloader has a failsafe mode that provides a web interface (running at 192.168.0.1) for reverting back to the stock TP-Link firmware. The failsafe interface is triggered from the serial console or on failed kernel boot. Unfortunately, there's no key combination that enables the failsafe mode. This gives us two options for recovery: 1) Recover using the serial console (J1 header). The recovery interface can be selected by hitting 'x' when prompted on boot. 2) Trigger the bootloader failsafe mode. A more dangerous option is force the bootloader into recovery mode by erasing the OpenWrt partition from the OpenWrt's shell - e.g "mtd erase firmware". Please be careful, since erasing the wrong partition can brick your device. MAC addresses: ------------- OEM firmware configuration: D8:07:B6:xx:xx:83 : 5G D8:07:B6:xx:xx:84 : LAN (label) D8:07:B6:xx:xx:84 : 2.4G D8:07:B6:xx:xx:85 : WAN Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com>
2020-07-31 13:02:21 +02:00
define Device/tplink_archer-c6u-v1
$(Device/dsa-migration)
$(Device/tplink-safeloader)
DEVICE_MODEL := Archer C6U
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7603 \
kmod-mt7615e kmod-mt7663-firmware-ap \
kmod-usb3 kmod-usb-ledtrig-usbport
KERNEL := $(KERNEL_DTB) | uImage lzma
TPLINK_BOARD_ID := ARCHER-C6U-V1
IMAGE_SIZE := 15744k
endef
TARGET_DEVICES += tplink_archer-c6u-v1
ramips: mt7621: add TP-Link EAP235-Wall support The TP-Link EAP235-Wall is a wall-mounted, PoE-powered AC1200 access point with four gigabit ethernet ports. When connecting to the device's serial port, it is strongly advised to use an isolated UART adapter. This prevents linking different power domains created by the PoE power supply, which may damage your devices. The device's U-Boot supports saving modified environments with `saveenv`. However, there is no u-boot-env partition, and saving modifications will cause the partition table to be overwritten. This is not an issue for running OpenWrt, but will prevent the vendor FW from functioning properly. Device specifications: * SoC: MT7621DAT * RAM: 128MiB * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (MT7603EN): b/g/n, 2x2 * Wireless 5GHz (MT7613BEN): a/n/ac, 2x2 * Ethernet: 4× GbE * Back side: ETH0, PoE PD port * Bottom side: ETH1, ETH2, ETH3 * Single white device LED * LED button, reset button (available for failsafe) * PoE pass-through on port ETH3 (enabled with GPIO) Datasheet of the flash chip specifies a maximum frequency of 33MHz, but that didn't work. 20MHz gives no errors with reading (flash dump) or writing (sysupgrade). Device mac addresses: Stock firmware uses the same MAC address for ethernet (on device label) and 2.4GHz wireless. The 5GHz wireless address is incremented by one. This address is stored in the 'info' ('default-mac') partition at an offset of 8 bytes. From OEM ifconfig: eth a4:2b:b0:...:88 ra0 a4:2b:b0:...:88 rai0 a4:2b:b0:...:89 Flashing instructions: * Enable SSH in the web interface, and SSH into the target device * run `cliclientd stopcs`, this should return "success" * upload the factory image via the web interface Debricking: U-boot can be interrupted during boot, serial console is 57600 baud, 8n1 This allows installing a sysupgrade image, or fixing the device in another way. * Access serial header from the side of the board, close to ETH3, pin-out is (1:TX, 2:RX, 3:GND, 4:3.3V), with pin 1 closest to ETH3. * Interrupt bootloader by holding '4' during boot, which drops the bootloader into its shell * Change default 'serverip' and 'ipaddr' variables (optional) * Download initramfs with `tftpboot`, and boot image with `bootm` # tftpboot 84000000 openwrt-initramfs.bin # bootm Revert to stock: Using the tplink-safeloader utility from the firmware-utils package, TP-Link's firmware image can be converted to an OpenWrt-compatible sysupgrade image: $ ./staging_dir/host/bin/tplink-safeloader -B EAP235-WALL-V1 \ -z EAP235-WALLv1_XXX_up_signed.bin -o eap235-sysupgrade.bin This can then be flashed using the OpenWrt sysupgrade interface. The image will appear to be incompatible and must be force flashed, without keeping the current configuration. Known issues: - DFS support is incomplete (known issue with MT7613) - MT7613 radio may stop responding when idling, reboot required. This was an issue with the ddc75ff704 version of mt76, but appears to have improved/disappeared with bc3963764d. Error notice example: [ 7099.554067] mt7615e 0000:02:00.0: Message 73 (seq 1) timeout Hardware was kindly provided for porting by Stijn Segers. Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Sander Vanheule <sander@svanheule.net>
2021-02-18 20:52:53 +01:00
define Device/tplink_eap235-wall-v1
$(Device/dsa-migration)
$(Device/tplink-safeloader)
DEVICE_MODEL := EAP235-Wall
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap
TPLINK_BOARD_ID := EAP235-WALL-V1
IMAGE_SIZE := 13440k
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory | \
pad-extra 128
endef
TARGET_DEVICES += tplink_eap235-wall-v1
2019-04-17 20:17:45 +02:00
define Device/tplink_re350-v1
$(Device/dsa-migration)
2019-04-17 20:17:45 +02:00
$(Device/tplink-safeloader)
DEVICE_MODEL := RE350
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
2019-04-17 20:17:45 +02:00
TPLINK_BOARD_ID := RE350-V1
IMAGE_SIZE := 6016k
SUPPORTED_DEVICES += re350-v1
endef
TARGET_DEVICES += tplink_re350-v1
define Device/tplink_re500-v1
$(Device/dsa-migration)
$(Device/tplink-safeloader)
DEVICE_MODEL := RE500
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
TPLINK_BOARD_ID := RE500-V1
IMAGE_SIZE := 14208k
endef
TARGET_DEVICES += tplink_re500-v1
2019-04-17 20:17:45 +02:00
define Device/tplink_re650-v1
$(Device/dsa-migration)
2019-04-17 20:17:45 +02:00
$(Device/tplink-safeloader)
DEVICE_MODEL := RE650
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
2019-04-17 20:17:45 +02:00
TPLINK_BOARD_ID := RE650-V1
IMAGE_SIZE := 14208k
endef
TARGET_DEVICES += tplink_re650-v1
define Device/ubnt_edgerouter_common
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := Ubiquiti
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 256768k
FILESYSTEMS := squashfs
KERNEL_SIZE := 3145728
KERNEL_INITRAMFS := $$(KERNEL) | \
ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES += -wpad-basic-wolfssl
endef
define Device/ubnt_edgerouter-x
$(Device/ubnt_edgerouter_common)
DEVICE_MODEL := EdgeRouter X
SUPPORTED_DEVICES += ubnt-erx ubiquiti,edgerouterx
endef
TARGET_DEVICES += ubnt_edgerouter-x
define Device/ubnt_edgerouter-x-sfp
$(Device/ubnt_edgerouter_common)
DEVICE_MODEL := EdgeRouter X SFP
DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp
SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp
endef
TARGET_DEVICES += ubnt_edgerouter-x-sfp
ramips: add support for Ubiquiti UniFi 6 Lite Hardware -------- MediaTek MT7621AT 256M DDR3 32M SPI-NOR MediaTek MT7603 2T2R 802.11n 2.4GHz MediaTek MT7915 2T2R 802.11ax 5GHz Not Working ----------- - Bluetooth (connected to UART3) UART ---- UART is located in the lower left corner of the board. Pinout is 0 - 3V3 (don't connect) 1 - RX 2 - TX 3 - GND Console is 115200 8N1. Boot ---- 1. Connect to the serial console and connect power. 2. Double-press ESC when prompted 3. Set the fdt address $ fdt addr $(fdtcontroladdr) 4. Remove the signature node from the control FDT $ fdt rm /signature 5. Transfer and boot the OpenWrt initramfs image to the device. Make sure to name the file C0A80114.img and have it reachable at 192.168.1.1/24 $ tftpboot; bootm Installation ------------ 1. Connect to the booted device at 192.168.1.20 using username/password "ubnt". 2. Update the bootloader environment. $ fw_setenv devmode TRUE $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt" $ fw_setenv bootcmd "run boot_openwrt" 3. Transfer the OpenWrt sysupgrade image to the device using SCP. 4. Check the mtd partition number for bs / kernel0 / kernel1 $ cat /proc/mtd 5. Set the bootselect flag to boot from kernel0 $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4 6. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1 $ dd if=openwrt.bin of=/dev/mtdblock6 $ dd if=openwrt.bin of=/dev/mtdblock7 7. Reboot the device. It should boot into OpenWrt. Below are the original installation instructions prior to the discovery of "devmode=TRUE". They are not required for installation and are documentation only. The bootloader employs signature verification on the FIT image configurations. This way, booting unauthorized image without patching the bootloader is not possible. Manually configuring the bootcmd in the U-Boot envronment won't work, as this is restored to the default value if modified. The bootloader is made up of three different parts. 1. The SPL performing early board initialization and providing a XModem recovery in case the PBL is missing 2. The PBL being the primary U-Boot application and containing the control FDT. It is LZMA packed with a uImage header. 3. A Ubiquiti standalone U-Boot application providing the main boot routine as well as their recovery mechanism. In a perfect world, we would only replace the PBL, as the SPL does not perform checks on the PBLs integrity. However, as the PBL is in the same eraseblock as the SPL, we need to at least rewrite both. The bootloader will only verify integrity in case it has a "signature" node in it's control device-tree. Renaming the signature node to something else will prevent this from happening. Warning: These instructions are based on the firmware intially shipped with the device and potentially brick your device in a way it can only be recovered using a SPI flasher. Only (!) proceed if you understand this! 1. Extract the bootloader from the U-Boot partition using the OpenWrt initramfs image. 2. Split the bootloader into it's 3 components: $ dd if=bootloader.bin of=spl.bin bs=1 skip=0 count=45056 $ dd if=bootloader.bin of=pbl.uimage bs=1 skip=45056 count=143360 $ dd if=bootloader.bin of=ubnt.uimage bs=1 skip=188416 3. Strip the uImage header from the PBL $ dd if=pbl.uimage of=pbl.lzma bs=64 skip=1 4. Decompress the PBL $ lzma -d pbl.lzma --single-stream The decompressed PBL sha256sum should be d8b406c65240d260cf15be5f97f40c1d6d1b6e61ec3abed37bb841c90fcc1235 5. Open the decompressed PBL using your favorite hexeditor. Locate the control FDT at offset 0x4CED0 (0xD00DFEED). At offset 0x4D5BC, the label for the signature node is located. Rename the "signature" string at this offset to "signaturr". The patched PBL sha256sum should be d028e374cdb40ba44b6e3cef2e4e8a8c16a3b85eb15d9544d24fdd10eed64c97 6. Compress the patched PBL $ lzma -z pbl --lzma1=dict=67108864 The resulting pbl.lzma file should have the sha256sum 7ae6118928fa0d0b3fe4ff81abd80ecfd9ba2944cb0f0a462b6ae65913088b42 7. Create the PBL uimage $ SOURCE_DATE_EPOCH=1607909492 mkimage -A mips -O u-boot -C lzma -n "U-Boot 2018.03 [UniFi,v1.1.40.71]" -a 84000000 -e 84000000 -T firmware -d pbl.lzma patched_pbl.uimage The resulting patched_pbl.uimage should have the sha256sum b90d7fa2dcc6814180d3943530d8d6b0d6a03636113c94e99af34f196d3cf2ce 8. Reassemble the complete bootloader $ dd if=patched_pbl.uimage of=aligned_pbl.uimage bs=143360 count=1 conv=sync $ cat spl.bin > patched_uboot.bin $ cat aligned_pbl.uimage >> patched_uboot.bin $ cat ubnt.uimage >> patched_uboot.bin The resulting patched_uboot.bin should have the sha256sum 3e1186f33b88a525687285c2a8b22e8786787b31d4648b8eee66c672222aa76b 9. Transfer your patched bootloader to the device. Also install the kmod-mtd-rw package using opkg and load it. $ insmod mtd-rw.ko i_want_a_brick=1 Write the patched bootloader to mtd0 $ mtd write patched_uboot.bin u-boot 10. Erase the kernel1 partition, as the bootloader might otherwise decide to boot from there. $ mtd erase kernel1 11. Transfer the OpenWrt sysupgrade image to the device and install using sysupgrade. FIT configurations ------------------ In the future, the MT7621 UniFi6 family can be supported by a single OpenWrt image. config@1: U6 Lite config@2: U6 IW config@3: U6 Mesh config@4: U6 Extender config@5: U6 LR-EA (Early Access - GA is MT7622) Signed-off-by: David Bauer <mail@david-bauer.net>
2020-12-12 14:34:00 +01:00
define Device/ubnt_unifi-6-lite
$(Device/dsa-migration)
DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi 6 Lite
DEVICE_DTS_CONFIG := config@1
ramips: add support for Ubiquiti UniFi 6 Lite Hardware -------- MediaTek MT7621AT 256M DDR3 32M SPI-NOR MediaTek MT7603 2T2R 802.11n 2.4GHz MediaTek MT7915 2T2R 802.11ax 5GHz Not Working ----------- - Bluetooth (connected to UART3) UART ---- UART is located in the lower left corner of the board. Pinout is 0 - 3V3 (don't connect) 1 - RX 2 - TX 3 - GND Console is 115200 8N1. Boot ---- 1. Connect to the serial console and connect power. 2. Double-press ESC when prompted 3. Set the fdt address $ fdt addr $(fdtcontroladdr) 4. Remove the signature node from the control FDT $ fdt rm /signature 5. Transfer and boot the OpenWrt initramfs image to the device. Make sure to name the file C0A80114.img and have it reachable at 192.168.1.1/24 $ tftpboot; bootm Installation ------------ 1. Connect to the booted device at 192.168.1.20 using username/password "ubnt". 2. Update the bootloader environment. $ fw_setenv devmode TRUE $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt" $ fw_setenv bootcmd "run boot_openwrt" 3. Transfer the OpenWrt sysupgrade image to the device using SCP. 4. Check the mtd partition number for bs / kernel0 / kernel1 $ cat /proc/mtd 5. Set the bootselect flag to boot from kernel0 $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4 6. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1 $ dd if=openwrt.bin of=/dev/mtdblock6 $ dd if=openwrt.bin of=/dev/mtdblock7 7. Reboot the device. It should boot into OpenWrt. Below are the original installation instructions prior to the discovery of "devmode=TRUE". They are not required for installation and are documentation only. The bootloader employs signature verification on the FIT image configurations. This way, booting unauthorized image without patching the bootloader is not possible. Manually configuring the bootcmd in the U-Boot envronment won't work, as this is restored to the default value if modified. The bootloader is made up of three different parts. 1. The SPL performing early board initialization and providing a XModem recovery in case the PBL is missing 2. The PBL being the primary U-Boot application and containing the control FDT. It is LZMA packed with a uImage header. 3. A Ubiquiti standalone U-Boot application providing the main boot routine as well as their recovery mechanism. In a perfect world, we would only replace the PBL, as the SPL does not perform checks on the PBLs integrity. However, as the PBL is in the same eraseblock as the SPL, we need to at least rewrite both. The bootloader will only verify integrity in case it has a "signature" node in it's control device-tree. Renaming the signature node to something else will prevent this from happening. Warning: These instructions are based on the firmware intially shipped with the device and potentially brick your device in a way it can only be recovered using a SPI flasher. Only (!) proceed if you understand this! 1. Extract the bootloader from the U-Boot partition using the OpenWrt initramfs image. 2. Split the bootloader into it's 3 components: $ dd if=bootloader.bin of=spl.bin bs=1 skip=0 count=45056 $ dd if=bootloader.bin of=pbl.uimage bs=1 skip=45056 count=143360 $ dd if=bootloader.bin of=ubnt.uimage bs=1 skip=188416 3. Strip the uImage header from the PBL $ dd if=pbl.uimage of=pbl.lzma bs=64 skip=1 4. Decompress the PBL $ lzma -d pbl.lzma --single-stream The decompressed PBL sha256sum should be d8b406c65240d260cf15be5f97f40c1d6d1b6e61ec3abed37bb841c90fcc1235 5. Open the decompressed PBL using your favorite hexeditor. Locate the control FDT at offset 0x4CED0 (0xD00DFEED). At offset 0x4D5BC, the label for the signature node is located. Rename the "signature" string at this offset to "signaturr". The patched PBL sha256sum should be d028e374cdb40ba44b6e3cef2e4e8a8c16a3b85eb15d9544d24fdd10eed64c97 6. Compress the patched PBL $ lzma -z pbl --lzma1=dict=67108864 The resulting pbl.lzma file should have the sha256sum 7ae6118928fa0d0b3fe4ff81abd80ecfd9ba2944cb0f0a462b6ae65913088b42 7. Create the PBL uimage $ SOURCE_DATE_EPOCH=1607909492 mkimage -A mips -O u-boot -C lzma -n "U-Boot 2018.03 [UniFi,v1.1.40.71]" -a 84000000 -e 84000000 -T firmware -d pbl.lzma patched_pbl.uimage The resulting patched_pbl.uimage should have the sha256sum b90d7fa2dcc6814180d3943530d8d6b0d6a03636113c94e99af34f196d3cf2ce 8. Reassemble the complete bootloader $ dd if=patched_pbl.uimage of=aligned_pbl.uimage bs=143360 count=1 conv=sync $ cat spl.bin > patched_uboot.bin $ cat aligned_pbl.uimage >> patched_uboot.bin $ cat ubnt.uimage >> patched_uboot.bin The resulting patched_uboot.bin should have the sha256sum 3e1186f33b88a525687285c2a8b22e8786787b31d4648b8eee66c672222aa76b 9. Transfer your patched bootloader to the device. Also install the kmod-mtd-rw package using opkg and load it. $ insmod mtd-rw.ko i_want_a_brick=1 Write the patched bootloader to mtd0 $ mtd write patched_uboot.bin u-boot 10. Erase the kernel1 partition, as the bootloader might otherwise decide to boot from there. $ mtd erase kernel1 11. Transfer the OpenWrt sysupgrade image to the device and install using sysupgrade. FIT configurations ------------------ In the future, the MT7621 UniFi6 family can be supported by a single OpenWrt image. config@1: U6 Lite config@2: U6 IW config@3: U6 Mesh config@4: U6 Extender config@5: U6 LR-EA (Early Access - GA is MT7622) Signed-off-by: David Bauer <mail@david-bauer.net>
2020-12-12 14:34:00 +01:00
DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915e
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
IMAGE_SIZE := 15424k
endef
TARGET_DEVICES += ubnt_unifi-6-lite
define Device/ubnt_unifi-nanohd
$(Device/dsa-migration)
DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi nanoHD
DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
IMAGE_SIZE := 15552k
endef
TARGET_DEVICES += ubnt_unifi-nanohd
ramips: add support for Ubiquiti USW-Flex Hardware -------- MediaTek MT7621AT 16M SPI-NOR Macronix MX25L12835FMI Microchip PD69104B1 4-Channel PoE-PSE controller TI TPS2373 PoE-PD controller PoE-Controller -------------- By default, the PoE outputs do not work with OpenWrt. To make them output power, install the "poemgr" package from the packages feed. This package can control the PD69104B1 PSE controller. Installation ------------ 1. Connect to the booted device at 192.168.1.20 using username/password "ubnt" via SSH. 2. Add the uboot-envtools configuration file /etc/fw_env.config with the following content $ echo "/dev/mtd1 0x0 0x1000 0x10000 1" > /etc/fw_env.config 3. Update the bootloader environment. $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt" $ fw_setenv bootcmd "run boot_openwrt" 4. Transfer the OpenWrt sysupgrade image to the device using SCP. 5. Check the mtd partition number for bs / kernel0 / kernel1 $ cat /proc/mtd 6. Set the bootselect flag to boot from kernel0 $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4 7. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1 $ dd if=openwrt.bin of=/dev/mtdblock6 $ dd if=openwrt.bin of=/dev/mtdblock7 8. Reboot the device. It should boot into OpenWrt. Restore to UniFi ---------------- To restore the vendor firmware, follow the Ubiquiti UniFi TFTP recovery guide for access points. The process is the same for the Flex switch. Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-20 13:23:42 +02:00
define Device/ubnt_usw-flex
$(Device/dsa-migration)
DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi Switch Flex
DEVICE_DTS_CONFIG := config@1
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
IMAGE_SIZE := 7360k
endef
TARGET_DEVICES += ubnt_usw-flex
ramips: add support for UniElec U7621-01 UniElec U7621-01 is a router platform board, the smaller model of the U7621-06. The device has the following specifications: - MT7621AT (880 MHz) - 256 of RAM (DDR3) - 16 MB of FLASH (SPI NOR) - 5x 1 Gbps Ethernet (MT7621 built-in switch) - 1x 2.4Ghz MT7603E - 1x 5Ghz MT7612 - 1x miniPCIe slots (PCIe bus only) - 1x miniSIM slot - 1x USB 2.0 (uses the usb 3.0 driver) - 8x LEDs (1x GPIO-controlled) - 1x reset button - 1x UART header (4-pins) - 1x GPIO header (30-pins) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - 1x 2.4Ghz MT7603E (wifi) - 1x 5Ghz MT7612 (wifi) - miniPCIe slots (tested with Wi-Fi cards and LTE modem cards) - miniSIM slot (works with normal size simcard) - sysupgrade - reset button Installation: This board has no locked down bootloader. The seller can be asked to install openwrt v18.06, so upgrades are standard sysupgrade method. Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. LEDs list (left to right): - ESW_P0_LED_0 - ESW_P1_LED_0 - ESW_P2_LED_0 - ESW_P3_LED_0 - ESW_P4_LED_0 - CTS2_N (GPIO10, configured as "status" LED) - LED_WLAN# (connected with pin 44 in wifi1 slot) Signed-off-by: David Bentham <db260179@gmail.com> [add DEVICE_VARIANT, fix DEVICE_PACKAGES, remove &gpio] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-21 15:04:49 +01:00
define Device/unielec_u7621-01-16m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7621-01
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
endef
TARGET_DEVICES += unielec_u7621-01-16m
define Device/unielec_u7621-06-16m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7621-06
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
endef
TARGET_DEVICES += unielec_u7621-06-16m
define Device/unielec_u7621-06-64m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 65216k
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7621-06
DEVICE_VARIANT := 64M
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
endef
TARGET_DEVICES += unielec_u7621-06-64m
ramips: add support for Wavlink WL-WN531A6 This patch adds support for Wavlink WL-WN531A6 (Quantum D6). Specifications: -------------- * SoC: Mediatek MT7621AT 2C2T, 880MHz * RAM: 128MB DDR3, Nanya NT5CB64M16GP-EK * Flash: 16MB SPI NOR flash, GigaDevice GD25Q127CSIG * WiFi 5GHz: Mediatek MT7615N (4x4:4) on mini PCIE slot. * WiFi 2.4GHz: Mediatek MT7603EN (2x2:2) on mini PCIE slot. * Ethernet: MT7630, 5x 1000Base-T * LED: Power, WAN, LAN(x4), WiFi, WPS, dual color "WAVLINK" LED logo on the top cover. * Buttons: Reset, WPS, "Turbo", touch button on the top cover via RH6015C touch sensor. * UART: UART1: serial console (57600 8n1) on the J4 header located below the top heatsink. UART2: J12 header, located on the right side of the board. * USB: One USB3 port. * I2C: J9 header, located below the top heatsink. Backup the OEM Firmware: ----------------------- There isn't any firmware released for the WL-WN531A6 on the Wavlink web site. Reverting back to the OEM firmware is not possible unless we have a backup of the original OEM firmware. The OEM firmware is stored on /dev/mtd4 ("Kernel"). 1) Plug a FAT32 formatted USB flash drive into the USB port. 2) Navigate to "Setup->USB Storage". Under the "Available Network folder" you can see part of the mount point of the newly mounted flash drive filesystem - e.g "sda1". The full mount point is prefixed with "/media", so in this case the mount point becomes "/media/sda1". 3) Go to http://192.168.10.1/webcmd.shtml . 4) Type the following line in the "Command" input box: dd if=/dev/mtd4ro of=/media/sda1/firmware.bin 5) Click "Apply" 6) After few seconds, in the text area should appear this output: 30080+0 records in 30080+0 records out 7) Type "sync" in the "Command" input box and click "Apply". 8) At this point the OEM firmware is stored on the flash drive as "firmware.bin". The size of the file is 15040 KB. Installation: ------------ * Flashing instructions (OEM web interface): The OEM web interface accepts only files with names containing "WN531A6". It's also impossible to flash the *-sysupgrade.bin image, so we have to flash the *-initramfs-kernel.bin first and use the OpenWrt's upgrade interface to write the sysupgrade image. 1) Rename openwrt-ramips-mt7621-wavlink_wl-wn531a6-initramfs-kernel.bin to WN531A6.bin. 2) Connect your computer to the one of the LAN ports of the router with an Ethernet cable and open http://192.168.10.1 3) Browse to Setup -> Firmware Upgrade interface. 4) Upload the (renamed) OpenWrt image - WN531A6.bin. 5) Proceed with the firmware installation and give the device a few minutes to finish and reboot. 6) After reboot wait for the "WAVLINK" logo on the top cover to turn solid blue, and open http://192.168.1.1 7) Use the OpenWrt's "Flash Firmware" interface to write the OpenWrt sysupgrade image: openwrt-ramips-mt7621-wavlink_wl-wn531a6-squashfs-sysupgrade.bin * Flashing instructions (u-boot TFTP): 1) Configure a TFTP server on your computer and set its IP to 192.168.10.100 2) Rename the OpenWrt sysupgrade image to firmware.bin and place it in the root folder of the TFTP server. 3) Power off the device and connect an Ethernet cable from one of its LAN ports your computer. 4) Press the "Reset" button (and keep it pressed) 5) Power on the device. 6) After a few seconds, when the connected port LAN LED stops blinking fast, release the "Reset" button. 7) Flashing OpenWrt takes less than a minute, system will reboot automatically. 8) After reboot the WAVLINK logo on the top cover will indicate the current OpenWrt running status (wait until the logo tunrs solid blue). Revert to the OEM Firmware: -------------------------- * U-boot TFTP: Follow "Flashing instructions (u-boot TFTP)" and use the "firmware.bin" backup image. * OpenWrt "Flash Firmware" interface: Upload the "firmware.bin" backup image and select "Force update" before continuing. Notes: ----- * The MAC address shown on the label at the back of the device is assigned to the 2.4G WiFi adapter. MAC addresses assigned by the OEM firmware: 2.4G: *:XX (label): factory@0x0004 5G: *:XX + 1 : factory@0x8004 WAN: *:XX - 1 : factory@0xe006 LAN: *:XX - 2 : factory@0xe000 * The I2C bus and UART2 are fully functional. The headers are not populated. Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com>
2020-08-25 10:26:21 +02:00
define Device/wavlink_wl-wn531a6
$(Device/dsa-migration)
DEVICE_VENDOR := Wavlink
DEVICE_MODEL := WL-WN531A6
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware kmod-usb3
IMAGE_SIZE := 15040k
endef
TARGET_DEVICES += wavlink_wl-wn531a6
define Device/wevo_11acnas
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
DEVICE_VENDOR := WeVO
DEVICE_MODEL := 11AC NAS Router
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += 11acnas
endef
TARGET_DEVICES += wevo_11acnas
define Device/wevo_w2914ns-v2
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
UIMAGE_NAME := W2914NS-V2(0.0.0)
DEVICE_VENDOR := WeVO
DEVICE_MODEL := W2914NS
DEVICE_VARIANT := v2
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += w2914nsv2
endef
TARGET_DEVICES += wevo_w2914ns-v2
ramips: add support for Winstars WS-WN583A6 The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet ports. Even if mine is branded as "Gemeita AC2100", the sticker on the back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6. Probably the real product name is the Wavlink WL-WN583A6 because of the many references to Wavlink in the OEM firmware and bootlog. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 8MB NOR (GigaDevice GD25Q64B) ETH: 2x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7603E (2x2:2) - 5GHz: 1x MT7615E (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x WPS button - 1x ON/OFF switch (working but unmodifiable) - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3) LEDS: - 1x White led - 1x Red led - 1x Amber led - 1x Blue led - 2x Blue leds (lan and wan port status: working but unmodifiable) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on M83A6.V5030.191210 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box: mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done 3) Click "Apply" 4) After few seconds, in the textarea should appear this output: 16384+0 records in 16384+0 records out 8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s 15744+0 records in 15744+0 records out 8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s dd: can't open '/dev/mtd5ro': No such device dd: can't open '/dev/mtd6ro': No such device dd: can't open '/dev/mtd7ro': No such device Excluding the "X.XXXXXX seconds" part, you should get the same exact output. If your output doesn't match mine, stop reading and ask for help in the forum. 5) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd0ro http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro If one (or more) of these files weight 0 byte, stop reading and ask for help in the forum. 6) Store these downloaded files in a safe place. 7) Reboot your router to remove any temporary file from your router. Installation ------------ Flash the initramfs image in the OEM firmware interface. When openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) The "System Command" page allows to run every command as root. For example you can use "dd" and "nc" to backup the OEM firmware. PC (SERVER): nc -l 5555 > ./mtdXro ROUTER (CLIENT): dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555 2) The OEM web interface accepts only images containing the string "WN583A6" in the filename. Currently the OEM interface accepts only the initramfs image probably because it checks if the ih_size in the image header is equal to the whole image size (instead of the kernel size) Read more here: https://forum.openwrt.org/t/support-for-strong-1200/22768/19 3) The white led (namely "Smart Night Light") can be controller by the user only if the side switch is set to "Schedule" otherwise it will be activated by the light condition (there is a photodiode on the top side of the router) 4) Router mac addresses: LAN XX:XX:XX:XX:XX:8F WAN XX:XX:XX:XX:XX:90 WIFI 2G XX:XX:XX:XX:XX:91 WIFI 5G XX:XX:XX:XX:XX:92 LABEL XX:XX:XX:XX:XX:91 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove chosen node, fix whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-16 23:29:27 +02:00
define Device/winstars_ws-wn583a6
$(Device/dsa-migration)
ramips: add support for Winstars WS-WN583A6 The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet ports. Even if mine is branded as "Gemeita AC2100", the sticker on the back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6. Probably the real product name is the Wavlink WL-WN583A6 because of the many references to Wavlink in the OEM firmware and bootlog. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 8MB NOR (GigaDevice GD25Q64B) ETH: 2x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7603E (2x2:2) - 5GHz: 1x MT7615E (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x WPS button - 1x ON/OFF switch (working but unmodifiable) - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3) LEDS: - 1x White led - 1x Red led - 1x Amber led - 1x Blue led - 2x Blue leds (lan and wan port status: working but unmodifiable) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on M83A6.V5030.191210 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box: mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done 3) Click "Apply" 4) After few seconds, in the textarea should appear this output: 16384+0 records in 16384+0 records out 8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s 15744+0 records in 15744+0 records out 8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s dd: can't open '/dev/mtd5ro': No such device dd: can't open '/dev/mtd6ro': No such device dd: can't open '/dev/mtd7ro': No such device Excluding the "X.XXXXXX seconds" part, you should get the same exact output. If your output doesn't match mine, stop reading and ask for help in the forum. 5) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd0ro http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro If one (or more) of these files weight 0 byte, stop reading and ask for help in the forum. 6) Store these downloaded files in a safe place. 7) Reboot your router to remove any temporary file from your router. Installation ------------ Flash the initramfs image in the OEM firmware interface. When openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) The "System Command" page allows to run every command as root. For example you can use "dd" and "nc" to backup the OEM firmware. PC (SERVER): nc -l 5555 > ./mtdXro ROUTER (CLIENT): dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555 2) The OEM web interface accepts only images containing the string "WN583A6" in the filename. Currently the OEM interface accepts only the initramfs image probably because it checks if the ih_size in the image header is equal to the whole image size (instead of the kernel size) Read more here: https://forum.openwrt.org/t/support-for-strong-1200/22768/19 3) The white led (namely "Smart Night Light") can be controller by the user only if the side switch is set to "Schedule" otherwise it will be activated by the light condition (there is a photodiode on the top side of the router) 4) Router mac addresses: LAN XX:XX:XX:XX:XX:8F WAN XX:XX:XX:XX:XX:90 WIFI 2G XX:XX:XX:XX:XX:91 WIFI 5G XX:XX:XX:XX:XX:92 LABEL XX:XX:XX:XX:XX:91 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove chosen node, fix whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-16 23:29:27 +02:00
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Winstars
DEVICE_MODEL := WS-WN583A6
DEVICE_ALT0_VENDOR := Gemeita
DEVICE_ALT0_MODEL := AC2100
KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX)
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
ramips: add support for Winstars WS-WN583A6 The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet ports. Even if mine is branded as "Gemeita AC2100", the sticker on the back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6. Probably the real product name is the Wavlink WL-WN583A6 because of the many references to Wavlink in the OEM firmware and bootlog. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 8MB NOR (GigaDevice GD25Q64B) ETH: 2x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7603E (2x2:2) - 5GHz: 1x MT7615E (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x WPS button - 1x ON/OFF switch (working but unmodifiable) - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3) LEDS: - 1x White led - 1x Red led - 1x Amber led - 1x Blue led - 2x Blue leds (lan and wan port status: working but unmodifiable) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on M83A6.V5030.191210 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box: mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done 3) Click "Apply" 4) After few seconds, in the textarea should appear this output: 16384+0 records in 16384+0 records out 8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s 15744+0 records in 15744+0 records out 8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s dd: can't open '/dev/mtd5ro': No such device dd: can't open '/dev/mtd6ro': No such device dd: can't open '/dev/mtd7ro': No such device Excluding the "X.XXXXXX seconds" part, you should get the same exact output. If your output doesn't match mine, stop reading and ask for help in the forum. 5) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd0ro http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro If one (or more) of these files weight 0 byte, stop reading and ask for help in the forum. 6) Store these downloaded files in a safe place. 7) Reboot your router to remove any temporary file from your router. Installation ------------ Flash the initramfs image in the OEM firmware interface. When openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) The "System Command" page allows to run every command as root. For example you can use "dd" and "nc" to backup the OEM firmware. PC (SERVER): nc -l 5555 > ./mtdXro ROUTER (CLIENT): dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555 2) The OEM web interface accepts only images containing the string "WN583A6" in the filename. Currently the OEM interface accepts only the initramfs image probably because it checks if the ih_size in the image header is equal to the whole image size (instead of the kernel size) Read more here: https://forum.openwrt.org/t/support-for-strong-1200/22768/19 3) The white led (namely "Smart Night Light") can be controller by the user only if the side switch is set to "Schedule" otherwise it will be activated by the light condition (there is a photodiode on the top side of the router) 4) Router mac addresses: LAN XX:XX:XX:XX:XX:8F WAN XX:XX:XX:XX:XX:90 WIFI 2G XX:XX:XX:XX:XX:91 WIFI 5G XX:XX:XX:XX:XX:92 LABEL XX:XX:XX:XX:XX:91 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove chosen node, fix whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-16 23:29:27 +02:00
endef
TARGET_DEVICES += winstars_ws-wn583a6
define Device/xiaomi_nand_separate
$(Device/dsa-migration)
ramips: Add support for Xiaomi Mi Router(Black,R2100) The Xiaomi Mi Router AC2100 is a *black* cylindrical router that shares many characteristics (apart from its looks and the GPIO ports) with the 6-antenna *white* "Xiaomi Redmi Router AC2100" See the visual comparison of the two routers here: https://github.com/emirefek/openwrt-R2100/raw/imgcdn/rm2100-r2100.jpg Specification of R2100: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN in Yellow and Blue - UART: On board (Don't know where is should be confirmed by anybody else) - Modified u-boot Hacking of official firmware process is same at both RM2100 and R2100. Thanks to @namidairo Here is the detailed guide Hack: https://github.com/impulse/ac2100-openwrt-guide Guide is written for MacOS but it will work at linux. needed packages: python3(with scapy), netcat, http server, telnet client 1. Run PPPoE&exploit to get nc and wget busybox, get telnet and wget firmware 2. mtd write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-rootfs0.bin rootfs0 other than these I specified in here. Everything is same with: https://github.com/openwrt/openwrt/commit/f3792690c4f0567a8965d82898295b9d50c3bb7e Thanks for all community and especially for this device: @Ilyas @scp07 @namidairo @Percy @thorsten97 @impulse (names@forum.openwrt.com) MAC Locations: WAN *:b5 = factory 0xe006 LAN *:b6 = factory 0xe000 WIFI 5ghz *:b8 = factory 0x8004 WIFI 2.4ghz *:b7 = factory 0x0004 Signed-off-by: Emir Efe Kucuk <emirefek@gmail.com> [refactored common image bits into Device/xiaomi-ac2100, fixed From:] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-30 11:18:50 +02:00
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := Xiaomi
DEVICE_PACKAGES := uboot-envtools
ramips: Add support for Xiaomi Mi Router(Black,R2100) The Xiaomi Mi Router AC2100 is a *black* cylindrical router that shares many characteristics (apart from its looks and the GPIO ports) with the 6-antenna *white* "Xiaomi Redmi Router AC2100" See the visual comparison of the two routers here: https://github.com/emirefek/openwrt-R2100/raw/imgcdn/rm2100-r2100.jpg Specification of R2100: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN in Yellow and Blue - UART: On board (Don't know where is should be confirmed by anybody else) - Modified u-boot Hacking of official firmware process is same at both RM2100 and R2100. Thanks to @namidairo Here is the detailed guide Hack: https://github.com/impulse/ac2100-openwrt-guide Guide is written for MacOS but it will work at linux. needed packages: python3(with scapy), netcat, http server, telnet client 1. Run PPPoE&exploit to get nc and wget busybox, get telnet and wget firmware 2. mtd write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-rootfs0.bin rootfs0 other than these I specified in here. Everything is same with: https://github.com/openwrt/openwrt/commit/f3792690c4f0567a8965d82898295b9d50c3bb7e Thanks for all community and especially for this device: @Ilyas @scp07 @namidairo @Percy @thorsten97 @impulse (names@forum.openwrt.com) MAC Locations: WAN *:b5 = factory 0xe006 LAN *:b6 = factory 0xe000 WIFI 5ghz *:b8 = factory 0x8004 WIFI 2.4ghz *:b7 = factory 0x0004 Signed-off-by: Emir Efe Kucuk <emirefek@gmail.com> [refactored common image bits into Device/xiaomi-ac2100, fixed From:] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-30 11:18:50 +02:00
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
UBINIZE_OPTS := -E 5
IMAGES += kernel1.bin rootfs0.bin
IMAGE/kernel1.bin := append-kernel
IMAGE/rootfs0.bin := append-ubi | check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/xiaomi_mi-router-3g
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router 3G
IMAGE_SIZE := 124416k
DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += R3G mir3g xiaomi,mir3g
endef
TARGET_DEVICES += xiaomi_mi-router-3g
define Device/xiaomi_mi-router-3g-v2
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 14848k
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router 3G
DEVICE_VARIANT := v2
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
SUPPORTED_DEVICES += xiaomi,mir3g-v2
endef
TARGET_DEVICES += xiaomi_mi-router-3g-v2
define Device/xiaomi_mi-router-3-pro
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE:= 4096k
UBINIZE_OPTS := -E 5
ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-15 14:55:24 +02:00
IMAGE_SIZE := 255488k
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router 3 Pro
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
check-size
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
kmod-usb-ledtrig-usbport uboot-envtools
SUPPORTED_DEVICES += xiaomi,mir3p
endef
TARGET_DEVICES += xiaomi_mi-router-3-pro
ramips: mt7621: add support for Xiaomi Mi Router 4 Xiaomi Mi Router 4 is the same as Xiaomi Mi Router 3G, except for the RAM (256Mib→128Mib), LEDs and gpio (MiNet button). Specifications: Power: 12 VDC, 1 A Connector type: barrel CPU1: MediaTek MT7621A (880 MHz, 4 cores) FLA1: 128 MiB (ESMT F59L1G81MA) RAM1: 128 MiB (ESMT M15T1G1664A) WI1 chip1: MediaTek MT7603EN WI1 802dot11 protocols: bgn WI1 MIMO config: 2x2:2 WI1 antenna connector: U.FL WI2 chip1: MediaTek MT7612EN WI2 802dot11 protocols: an+ac WI2 MIMO config: 2x2:2 WI2 antenna connector: U.FL ETH chip1: MediaTek MT7621A Switch: MediaTek MT7621A UART Serial [o] TX [o] GND [o] RX [ ] VCC - Do not connect it MAC addresses as verified by OEM firmware: use address source LAN *:c2 factory 0xe000 (label) WAN *:c3 factory 0xe006 2g *:c4 factory 0x0000 5g *:c5 factory 0x8000 Flashing instructions: 1.Create a simple http server (nginx etc) 2.set uart enable To enable writing to the console, you must reset to factory settings Then you see uboot boot, press the keyboard 4 button (enter uboot command line) If it is not successful, repeat the above operation of restoring the factory settings. After entering the uboot command line, type: setenv uart_en 1 saveenv boot 3.use shell in uart cd /tmp wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin kernel1 mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin rootfs0 nvram set flag_try_sys1_failed=1 nvram commit reboot 4.login to the router http://192.168.1.1/ Installation via Software exploit Find the instructions in the https://github.com/acecilia/OpenWRTInvasion Signed-off-by: Dmytro Oz <sequentiality@gmail.com> [commit message facelift, rebase onto shared DTSI/common device definition, bump uboot-envtools] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-12-14 20:07:32 +01:00
define Device/xiaomi_mi-router-4
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router 4
IMAGE_SIZE := 124416k
DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2
endef
TARGET_DEVICES += xiaomi_mi-router-4
ramips: add Xiaomi Mi Router 4A Gigabit explicitly This device has previously been supported by the image for Xiaomi Mi Router 3G v2. Since this is not obvious, the 4A is marketed as a new major revision and it also seems to have a different bootloader, this will be both more tidy and more helpful for the users. Apart from that, note that there also is a 100M version of the device that uses mt7628 platform, so a specifically named image will also prevent confusion in this area. Specifications: - SoC: MediaTek MT7621 - Flash: 16 MiB NOR SPI - RAM: 128 MiB DDR3 - Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN) - WIFI0: MT7603E 2.4GHz 802.11b/g/n - WIFI1: MT7612E 5GHz 802.11ac - Antennas: 4x external (2 per radio), non-detachable - LEDs: Programmable "power" LED (two-coloured, yellow/blue) Non-programmable "internet" LED (shows WAN activity) - Buttons: Reset Installation: Bootloader won't accept any serial input unless "boot_wait" u-boot environment variable is changed to "on". Vendor firmware won't accept any serial input until "uart_en" is set to "1". Using the https://github.com/acecilia/OpenWRTInvasion exploit you can gain access to shell to enable these options: To enable uart keyboard actions - 'nvram set uart_en=1' To make uboot delay boot work - 'nvram set boot_wait=on' Set boot delay to 5 - 'nvram set bootdelay=5' Then run 'nvram commit' to make the changes permanent. Once in the shell (following the OpenWRTInvasion instructions) you can then run the following to flash OpenWrt and then reboot: 'cd /tmp; curl https://downloads.openwrt.org/...-sysupgrade.bin --output firmware.bin; mtd -e OS1 -r write firmware.bin OS1' Suggested-by: David Bentham <db260179@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-12 16:00:10 +01:00
define Device/xiaomi_mi-router-4a-gigabit
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 14848k
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router 4A
DEVICE_VARIANT := Gigabit Edition
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
endef
TARGET_DEVICES += xiaomi_mi-router-4a-gigabit
define Device/xiaomi_mi-router-ac2100
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router AC2100
IMAGE_SIZE := 120320k
DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += xiaomi_mi-router-ac2100
ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100) Specification: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN, in Amber and White - UART: On board near ethernet, opposite side from power - Modified u-boot Installation: 1. Run linked exploit to get shell, startup telnet and wget the files over 2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-rootfs0.bin rootfs0 Restore to stock: 1. Setup PXE and TFTP server serving stock firmware image (See dhcp-boot option of dnsmasq) 2. Hold reset button down before powering on and wait for flashing amber led 3. Release reset button 4. Wait until status led changes from flashing amber to white Notes: This device has dual kernel and rootfs slots like other Xiaomi devices currently supported (mir3g, etc.) thus, we use the second slot and overwrite the first rootfs onwards in order to get more space. Exploit and detailed instructions: https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100 An implementation of CVE-2020-8597 against stock firmware version 1.0.14 This requires a computer with ethernet plugged into the wan port and an active PPPoE session, and if successful will open a reverse shell to 192.168.31.177 on port 31337. As this shell is somewhat unreliable and likely to be killed in a random amount of time, it is recommended to wget a static compiled busybox binary onto the device and start telnetd with it. The stock telnetd and dropbear unfortunately appear inoperable. (Disabled on release versions of stock firmware likely) Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox chmod a+x /tmp/busybox /tmp/busybox telnetd -l /bin/sh Tested-by: David Martinez <bonkilla@gmail.com> Signed-off-by: Richard Huynh <voxlympha@gmail.com>
2020-04-23 04:50:21 +02:00
define Device/xiaomi_redmi-router-ac2100
$(Device/xiaomi_nand_separate)
ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100) Specification: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN, in Amber and White - UART: On board near ethernet, opposite side from power - Modified u-boot Installation: 1. Run linked exploit to get shell, startup telnet and wget the files over 2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-rootfs0.bin rootfs0 Restore to stock: 1. Setup PXE and TFTP server serving stock firmware image (See dhcp-boot option of dnsmasq) 2. Hold reset button down before powering on and wait for flashing amber led 3. Release reset button 4. Wait until status led changes from flashing amber to white Notes: This device has dual kernel and rootfs slots like other Xiaomi devices currently supported (mir3g, etc.) thus, we use the second slot and overwrite the first rootfs onwards in order to get more space. Exploit and detailed instructions: https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100 An implementation of CVE-2020-8597 against stock firmware version 1.0.14 This requires a computer with ethernet plugged into the wan port and an active PPPoE session, and if successful will open a reverse shell to 192.168.31.177 on port 31337. As this shell is somewhat unreliable and likely to be killed in a random amount of time, it is recommended to wget a static compiled busybox binary onto the device and start telnetd with it. The stock telnetd and dropbear unfortunately appear inoperable. (Disabled on release versions of stock firmware likely) Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox chmod a+x /tmp/busybox /tmp/busybox telnetd -l /bin/sh Tested-by: David Martinez <bonkilla@gmail.com> Signed-off-by: Richard Huynh <voxlympha@gmail.com>
2020-04-23 04:50:21 +02:00
DEVICE_MODEL := Redmi Router AC2100
IMAGE_SIZE := 120320k
DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100) Specification: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN, in Amber and White - UART: On board near ethernet, opposite side from power - Modified u-boot Installation: 1. Run linked exploit to get shell, startup telnet and wget the files over 2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-rootfs0.bin rootfs0 Restore to stock: 1. Setup PXE and TFTP server serving stock firmware image (See dhcp-boot option of dnsmasq) 2. Hold reset button down before powering on and wait for flashing amber led 3. Release reset button 4. Wait until status led changes from flashing amber to white Notes: This device has dual kernel and rootfs slots like other Xiaomi devices currently supported (mir3g, etc.) thus, we use the second slot and overwrite the first rootfs onwards in order to get more space. Exploit and detailed instructions: https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100 An implementation of CVE-2020-8597 against stock firmware version 1.0.14 This requires a computer with ethernet plugged into the wan port and an active PPPoE session, and if successful will open a reverse shell to 192.168.31.177 on port 31337. As this shell is somewhat unreliable and likely to be killed in a random amount of time, it is recommended to wget a static compiled busybox binary onto the device and start telnetd with it. The stock telnetd and dropbear unfortunately appear inoperable. (Disabled on release versions of stock firmware likely) Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox chmod a+x /tmp/busybox /tmp/busybox telnetd -l /bin/sh Tested-by: David Martinez <bonkilla@gmail.com> Signed-off-by: Richard Huynh <voxlympha@gmail.com>
2020-04-23 04:50:21 +02:00
endef
TARGET_DEVICES += xiaomi_redmi-router-ac2100
define Device/xiaoyu_xy-c5
$(Device/dsa-migration)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := XiaoYu
DEVICE_MODEL := XY-C5
DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-wolfssl
endef
TARGET_DEVICES += xiaoyu_xy-c5
define Device/xzwifi_creativebox-v1
$(Device/dsa-migration)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := CreativeBox
DEVICE_MODEL := v1
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
kmod-usb3 -wpad-basic-wolfssl
endef
TARGET_DEVICES += xzwifi_creativebox-v1
define Device/youhua_wr1200js
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := YouHua
DEVICE_MODEL := WR1200JS
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += youhua_wr1200js
define Device/youku_yk-l2
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Youku
DEVICE_MODEL := YK-L2
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += youku_yk-l2
define Device/zbtlink_zbt-we1326
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WE1326
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620
SUPPORTED_DEVICES += zbt-we1326
endef
TARGET_DEVICES += zbtlink_zbt-we1326
define Device/zbtlink_zbt-we3526
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WE3526
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += zbtlink_zbt-we3526
ramips: add support for Zbtlink ZBT-WG1602 Zbtlink ZBT-WG1602 is a Wi-Fi router intendent to use with WWAN (UMTS/LTE/3G/4G) modems. The router board offsers a couple of miniPCIe slots with USB and SIM only and another one pure miniPCIe slot as well as five Gigabit Ethernet ports (4xLAN + WAN). Specification: * SoC: MT7621A * RAM: 256/512 MiB * Flash: 16/32 MiB (SPI NOR) * external watchdog (looks like Torexsemi XC6131B) * Eth: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN) * WLAN 2GHz: MT7603EN (.11n, MIMO 2x2) * WLAN 5GHz: MT7612EN (.11ac, MIMO 2x2) * WLAN Ants: detachable x2, shared by 2GHz & 5GHz radios * miniPCIe: 2x slots with USB&SIM + 1x slot with regular PCIe bus * WWAN Ants: detachable x4 * External storage: microSD (SDXC) slot * USB: 2.0 Type-A port * LED: 11 (5 per Eth phy, 3 SoC controlled, 2 WLAN 2/5 controlled, 1 power indicator) * Button: 1 (reset) * UART: console (115200 baud) * Power: DC jack (12 V / 2.5 A) Additional HW information: * SoC USB port #1 is shared by internal miniPCIe slot and external Type-A USB port, USB D+/D- lines are toggled between ports using a GPIO controlled DPDT switch. * Power of the USB enabled miniPCIe slots can be individually controlled using dedicated GPIO lines. * Vendor firmware feeds the external watchdog with 1s pulses. GPIO watchdog driver is able to either generate a 1us pulses or toggle the output line. 1us is not enough for the external watchod timer, so the line toggling driver mode is utilized. Installation: Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can be directly used to install OpenWrt. Firmware must be upgraded using the 'force' and 'do not save configuration' command line options (or correspondig web interface checkboxes) since the vendor firmware is from the pre-DSA era. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2021-11-16 11:10:25 +01:00
define Device/zbtlink_zbt-wg1602-16m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG1602
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += zbtlink_zbt-wg1602-16m
define Device/zbtlink_zbt-wg2626
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG2626
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += zbt-wg2626
endef
TARGET_DEVICES += zbtlink_zbt-wg2626
define Device/zbtlink_zbt-wg3526-16m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG3526
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-16m
define Device/zbtlink_zbt-wg3526-32m
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 32448k
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WG3526
DEVICE_VARIANT := 32M
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport
SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-32m
define Device/zio_freezio
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := ZIO
DEVICE_MODEL := FREEZIO
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += zio_freezio
ramips: add support for ZyXEL WAP6805 (Altibox WiFi+) Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2018-04-18 21:57:52 +02:00
ramips: mt7621: Add support for ZyXEL NR7101 The ZyXEL NR7101 is an 802.3at PoE powered 5G outdoor (IP68) CPE with integrated directional 5G/LTE antennas. Specifications: - SoC: MediaTek MT7621AT - RAM: 256 MB - Flash: 128 MB MB NAND (MX30LF1G18AC) - WiFi: MediaTek MT7603E - Switch: 1 LAN port (Gigabiti) - 5G/LTE: Quectel RG502Q-EA connected by USB3 to SoC - SIM: 2 micro-SIM slots under transparent cover - Buttons: Reset, WLAN under same cover - LEDs: Multicolour green/red/yellow under same cover (visible) - Power: 802.3at PoE via LAN port The device is built as an outdoor ethernet to 5G/LTE bridge or router. The Wifi interface is intended for installation and/or temporary management purposes only. UART Serial: 57600N1 Located on populated 5 pin header J5: [o] GND [ ] key - no pin [o] RX [o] TX [o] 3.3V Vcc Remove the SIM/button/LED cover, the WLAN button and 12 screws holding the back plate and antenna cover together. The GPS antenna is fixed to the cover, so be careful with the cable. Remove 4 screws fixing the antenna board to the main board, again being careful with the cables. A bluetooth TTL adapter is recommended for permanent console access, to keep the router water and dustproof. The 3.3V pin is able to power such an adapter. MAC addresses: OpenWrt OEM Address Found as lan eth2 08:26:97:*:*:BC Factory 0xe000 (hex), label wlan0 ra0 08:26:97:*:*:BD Factory 0x4 (hex) wwan0 usb0 random WARNING!! ISP managed firmware might at any time update itself to a version where all known workarounds have been disabled. Never boot an ISP managed firmware with a SIM in any of the slots if you intend to use the router with OpenWrt. The bootloader lock can only be disabled with root access to running firmware. The flash chip is physically inaccessible without soldering. Installation from OEM web GUI: - Log in as "supervisor" on https://172.17.1.1/ - Upload OpenWrt initramfs-recovery.bin image on the Maintenance -> Firmware page - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot Installation from OEM ssh: - Log in as "root" on 172.17.1.1 port 22022 - scp OpenWrt initramfs-recovery.bin image to 172.17.1.1:/tmp - Prepare bootloader config by running: nvram setro uboot DebugFlag 0x1 nvram setro uboot CheckBypass 0 nvram commit - Run "mtd_write -w write initramfs-recovery.bin Kernel" and reboot - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot Copying OpenWrt to the recovery partition: - Verify that you are running a working OpenWrt recovery image from flash - ssh to root@192.168.1.1 and run: fw_setenv CheckBypass 0 mtd -r erase Kernel2 - Wait while the bootloader mirrors Image1 to Image2 NOTE: This should only be done after successfully booting the OpenWrt recovery image from the primary partition during installation. Do not do this after having sysupgraded OpenWrt! Reinstalling the recovery image on normal upgrades is not required or recommended. Installation from Z-Loader: - Halt boot by pressing Escape on console - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Type "ATNR 1,initramfs-recovery.bin" at the "ZLB>" prompt - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - Sysupgrade to the OpenWrt sysupgrade image NOTE: ATNR will write the recovery image to both primary and recovery partitions in one go. Booting from RAM: - Halt boot by pressing Escape on console - Type "ATGU" at the "ZLB>" prompt to enter the U-Boot menu - Press "4" to select "4: Entr boot command line interface." - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Load it using "tftpboot 0x88000000 initramfs-recovery.bin" - Boot with "bootm 0x8800017C" to skip the 380 (0x17C) bytes ZyXEL header This method can also be used to RAM boot OEM firmware. The warning regarding OEM applies! Never boot an unknown OEM firmware, or any OEM firmware with a SIM in any slot. NOTE: U-Boot configuration is incomplete (on some devices?). You may have to configure a working mac address before running tftp using "setenv eth0addr <mac>" Unlocking the bootloader: If you are unebale to halt boot, then the bootloader is locked. The OEM firmware locks the bootloader on every boot by setting DebugFlag to 0. Setting it to 1 is therefore only temporary when OEM firmware is installed. - Run "nvram setro uboot DebugFlag 0x1; nvram commit" in OEM firmware - Run "fw_setenv DebugFlag 0x1" in OpenWrt NOTE: OpenWrt does this automatically on first boot if necessary NOTE2: Setting the flag to 0x1 avoids the reset to 0 in known OEM versions, but this might change. WARNING: Writing anything to flash while the bootloader is locked is considered extremely risky. Errors might cause a permanent brick! Enabling management access from LAN: Temporary workaround to allow installing OpenWrt if OEM firmware has disabled LAN management: - Connect to console - Log in as "root" - Run "iptables -I INPUT -i br0 -j ACCEPT" Notes on the OEM/bootloader dual partition scheme The dual partition scheme on this device uses Image2 as a recovery image only. The device will always boot from Image1, but the bootloader might copy Image2 to Image1 under specific conditions. This scheme prevents repurposing of the space occupied by Image2 in any useful way. Validation of primary and recovery images is controlled by the variables CheckBypass, Image1Stable, and Image1Try. The bootloader sets CheckBypass to 0 and reboots if Image1 fails validation. If CheckBypass is 0 and Image1 is invalid then Image2 is copied to Image1. If CheckBypass is 0 and Image2 is invalid, then Image1 is copied to Image2. If CheckBypass is 1 then all tests are skipped and Image1 is booted unconditionally. CheckBypass is set to 1 after each successful validation of Image1. Image1Try is incremented if Image1Stable is 0, and Image2 is copied to Image1 if Image1Try is 3 or larger. But the bootloader only tests Image1Try if CheckBypass is 0, which is impossible unless the booted image sets it to 0 before failing. The system is therefore not resilient against runtime errors like failure to mount the rootfs, unless the kernel image sets CheckBypass to 0 before failing. This is not yet implemented in OpenWrt. Setting Image1Stable to 1 prevents the bootloader from updating Image1Try on every boot, saving unnecessary writes to the environment partition. Keeping an OpenWrt initramfs recovery as Image2 is recommended primarily to avoid unwanted OEM firmware boots on failure. Ref the warning above. It enables console-less recovery in case of some failures to boot from Image1. Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-04-19 13:00:56 +02:00
define Device/zyxel_nr7101
$(Device/dsa-migration)
BLOCKSIZE := 128k
PAGESIZE := 2048
UBINIZE_OPTS := -E 5
DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := NR7101
DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 uboot-envtools kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
KERNEL := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION)
KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) 9.99(ABUV.9)$$(VERSION_DIST)-recovery
KERNEL_INITRAMFS_SUFFIX := -recovery.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += zyxel_nr7101
ramips: add support for ZyXEL WAP6805 (Altibox WiFi+) Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2018-04-18 21:57:52 +02:00
define Device/zyxel_wap6805
$(Device/dsa-migration)
ramips: add support for ZyXEL WAP6805 (Altibox WiFi+) Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2018-04-18 21:57:52 +02:00
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
UBINIZE_OPTS := -E 5
IMAGE_SIZE := 32448k
DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := WAP6805
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii
KERNEL := $(KERNEL_DTB) | uImage lzma | uimage-padhdr 160
ramips: add support for ZyXEL WAP6805 (Altibox WiFi+) Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2018-04-18 21:57:52 +02:00
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += zyxel_wap6805