aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* mediatek: add Zyxel EX5601-T0 with uboot custom partitionValerio 'ftp21' Mancini2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flash procedure is similar to the Xiaomi AX6000 router. Load openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb from original Zyxel U-Boot: tftpboot openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb bootm 0x46000000 Load mtd-rw insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1 Format ubi and create ubootenv partitions ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5 ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB Copy openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb to /tmp and create recovery partition. If your recovery image is larger than 10MiB, size the recovery partition accordingly to make it fit. ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB ubiupdatevol /dev/ubi0_2 openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb Copy preloader and uboot to /tmp and write them in the mtd mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2 mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip Now write the firmware: sysupgrade -n /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-squashfs-sysupgrade.itb To create a correct BL2, I had to add a profile for 'spim:4k+256' as I could not find a way to value the variable 'NAND_TYPE'. Features and fixes from hitech95 tree has been squashed, I'm attaching his commit message: The Power LED was not working correctly and not reacting to the boot process and statuses. The board has space (footprint) for an unpopulated Zigbee chip, while we dont know the device model having this chip populated we have to assure that the common dts doesnt enable interfaces that share pins with such device. In this instance the PCIe and the uart1 and uart2 are disabled. Some of the control PCIE pins seems to be used for the Zigbee chip, UART1 seems to be used as a flash port while UART2 should be the main comunication interface of Zigbee chip. The Zigbee chip should be a EFR32MG21. But the pins used for UART seems to be not on standard PINS used by other adapters. So it cannot run firmwares shared on the web. But it should be possible to build a custom firmware with the corrtect pinmux. This commit also contains the following squashed commit from hitech95 - mediatek: fix sysupgrade for Zyxel EX7601-T0 ubootmod Changes and fixes added in common board: - added aliases for boot status leds. - added aliases for the mac-label-device. - added pin claims for core features (MDIO and UART 0) - added default LEDs configuration (01_leds) - added default network configuration (02_network) - added missing kmod-usb3 module for USB3 - fixed LED names - fixed reset pin for SLIC chip - removed unused pinmux configurations and devices - fix LAN (switch) port numbering - using nvmem cells for wifi eeprom, dropping deprecated "mediatek,mtd-eeprom" - proper factory partition and mac address handling - cleaned up spi_nand sections and partition Changes and fixxes added in stock layout: - added NMBM, if u-boot has it, the kernel must be informed. Co-authored-by: Nicolò Veronese <nicveronese@gmail.com> Co-developed-by: Nicolò Veronese <nicveronese@gmail.com> Signed-off-by: Nicolò Veronese <nicveronese@gmail.com> Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
* uboot-mediatek: add initial Zyxel EX5601-T0 supportValerio 'ftp21' Mancini2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | Flash procedure is described in next commit. TLDR: Copy preloader and uboot to /tmp and write them in the mtd. This will also require new UBI partition and volumes to boot openwrt. mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2 mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip Changelist: - Added profile for 4k+256 SPI NAND_TYPE - Added basic Zyxel EX5601-T0 uboot profile Backported from hitech95 branch: - Button RESET pin fix - Button WPS pin fix Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu> Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
* mediatek: remove DTS property added by mistakeDaniel Golle2023-11-25
| | | | | | | Remove bogus 'phy-handle = <&phy0>;', an undefined reference. Fixes: c8c2f52262 ("mediatek: add support for Zbtlink ZBT-Z8102AX") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: add support for Sercomm CPJ routersMikhail Zhilkin2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for following wireless routers: - Rostelecom RT-FL-1 (Serсomm RT-FL-1) - Rostelecom S1010 (Serсomm S1010.RT) The devices are almost identical and the only difference is one bit in the factory image PID (thanks to Maximilian Weinmann <x1@disroot.org> (@MaxS0niX) for the info and idea to make one PR for two devices at once). Devices specification --------------------- SoC: MediaTek MT7620A, MIPS RAM: 64 MB Flash: 16 MB SPI NOR Wireless 2.4: MT7620 (b/g/n, 2x2) Wireless 5: MT7612EN (a/n/ac, 2x2) Ethernet: 5xFE (WAN, LAN1-4) BootLoader: U-Boot Buttons: 2 (wps, reset) LEDs: 1 amber and 1 green status GPIO leds 5 green ethernet GPIO leds 1 green GPIO 2.4 GHz WLAN led 1 green PHY 5 GHz WLAN led 1 green unmanaged power led USB ports: No Power: 12 VDC, 1 A Connector: Barrel OEM easy installation --------------------- 1. Remove all dots from the factory image filename (except the dot before file extension) 2. Upload and update the firmware via the original web interface 3. Wait until green status led stops blinking (can take several minutes) 4. Login to OpenWrt initramsfs. It's recommended to make a backup of the mtd partitions at this point. 4. Perform sysupgrade using the following command (or use Luci): sysupgrade -n sysupgrade.bin 5. Wait until green status les stops blinking (can take several minutes) 6. Mission acomplished Return to Stock --------------- Option 1. Restore firmware Slot1 from a backup (firmware2.bin): cd /tmp mtd -e Firmware2 write firmware2.bin Firmware2 printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2 reboot Option 2. Decrypt, ungzip and split stock firmware image into the parts, take Slot1 parts (kernel2.bin, rootfs2.bin) and write them: cd /tmp mtd -e Kernel2 write kernel2.bin Kernel2 mtd -e RootFS2 write rootfs2.bin RootFS2 printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2 reboot More about stock firmware decryption: Link: https://github.com/Psychotropos/sercomm_fwutils/ Debricking ---------- Use sercomm-recovery tool. You can use "ALL" mtd partition backup as a recovery image. Link: https://github.com/danitool/sercomm-recovery MAC addresses ------------- +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | label | 48:3e:xx:xx:xx:1e | label | | LAN | 48:3e:xx:xx:xx:1e | label | | WAN | 48:3e:xx:xx:xx:28 | label+10 | | WLAN 2g | 48:3e:xx:xx:xx:20 | label+2 | | WLAN 5g | 48:3e:xx:xx:xx:24 | label+6 | +---------+-------------------+-----------+ Co-authored-by: Vadzim Vabishchevich <bestmc2009@gmail.com> Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: mt7620: drop unnecessary trailing tabsMikhail Zhilkin2023-11-25
| | | | | | Let's tidy up a bit (drop unnecessary trailing tabs). Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: sercomm.mk: make common recipe to set a bit in pidMikhail Zhilkin2023-11-25
| | | | | | | | This commit makes a common recipe to set bit in Sercomm factory pid since this is necessary for several devices (WiFire S1500.nbn, Rostelecom RT-FL-1) at different offsets. Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* scripts: sercomm-pid.py: use uppercase hwid in pidMikhail Zhilkin2023-11-25
| | | | | | | | | | | | | | | | | Sercomm uses uppercase for hexadecimal representation of the device hardware IDs in factory image PID. This commit brings the sercomm-pid.py script into compliance with the original Sercomm algorithm. Example ------- +--------+-------------+-----------+-------------+ | Device | PID (before | PID | PID (after | | HWID | the commit) | (Sercomm) | the commit) | +--------+-------------+-----------+-------------+ | CPJ | 43 50 4a | 43 50 4A | 43 50 4A | +--------+-------------+-----------+-------------+ Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* linux-firmware: intel: add firmware for AX101Jitao Lu2023-11-25
| | | | | | | iwlwifi from 6.5 supports API version up to 83, but 81 is the latest one available from linux-firmware 20230804. Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
* ipq40xx: refresh patchesRobert Marko2023-11-25
| | | | | | CI reported that ipq40xx needed a refresh, so lets refresh it. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* mediatek: add support for Zbtlink ZBT-Z8102AXDaniel Golle2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: MediaTek MT7981B RAM: 1024MiB Flash: SPI-NAND 128 MiB Switch: 1 WAN, 4 LAN (Gigabit) USB: two M.2 slots for 5G modems via USB 3.0 hub, external USB 3.0 port Buttons: Reset, Mesh Power: DC 12V 1A WiFi: MT7976CN UART: 115200n8 UART Layout: VCC-RX-TX-GND Installation: A. Through OpenWrt Dashboard: If your router comes with OpenWrt preinstalled (modified by the seller), you can easily upgrade by going to the dashboard (192.168.1.1) and then navigate to System -> Backup/Flash firmware, then flash the firmware B. Through TFTP Standard installation via UART: 1. Connect USB Serial Adapter to the UART, (NOTE: Don't connect the VCC pin). 2. Power on the router. Make sure that you can access your router via UART. 3. Restart the router then repeatedly press ctrl + c to skip default boot. 4. Type > bootmenu 5. Press '2' to select upgrade firmware 6. Press 'Y' on 'Run image after upgrading?' 7. Press '0' and hit 'enter' to select TFTP client (default) 8. Fill the U-Boot's IP address and TFTP server's IP address. 9. Finally, enter the 'firmware' filename. Based on patch adding support for similar Zbtlink ZBT-Z8103AX device by Ian Ishmael C. Oderon. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: 6.1: backport upstream Aquantia PHY firmware loader patchesChristian Marangi2023-11-24
| | | | | | | | | | | | Backport merged upstream patch that adds support for firmware loader from NVMEM or attached filesystem for Aquantia PHYs. Refresh all kernel patches affected by this change. Also update the path for aquantia .ko that got moved to dedicated directory upstream. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: convert to nvmem-layoutRosen Penev2023-11-24
| | | | | | nvmem-cells is deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* kernel: bump 5.15 to 5.15.139John Audia2023-11-23
| | | | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.139 Removed upstreamed: backport-5.15/830-v6.6-2-leds-turris-omnia-Drop-unnecessary-mutex-locking.patch[1] backport-5.15/830-v6.7-1-leds-turris-omnia-Do-not-use-SMBUS-calls.patch[2] x86/patches-5.15/120-hwrng-geode-fix-accessing-registers.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=aec3706971b332af8321b2beccba981b8061489a 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=893eedf596dd81c7a7f0cd80b345956ae000eab9 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=a5c83c8043d70b9a28d1bd78a2dbbab340f43889 Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 6.1 to 6.1.63John Audia2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.63 Removed upstreamed: generic/backport-6.1/815-v6.6-2-leds-turris-omnia-Drop-unnecessary-mutex-locking.patch generic/backport-6.1/815-v6.7-1-leds-turris-omnia-Do-not-use-SMBUS-calls.patch ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch Manually rebased: bcm27xx/patches-6.1/950-0606-hwrng-bcm2835-sleep-more-intelligently.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=7d0e60e4ff840e97fb18afb2a7344442c10a6fdf 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=63cdeb20ee3bfef820b045b8d3b8395f9f815a74 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=8803da01fe1b4ca3d37745283f7e73c6c2558c0c Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: add support for D-Link COVR-P2500 A1Daniel Linjama2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * QCA9563, 16 MiB flash, 128 MiB RAM, 2T2R 802.11n * QCA9886 2T2R 801.11ac Wave 2 * QCA7550 Homeplug AV2 1300 * AR8337, 3 Gigabit ports (1, 2: LAN; 3: WAN) To make use of PLC functionality, firmware needs to be provided via plchost (QCA7550 comes without SPI NOR), patched with the Network Password and MAC. Flashing via OEM Web Interface * Flash 'factory.bin' using web-interface * Wait until firmware succesfully installed and device booted * Hold down reset button to reset factory defaults (~10 seconds) Flashing via Recovery Web Interface: * Hold down reset button during power-on (~10 seconds) * Recovery Web UI is at 192.168.0.50, no DHCP. * Flash 'recovery.bin' with scripts/flashing/dlink_recovery_upload.py (Recovery Web UI does not work with modern OSes) Return to stock * Hold down reset button during power-on (~10 seconds) * Recovery Web UI is at 192.168.0.50, no DHCP. * Flash unencrypted stock firmware with scripts/flashing/dlink_recovery_upload.py (Recovery Web UI does not work with modern OSes) Co-developed-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Daniel Linjama <daniel@dev.linjama.com>
* firmware-utils: Fix PKG_MIRROR_HASHHauke Mehrtens2023-11-23
| | | | | | | | This fixes the mirror hash to the version of the file uploaded to the download mirror and which my build calculated. Fixes: b117e7244f9e ("firmware-utils: update to Git HEAD (2023-11-21)") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* tools: firmware-utils: Fix PKG_MIRROR_HASHHauke Mehrtens2023-11-23
| | | | | | | | This fixes the mirror hash to the version of the file uploaded to the download mirror and which my build calculated. Fixes: 59a66d3c9b2a ("firmware-utils: update to Git HEAD (2023-11-21)") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mvebu: remove mac-address-incrementRosen Penev2023-11-22
| | | | | | It's deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mediatek: fiilogic: device tree `switch@1f` fixRani Hod2023-11-22
| | | | | | | | | | | | | | | Quite a few `fiilogic` devices use the `mt7531` switch. Some of them have a DT node that looks like: ``` switch: switch@0 { compatible = "mediatek,mt7531"; reg = <31>; ... }; ``` This commit changes the DT node name to `switch@1f`. Signed-off-by: Rani Hod <rani.hod@gmail.com>
* ipq806x: add missing interrupt-controllerRosen Penev2023-11-22
| | | | | | Fixes dtc warnings Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq806x: remove mac-address-incrementRosen Penev2023-11-22
| | | | | | It's deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* lantiq: remove mac-address-incrementRosen Penev2023-11-22
| | | | | | It's deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* bmips: remove mac-address-incrementRosen Penev2023-11-22
| | | | | | It's deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Revert "mpc85xx: replace user space MAC with nvmem"Christian Marangi2023-11-21
| | | | | | | | | This reverts commit 931fcf61891f14dffccd0ad5dfdf7d84460ff9f2. The definition is wrong and require mac-base compatible. Also it's not clear if it's correct to use 0xc for mac size. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* mpc85xx: replace user space MAC with nvmemRosen Penev2023-11-21
| | | | | | Possible now that NVMEM supports ASCII. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mpc85xx: remove mac-address-incrementRosen Penev2023-11-21
| | | | | | It's deprecated Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mpc85xx: fix dtc warningRosen Penev2023-11-21
| | | | | | States to remove the linux prefix Signed-off-by: Rosen Penev <rosenp@gmail.com>
* octeon: remove mac-address-incrementRosen Penev2023-11-21
| | | | | | It's deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* firmware-utils: update to Git HEAD (2023-11-21)Rafał Miłecki2023-11-21
| | | | | | | | | | | 12bf1a9 lxlfw: support certificate & signature blobs eaf2ea2 lxlfw: support extracting image d770cab lxlfw: support embedding blobs 16fa890 lxlfw: fix struct lxl_hdr attribute 8e149e4 lxlfw: move code copying data to helper function 3b114de lxlfw: move code opening LXL to helper function Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: drop "mac-address-increment-byte" DT property supportRafał Miłecki2023-11-21
| | | | | | This downstream DT property is not used by any DTS file anymore. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: update to Git HEAD (2023-11-21)Rafał Miłecki2023-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20 3338f5389d72 tplink-safeloader: add TL-WPA8635P v3 17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4 f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found 916633160dc9 bcmclm: new tool for reading Broadcom's CLM data a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1 bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image. 9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1 a170683c0e11 firmware-utils: fix use of NULL string progname 89875fc18b57 tplink-safeloader: CPE510: add Canadian support 9e211d2980fe mktplinkfw2: add support to extract bootloader images c18f662f3c74 mktplinkfw2: add support to pack bootloader 3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US 0fa1cc51013f zytrx: add LTE5398-M904 635466123429 firmware-utils: ptgen: add SiFive GPT partition support ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE 3b114de29cf7 lxlfw: move code opening LXL to helper function 8e149e480391 lxlfw: move code copying data to helper function 16fa89076122 lxlfw: fix struct lxl_hdr attribute d770cab82e58 lxlfw: support embedding blobs eaf2ea28dbe6 lxlfw: support extracting image 12bf1a99bd6e lxlfw: support certificate & signature blobs Fixes: https://github.com/openwrt/openwrt/issues/12939 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* umdns: update to Git HEAD (2023-11-21)Felix Fietkau2023-11-21
| | | | | | | 9040335e102b interface: fix interface memory corruption b1e023eda358 add udebug support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* udebug: update to Git HEAD (2023-11-20)Felix Fietkau2023-11-20
| | | | | | 759d9404034b ring: add missing fread return code check Signed-off-by: Felix Fietkau <nbd@nbd.name>
* netifd: update to Git HEAD (2023-11-20), adds udebug supportFelix Fietkau2023-11-20
| | | | | | | | | 9dcc37a77cb2 add udebug support 525fa911e8ab replace DPRINTF calls with D(...) 7642eaba3838 system-linux: fix bogus debug error messages on adding bridge members f3e06e81b347 wireless: add bridge_isolate option Signed-off-by: Felix Fietkau <nbd@nbd.name>
* uboot-envtools: add settings for Synology DS213jDaniel Golle2023-11-20
| | | | | | | Add settings to be able to access the U-Boot environment on the Synology DS213j NAS. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mvebu: add support for Synology DS213jDaniel Golle2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Synology DS213j is a rather dated dual-bay SATA NAS based on on the Marvell Armada-370 SoC. It has long been supported in vanilla Linux, however, flash partitioning there didn't match with reality (ie. the bootloaders expectations) and nobody cared to wrap up OpenWrt support for the device. CPU: Marvell Armada-370 ARMv7 SoC @ 1200 MHz RAM: 512 MB DDR3 Flash: 8 MB (Micron Technology N25Q064) Network: 1x 1000M/100M/10M Ethernet (Marvell 88E1510) SATA: 2x 3.0Gbps USB: 2x USB 2.0 As OS options are becoming limited on that still quite useful hardware, patch the flash partitions to be able to get the most out of it when using OpenWrt. The vendor firmware loads kernel and initrd from fixed addresses in the flash, not making use of a modifyable environment stored in flash which is stored at a location right in the middle of the vendor's zImage partition (at 0x100000). Stock firmware flash layout: 0x000000 ~ 0x0c0000 : "RedBoot" (actually U-Boot) 0x0c0000 ~ 0x390000 : "zImage" 0x390000 ~ 0x7d0000 : "rd.gz" 0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no) 0x7e0000 ~ 0x7f0000 : "RedBoot Config" (unused? legacy left-over) 0x7f0000 ~ 0x800000 : "FIS directory" (unused? legacy left-over) OpenWrt flash layout: 0x000000 ~ 0x0c0000 : "u-boot" 0x0c0000 ~ 0x100000 : "gap" 0x100000 ~ 0x110000 : "u-boot-env" 0x110000 ~ 0x7d0000 : "kernel" 0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no) 0x7e0000 ~ 0x800000 : "gap2" "kernel", "gap" and "gap2" are concatenated using the mtd-concat virtual MTD driver, resulting in a partition "firmware" used by OpenWrt for kernel, rootfs and rootfs-overlay, 0x720000 (7296kiB) in total. Installation: 1. Connect to internal serial console port and Ethernet port, providing a TFTP server at a static IPv4 address, e.g. 192.168.1.254/24. 2. Interrupt bootloader using CTRL+C 3. Configure bootloader to load OpenWrt on future boot: setenv bootcmd "bootm f4110000" saveenv 4. Load and boot initramfs image via TFTP: setenv ipaddr 192.168.1.1 setenv serverip 192.168.1.254 tftpboot openwrt-mvebu-cortexa9-synology_ds213j-initramfs-kernel.bin bootm 5. Use sysupgrade to load final image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* hostapd: add missing acl entries for udebugFelix Fietkau2023-11-20
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ubus: update to Git HEAD (2023-11-14)Felix Fietkau2023-11-20
| | | | | | b3e8c4ef07eb Add auto subscribe support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add udebug supportFelix Fietkau2023-11-20
| | | | | | | This is not activated by default and must be explicitly enabled via ubus It supports reporting log messages and netlink packets Signed-off-by: Felix Fietkau <nbd@nbd.name>
* udebug: add new packageFelix Fietkau2023-11-20
| | | | | | | This will help with debugging by providing system wide access to per-process ring buffers with debug data. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: D-Link Dxx-1xx0 image fixesRani Hod2023-11-20
| | | | | | | | | | | | | | | | | | | | | Three fixes for D-Link DAP-1620 rev B and its twin D-Link DRA-1360: 1. `uboot-envtools` is removed from default package list. 2. Makefile variable is doubly escaped, i.e. `$$$$(DLINK_HWID)`. 3. Previously the size of `factory.bin` was always 10.5 MiB, same as D-Link firmwares. This commit makes it possible to use smaller images (with no lost space due to padding) as well as larger images. Tested successfully flashing a 6.5 MiB image and a 14.5 MiB image. Recall that factory images need to be installed via D-Link Web Recovery (at http://192.168.0.50/, server ignores pings and DHCP requests). P.S. I implemented the OEM firmware encryption algorithm, so firmware can be flashed via OEM firmware, but after successful flashing the device reboots to web recovery, so further debugging is required. Signed-off-by: Rani Hod <rani.hod@gmail.com>
* uboot-mediatek: Fix ubi command in uboot commandsCarter Wang2023-11-19
| | | | | | | Fix typo 'ubi remote ...' -> 'ubi remove ...'. Signed-off-by: Carter Wang <carter.wang@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: ipcalc.sh: Should take netmask or prefix after slashPhilip Prindeville2023-11-19
| | | | | | | | | | | | | | | | dnmasq.init now invokes ipcalc.sh as either: ipcalc.sh address/netmask ... or: ipcalc.sh address/prefix but the existing version doesn't accept the 2nd notation. We're trying to rationalize the usage of ipcalc.sh, and here we add support for the 2nd format. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* ramips: Add support for TP-Link Archer C50 v6 (CA/EU/RU)Renaud Gaspard2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the TP-Link Archer C50 v6 (CA/EU/RU). (The ES variant is a rebranded Archer C54 and NOT supported.) CPU: MediaTek MT7628 (580MHz) RAM: 64M DDR2 FLASH: 8M SPI WiFi: 2.4GHz 2x2 MT7628 b/g/n integrated WiFi: 5GHz 2x2 MT7613 a/n/ac ETH: 1x WAN 4x LAN LED: Power, WiFi2, WiFi5, LAN, WAN, WPS BTN: WPS/WiFi, RESET UART: Near ETH ports, 115200 8n1, TP-Link pinout Create Factory image -------------------- As all installation methods require a U-Boot to be integrated into the image (and we do not ship one with the image). We are not able to create an image in the OpenWRT build-process. Download a TP-Link image for your device variant (CA/EU or RU) from their website and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI --------------------- Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery ----------------------- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to assign yourself a static IP-address as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP ------------------- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI ---------- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot ----------- This is the first TP-Link MediaTek device to feature a split-uboot design. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery ------------ TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Co-authored-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Signed-off-by: Renaud Gaspard <gaspardrenaud@hotmail.com> Signed-off-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Tested-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Tested-by: Jaroslav Mikulík <byczech@gmail.com> Tested-by: Ashipa Eko <ashipa.eko@gmail.com>
* ramips: add support for D-Link COVR-X1860 A1Roland Reinl2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The COVR-X1860 are MT7621-based AX1800 devices (similar to DAP-X1860, but with two Ethernet ports and external power supply) that are sold in sets of two (COVR-X1862) and three (COVR-X1863). Specification: - MT7621 - MT7915 + MT7975 2x2 802.11ax (DBDC) - 256MB RAM - 128 MB flash - 3 LEDs (red, orange, white), routed to one indicator in the top of the device - 2 buttons (WPS in the back and Reset at the bottom of the device) MAC addresses: - LAN MAC (printed on the device) is stored in config2 partition as ASCII (entry factory_mac=xx:xx:xx:xx:xx:xx) - WAN MAC: LAN MAC + 3 - 2.4G MAC: LAN MAC + 1 - 5G MAC: LAN MAC + 2 The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1 Flashing via OEM Web Interface: - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-factory.bin via the OEM web interface firmware update - The configuration wizard can be skipped by directly going to http://192.168.0.1/UpdateFirmware_Simple.html Flashing via Recovery Web Interface: - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0 - Press the reset button while powering on the deivce - Keep the reset button pressed until the status LED blinks red - Open a Chromium based browser and goto http://192.168.0.1 - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-recovery.bin Revert back to stock using the Recovery Web Interface: - Set your IP address to 192.168.0.10, subnetmask 255.255.255.25 - Press the reset button while powering on the deivce - Keep the reset button pressed until the status LED blinks red - Open a Chromium based browser and goto http://192.168.0.1 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below. Decrypting a D-Link firmware image: - Download https://github.com/openwrt/firmware-utils/blob/master/src/dlink-sge-image.c and https://raw.githubusercontent.com/openwrt/firmware-utils/master/src/dlink-sge-image.h - Compile a binary from the downloaded file, e.g. gcc dlink-sge-image.c -lcrypto -o dlink-sge-image - Run ./dlink-sge-image COVR-X1860 <OriginalFirmware> <OutputFile> -d - Example for firmware 102b01: ./dlink-sge-image COVR-X1860 COVR-X1860_RevA_Firmware_102b01.bin COVR-X1860_RevA_Firmware_102b01_Decrypted.bin -d The pull request is based on the discussion in https://forum.openwrt.org/t/add-support-for-d-link-covr-x1860 Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
* hostapd: fix undeclared variable iface_nameNazar Mokrynskyi2023-11-19
| | | Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
* x86,armsr: interpolate GRUB_SERIAL into /etc/inittabPhilip Prindeville2023-11-19
| | | | | | | | | Some platforms have their console on other ports than ttyS0, so allow the developer to tailor this on bespoke platform images. Fixes issue #13401. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* u-boot.mk: do not force parallel buildMartin Schiller2023-11-19
| | | | | | | | Some patched u-boots may have problems with parallel build. Do not enforce parallel build here so one can set PKG_BUILD_PARALLEL:=0 in the specific u-boot Makefile also before including the u-boot.mk. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* mediatek: filogic: add JCG Q30 PRO supportChukun Pan2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: Winbond 128MB RAM: DDR3 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset Power: DC 12V 1A Flash instructions: 1. Connect to your PC via the Gigabit port of the router, set a static ip on the ethernet interface of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 2. Attach UART, pause at u-boot menu. 3. Select "Upgrade ATF BL2", then use preloader.bin 4. Select "Upgrade ATF FIP", then use bl31-uboot.fip 5. Download the initramfs image, and type "reset", waiting for tftp recovery to complete. 6. After openwrt boots up, perform sysupgrade. Note: 1. Since NMBM is disabled, we must back up all partitions. 2. Although we can upgrade new firmware in the stock firmware, we need the special fit image signature of MediaTek and dual boot (hack kernel) to make u-boot boot it. So just abandon these hacks and flash it via the serial port. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: add JCG Q30 PRO supportChukun Pan2023-11-19
| | | | | | | The vendor uboot will verify firmware at boot. So add a custom uboot build for this device. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>