aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mediatek/mt7622
Commit message (Collapse)AuthorAge
* mediatek: disable MediaTek SoC Information (mtk-socinfo) driverDaniel Golle2025-07-21
| | | | | | | | | | | | With the switch to Linux 6.12 this driver was enabled by accident. However, it doesn't support any of the router SoCs but is meant to be used only by the smartphone, tablet and chromebook SoCs. Disable the driver again to silence a kernel error logline during boot. Fixes: 0a0f5f94ec ("mediatek: mt7623: update config-6.12") Fixes: 029b7ed9c4 ("mediatek: mt7622: update config-6.12") Reported-by: https://aparcar.org/openwrt-tests/119/ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: remove files, patches and config for Linux 6.6Daniel Golle2025-07-18
| | | | | | Drop support for Linux 6.6 now that we are using Linux 6.12. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: 6.12: add new config symbolsChukun Pan2025-07-13
| | | | | | | | | Move the following kernel symbol configs to generic: COMPRESSED_INSTALL and IMX_SCMI related configs Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Link: https://github.com/openwrt/openwrt/pull/19380 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7622: update config-6.12Daniel Golle2025-05-26
| | | | | | | Refresh kernel configuration of the mt7622 subtarget for use with Linux 6.12. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel/mediatek: Restore kernel files for v6.6Daniel Golle2025-05-26
| | | | | | | | | | | This is an automatically generated commit which aids following Kernel patch history, as git will see the move and copy as a rename thus defeating the purpose. For the original discussion see: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel/mediatek: Create kernel files for v6.12 (from v6.6)Daniel Golle2025-05-26
| | | | | | | | This is an automatically generated commit. When doing `git bisect`, consider `git bisect --skip`. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: validate uImage.FITDaniel Golle2025-04-21
| | | | | | Validate the uImage.FIT instead of only checking the image magic. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: validate unified uImage.FIT images before flashingDaniel Golle2025-04-21
| | | | | | | | Prevent flashing truncated or otherwise corrupted uImage.FIT images by verifying checksums and hashes of all sub-images before flashing using the newly packaged fit_check_sign tool. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: import rtl8261n patches from mediatekAndrew LaMarche2025-03-16
| | | | | | | | | RTL8261N is used on some Airoha and Realtek devices. Move the driver from Mediatek to generic so it can be used everywhere. Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18163 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Activate CONFIG_NET_SWITCHDEV in generic configHauke Mehrtens2025-03-15
| | | | | | | | | | | | | | | | The CONFIG_NET_SWITCHDEV option is needed by CONFIG_DSA and some other options. It is boolean, we have to compile it into the kernel it self. Activate it for all targets in the generic configuration, it is already activated for most of them. This allows to install DSA drivers as a module. On the ramips/mt7620 target the kernel would grown by 4.5kB. For some small targets which do not support a DSA switch by default the option is deactivated. Link: https://github.com/openwrt/openwrt/pull/17668 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: Refresh kernel configurationMartin Schiller2025-03-06
| | | | | | | | | | | | | | I selected one subtarget after the other and refreshed their configuration using this command: make kernel_oldconfig CONFIG_TARGET=subtarget For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually. Otherwise, building MT7629 with ALL_KMODS we get prompted for LEDS_SMARTRG_LED and this will break CI and in future buildbot compilation. See commit 6bdea8c7bd85 ("mediatek: mt7629: 6.6: disable LEDS_SMARTRG_LED by default") for more details. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* mediatek: add Airoha AN8855 gigabit switch driverDim Fish2025-01-23
| | | | | | | | | | | New revisions of Xiaomi AX3000T with 1.0.84+ stock firmware contain new hardware. This commit add support for Airoha AN8855 gigabit switch driver with 6.6 kernel patches Based on https://patchwork.kernel.org/project/netdevbpf/cover/20241209134459.27110-1-ansuelsmth@gmail.com/ Signed-off-by: Dim Fish <dimfish@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16709 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* mediatek: mt7622: sync buffalo.sh with ramips/mt7621INAGAKI Hiroshi2025-01-04
| | | | | | | | | | Sync buffalo.sh with the one in ramips/mt7621 to improve handling of the TRX magic numbers of Buffalo WSR devices and switching sysupgrade method between buffalo_upgrade_ubinized() and nand_do_upgrade(). Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17408 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7622: improve fixup of trx for Buffalo devicesINAGAKI Hiroshi2025-01-04
| | | | | | | | | Unify the common part to the function and don't fixup trx when booting with initramfs image. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17408 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: filter out compiler opts from configRosen Penev2024-11-17
| | | | | | | | | These get dynamically set based on compiler version. Not relevant for targets. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16770 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: remove GCC11_NO_ARRAY_BOUNDSRosen Penev2024-11-17
| | | | | | | | This symbol is no longer present. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16770 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: add support for Realtek RTL8261n 10G PHYsJohn Crispin2024-11-01
| | | | | | There is no upstream driver yet. Merge the RTL SDK driver for now. Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: mt7622: add netdev rename preinit scriptDaniel Golle2024-10-16
| | | | | | | | Add preinit script to rename network interfaces according to the label provided in Device Tree. Fixes: b6d8297510 ("mediatek: mt7622: add Adtran SmartRG SDG-841t6 device") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: add Adtran SmartRG SDG-841t6 deviceDaniel Golle2024-10-15
| | | | | | | | | | | | | | | Specification SoC: MediaTek MT7622A (2x Cortex-A53) RAM: NANYA NT5CC256M16ER-EK (512 MiB) MMC: Kioxia THGBMNG5D1LBAIT (4 GiB) ETH0: Intel/MaxLinear GPY211 (2500M/1000M/100M/10M) ETH1: Lantiq/Intel/MaxLinear PEF7071/GPY111 (1000M/100M/10M) WLAN0: MediaTek MT7915E + MT7975D 2T2R 802.11bgn/ax (2.4G) 2T2R 802.11an/ac/ax (5G L) WLAN1: MediaTek MT7915E + MT7975A 4T4R 802.11an/ac/ax (5G H) BT: BT5 provided by MT7915E+MT7975D (missing firmware) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add driver for Adtran MFGINFO NVMEM layoutDaniel Golle2024-10-15
| | | | | | | This driver allows retrieving MAC addresses and other factory information via the NVMEM framework on Adtran devices. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: enable HWMON in kernel configDaniel Golle2024-10-15
| | | | | | | | Building HWMON as module prevents some other drivers from getting built into the kernel, e.g. mxl-gpy. Always enable HWMON and also set THERMAL_HWMON. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: phase out uImage.FIT partition parserDaniel Golle2024-08-28
| | | | | | | | All boards using the deprecated uImage.FIT partition parser have been migrated to the new fitblk driver. Drop the now no longer needed partition parser. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek/mt7622: fix config symbol for 2.5GE MTK driverRany Hany2024-08-22
| | | | | | | | | | | | | | The commit backporting new MTK patches did not update the Kernel config for mediatek/mt7622 causing the build to fail. Simply use the new config symbol name for the driver to fix the issue. Fixes: 1069514978 ("mediatek: backport pending Ethernet PHY driver patches") Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/16225 Signed-off-by: Robert Marko <robimarko@gmail.com>
* mediatek: fix platform_copy_config()Daniel Golle2024-07-18
| | | | | | | | Also use env variables exported by export_fitblk_rootdev() in platform_copy_config(). Fixes: 4448d6325f ("mediatek: make use of common uImage.FIT upgrade functions") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: make use of common uImage.FIT upgrade functionsDaniel Golle2024-07-18
| | | | | | Use newly introduced fit_do_upgrade() function in /lib/upgrade/platform.sh. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: switch to Linux 6.6Daniel Golle2024-05-03
| | | | | | | Switch to Linux kernel version 6.6 and drop configs, files and patches for Linux 6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add Airoha EN8801SC PHY driverRobert Marko2024-04-11
| | | | | | | | | | | Airoha EN8801SC PHY is a gigabit PHY used on Edgecore EAP111 so, include the MTK driver with some cleanups. Unfortunatelly, there is no specification sheet nor datasheet available in order to demistify the magic PBUS writes and work on upstreaming this driver. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* treewide: disable spectre mitigation on unaffected Arm64 targetsQingfang Deng2024-03-23
| | | | | | | Cortex-A53 is not vulnerable to any Spectre variants. Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability Signed-off-by: Qingfang Deng <dqfext@gmail.com>
* mediatek: mt7622: add a second u-boot for redmi-ax6sChuanhong Guo2024-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vendor u-boot knows nothing about UBI, and we used to have a fixed-size kernel partition for vendor u-boot and UBI for rootfs. However, that fixed partition becomes too small eventually, and expanding it requires complicated procedure. This commit changed the flash layout and added a second u-boot where the kernel supposed to be. Now the vendor u-boot chainloads our mainline u-boot, and our u-boot reads kernel+rootfs from UBI, verifies it, and boot into OpenWrt. There are two possible ways to convert from the old fw: Flash the factory image using mtd (provided by @rany2): mount -o remount,ro / mount -o remount,ro /overlay cd /tmp dd if=factory.bin bs=1M count=4 | mtd write - kernel dd if=factory.bin bs=1M skip=4 | mtd -r write - ubi Or, flash the 2nd u-boot via mtd and upload the firmware to the 2nd u-boot using tftp: 1. prepare a tftp server at 192.168.1.254 to serve the sysupgrade image: openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb 2. upload the ubi-loader.itb to OpenWrt /tmp, and flash it to the old kernel partition: mtd -r write openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-ubi-loader.itb 3. The router should reboot and flash the sysupgrade image via TFTP. Procedure for flashing from vendor firmware shouldn't change. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7622: simplify 02_networkChukun Pan2024-03-16
| | | | | | | | | Most mt7622 devices use the mt7531 switch, which have been switched to dsa driver for a long time. So use dsa as the default configuration and configure these rtl8367s devices separately. This reduces the amount of code. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: add kernel configs for Linux 6.6Daniel Golle2024-03-11
| | | | | | Add config-6.6 for all mediatek subtargets. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: include 'fitblk' package for subtargetsDaniel Golle2024-02-26
| | | | | | | | | | If selected on a per-board base, fitblk doesn't end up in initramfs images which always only come with the subtarget's default packages. Hence fitblk needs to be included as a default package of all subtargets making use of fitblk instead of it being selected for individual boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: drop platform_get_bootdevDaniel Golle2024-02-26
| | | | | | | Now that we got fitblk_get_bootdev in /lib/upgrade/common.sh we don't need platform_get_bootdev in each of the subtargets any longer. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: no longer select FIT_PARTITIONDaniel Golle2024-02-23
| | | | | | | | | | | | | All mt7622 board previously using the FIT partition parser have been converted to use the fitblk driver: 6aec3c7b5b mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI build 41c053141e mediatek: mt7622: convert unifi6lr-v{1,2,3}-ubootmod to fitblk 208f6c1232 mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblk Remove the now no longer needed FIT partition parser from builds for mt7622. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI buildDaniel Golle2024-02-15
| | | | | | | | | | | | | | | | | Move fip and factory into UBI static volumes. Use fitblk instead of partition parser. !! RUN INSTALLER FIRST !! Existing users of previous OpenWrt releases or snapshot builds will have to **re-run the updated installer** before upgrading to firmware after this commit. DO NOT flash or run even just the initramfs image unless you have run the updated installer which moves the content of the 'factory' partition into a UBI volume. tl;dr: DON'T USE YET! Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: convert unifi6lr-v{1,2,3}-ubootmod to fitblkDaniel Golle2024-02-15
| | | | | | No bootloader changes needed in this case, smooth transition. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblkDaniel Golle2024-02-15
| | | | | | | Modernize bootloader and flash memory layout of the BPi-R64 similar to how it has also been done for the BPi-R3. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: backport a hell of thermal commitsDaniel Golle2024-02-15
| | | | | | | Backport almost 50 commits from upstream Linux to improve thermal drivers for MediaTek SoCs and add new LVTS driver for MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: switch to Linux version 6.1Daniel Golle2024-02-15
| | | | | | Drop support for Linux 5.15 and switch to Linux 6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: refresh kernel configChukun Pan2024-01-14
| | | | | | Refresh kernel config with 'make kernel_oldconfig'. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: Add support for D-Link EAGLE PRO AI R32Roland Reinl2024-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R32 is like the M32 part of the EAGLE PRO AI series from D-Link. Specification: - MT7622BV SoC with 2.4GHz wifi - MT7975AN + MT7915AN for 5GHz - MT7531BE Switch - 512MB RAM - 128 MB flash - 2 LEDs (Status and Internet, both can be either orange or white) - 2 buttons (WPS and Reset) Compared to M32, the R32 has the following differences: - 4 LAN ports instead of 2 - The recory image starts with DLK6E6015001 instaed of DLK6E6010001 - Individual LEDs for power and internet - MAC address is stored at another offset in the ODM partition MAC addresses: - WAN MAC is stored in partition "Odm" at offset 0x81 - LAN (as printed on the device) is WAN MAC + 1 - WLAN MAC (2.4 GHz) is WAN MAC + 2 - WLAN MAC (5GHz) is WAN MAC + 3 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 internet LED blinks fast - Open a Chromium based and goto http://192.168.0.1 - Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-recovery.bin Flashing via uBoot: - Open the case, connect to the UART console - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router - Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-initramfs-kernel.bin. - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later. - Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu - Enter image file, tftp server IP and device IP (if they differ from the default). - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface) - Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later - Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-squashfs-sysupgrade.bin - Reboot the device. OpenWrt should start from flash now Revert back to stock using the 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 internet LED blinks fast - Open a Chromium based 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/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util - Run ./m32-firmware-util R32 --DecryptFactoryImage <OriginalFirmware> <OutputFile> - Example for firmware R32A1_FW103B01: ./m32-firmware-util R32 --DecryptFactoryImage R32A1_FW103B01.bin R32A1_FW103B01.decrypted.bin Revert back to stock using uBoot: - Open the case, connect to the UART console - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router - Run a tftp server which provides the previously created backup of the Kernel1 partition. - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later. - Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu - Enter image file, tftp server IP and device IP (if they differ from the default). - TFTP download to FLASH will start. After a few seconds the stock firmware should start again There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP. It can be used if no backup of the Kernel1 partition is reuqired. Flahsing via OEM web interface is currently not possible, the OEM images are encrypted. Creating images is only possible manually at the moment. The support for the M32/R32 already includes support for flashing from the OEM web interface: - The device tree contains both partitions (Kernel1 and Kernel2) with conditions to select the correct one based on the kernel command line - The U-Boot variable "boot_part" is set accordingly during startup to finish the partition swap after flashing from the OEM web interface - OpenWrt sysupgrade flashing always uses the partition where it was initially flashed to (no partition swap) Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
* mediatek: import driver for Adtran SmartRG RGBW LEDDaniel Golle2023-12-10
| | | | | | | Import driver for I2C-connected HolTek MCU controlling the RGBW LED found in Adtran SmartRG devices. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: Add support for D-Link EAGLE PRO AI M32Roland Reinl2023-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - MT7622BV SoC with 2.4GHz wifi - MT7975AN + MT7915AN for 5GHz - MT7531BE Switch - 512MB RAM - 128 MB flash - 3 LEDs (red, orange, white) - 2 buttons (WPS and Reset) MAC addresses: - WAN MAC is stored in partition "Odm" at offset 0x83 - LAN (as printed on the device) is WAN MAC + 1 - WLAN MAC (2.4 GHz) is WAN MAC + 2 - WLAN MAC (5GHz) is WAN MAC + 3 Disassembly: Remove 4 screws in the bottom and 2 screws in the top (after removing the blue cover on the top), then the board can be pulled out. The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1 Flashing via 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 fast - Open a Chromium based and goto http://192.168.0.1 - Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-recovery.bin Flashing via uBoot: - Open the case, connect to the UART console - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router - Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-initramfs-kernel.bin. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later. - Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu - Enter image file, tftp server IP and device IP (if they differ from the default). - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface) - Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later - Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-squashfs-sysupgrade.bin - Reboot the device. OpenWrt should start from flash now 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 fast - Open a Chromium based 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/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util - Run ./m32-firmware-util M32 --DecryptFactoryImage <OriginalFirmware> <OutputFile> - Example for firmware 1.03.01_HOTFIX: ./m32-firmware-util M32 --DecryptFactoryImage M32-REVA_1.03.01_HOTFIX.enc.bin M32-REVA_1.03.01_HOTFIX.decrypted.bin Revert back to stock using uBoot: - Open the case, connect to the UART console - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router - Run a tftp server which provides the previously created backup of the Kernel1 partition. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later. - Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu - Enter image file, tftp server IP and device IP (if they differ from the default). - TFTP download to FLASH will start. After a few seconds the stock firmware should start again There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP. It can be used if no backup of the Kernel1 partition is reuqired. Flahsing via OEM web interface is currently not possible, the OEM images are encrypted and require a specific memory layout which is not compatible to the partition layout of OpenWrt. Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
* mediatek: add support for Buffalo WSR-3200AX4SINAGAKI Hiroshi2023-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WSR-3200AX4S is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on MT7622B. Specification: - SoC : MediaTek MT7622B - RAM : DDR3 512 MiB - Flash : SPI-NAND 128 MiB (Winbond W25N01GVZEIG) - WLAN : 2.4/5 GHz 4T4R - 2.4 GHz : MediaTek MT7622B (SoC) - 5 GHz : MediaTek MT7915 - Ethernet : 5x 10/100/1000 Mbps - Switch : MediaTek MT7531 - LEDs/Keys : 6x/5x (2x: buttons, 3x: slide-switches) - UART : through-hole on PCB (J4) - assignment: 3.3V, GND, TX, RX from tri-angle marking - settings : 115200n8 - Power : 12 VDC, 1.5 A Flash instruction using factory.bin image: 1. Boot WSR-3200AX4S with "Router" mode 2. Access to "http://192.168.11.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory.bin image and click update ("更新実行") button 4. Wait ~120 seconds to complete flashing Note: - This device has 2x OS images on flash. The first one will always be used for booting and the secondary is for backup. - This support generates multiple factory*.bin image: - factory.bin : for flashing from OEM WebUI - factory-uboot.bin: for flashing from U-Boot or clean installation via sysupgrade (don't use for normal sysupgrade) Known issues: - Wi-Fi MAC addresses won't be applied to each adapter. MAC Addresses: LAN : C4:3C:EA:xx:xx:60 (board_data, mac (text)) WAN : C4:3C:EA:xx:xx:60 (board_data, mac (text)) 2.4 GHz: C4:3C:EA:xx:xx:61 5 GHz : C4:3C:EA:xx:xx:68 Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* mediatek: expand kernel size to 6MiB for WSR-2533DHP2INAGAKI Hiroshi2023-09-24
| | | | | | | | | | Expand kernel partition size on WSR-2533DHP2 for the kernel larger than 4 MiB. To prevent upgrading from old firmware before this commit, bump the compat version to 1.1 and add a message for forced sysupgrade using factory-uboot.bin image. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* kernel: remove CRYPTO_BLAKE2S from all >=5.15Christian Svensson2023-07-08
| | | | | | | | | This option was removed from upstream kernel back in 2022. See commits: 2d16803c562ecc644803d42ba98a8e0aef9c014e (>=6.0) 3dd33a09f5dc12ccb0902923c4c784eb0f8c7554 (>=5.15.61 backport) Signed-off-by: Christian Svensson <blue@cmd.nu>
* mediatek: adapt kernel configuration for Linux 6.1Daniel Golle2023-07-07
| | | | | | Update kernel configuration to build Linux 6.1 for all subtargets. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: copy config-5.15 to config-6.1 for all subtargetsDaniel Golle2023-07-07
| | | | | | | To ease review, first copy all subtargets' kernel config-5.15 to the to-be-adapted config-6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: set new compat version if booted on R64 and R3Daniel Golle2023-06-06
| | | | | | | | | | | | | | | | | If the board comes up with OpenWrt that means that the bootloader is recent enough and knows about the new device tree overlays. Using /etc/board.d/ is not enough in this case because it doesn't overwrite existing configuration which may exist (and is fine to exist) if the user updated with 'sysupgrade -F *.itb' and has kept configuration. They would still need to manually set compat_version even though the fact that the bootloader env has been updated can be implied by the fact that the system has started. Hence we can always set compat_version=1.1 for those two boards using uci-defaults. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: use updated device tree overlay mechanism for BPi-R64Daniel Golle2023-06-05
| | | | | | Use new device tree overlay mechanism for the BananaPi BPi-R64 board. Signed-off-by: Daniel Golle <daniel@makrotopia.org>