aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek/patches
Commit message (Collapse)AuthorAgeFilesLines
* uboot-mediatek: fix build for RAVPower RP-WD009Daniel Golle2023-04-141-28/+8
| | | | | | | | | | | | Updating to U-Boot 2023.04 broke the build for the RAVPower RP-WD009 MT7628 board. This was due to upstream conversion of CONFIG_* to CFG_* which was not applied to our downstream patch adding support for the RAVPower RP-WD009 device. Apply CONFIG_* to CFG_* converion analog to what has been done also for mt7928_rfb upstream. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to v2023.04Daniel Golle2023-04-1240-296/+425
| | | | | | | | | | | | | | | | | | | | | | | | Update to next U-Boot timed release. Remove now obsolete patch 100-01-board-mediatek-add-more-network-configurations.patch Default IP addresses are now dealt with in Kconfig, no longer in board- specific C header files. Add patches to restore ANSI support in bootmenu which was broken upstream, always use high-speed mode on serial UART for improved stability and fix an issue with pinconf not being applied on MT7623 resulting in eMMC being inaccessible when booting from micro SD card. In order to keep the size of the bootloader on MT7623 below 512kB remove some unneeded commands on both MT7623 boards. Tested on: * BananaPi BPi-R2 (MT7623N) * BananaPi BPi-R3 (MT7986A) * BananaPi BPi-R64 (MT7622A) * Linksys E8450 (MT7622B) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: Fix ramips/mt76x8 buildbotJo Deisenhofer2023-01-181-4/+5
| | | | | | | | | | | Move defines from header to defconfig The package build and the Buildbot hang in 'make syncconfig' for u-boot-ravpower_rp-wd009 because CONFIG_SYS_MIPS_TIMER_FREQ is not in the .config, causing a console prompt. Also moved two other defines in defconfig causing duplicate definition warnings. Fixes: 3d5c5427e17a ("uboot-mediatek: update to U-Boot 2023.01") Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
* uboot-mediatek: update to U-Boot 2023.01Daniel Golle2023-01-1369-12395/+115
| | | | | | | | Support for MT7981 and MT7986 has been merged, remove patches. Tested on a couple of MT7986, MT7622 and MT7623 boards. MIPS builds are untested. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for Xiaomi Redmi Router AX6000Furong Xu2022-12-291-0/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot flash instructions: 0. OpenWrt U-Boot does not support stock layout, it comes with recovery boot support, automatic tftp recovery and never blocks UART. A new flash layout is introduced, we call it OpenWrt U-Boot layout, stock flash layout and the old OpenWrt layout are not supported. During the whole flash procedure, please do not reboot or power off unless requested explicitly, or you will break your device. 1. Your device should already running OpenWrt. If not, follow the instructions to flash OpenWrt: https://github.com/openwrt/openwrt/pull/11115 2. Backup BL2 Nvram Bdata Factory and FIP in case you break something or in case you want to go back to stock firmware one day. cat /dev/mtdblock0 > /tmp/BL2.bin cat /dev/mtdblock1 > /tmp/Nvram.bin cat /dev/mtdblock2 > /tmp/Bdata.bin cat /dev/mtdblock3 > /tmp/Factory.bin cat /dev/mtdblock4 > /tmp/FIP.bin And save all whose bin files to somewhere safe. Then backup your configurations, since ubiformat for entire mtd device is required to create new ubootenv volume for OpenWrt U-Boot. 3. Run the following cmd to boot into an initramfs with the new OpenWrt U-Boot layout that expand ubi partion to the end of flash: ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi 4. After boot into initramfs, check mtd partion info. The ubi partion should be mtd5 root@OpenWrt:~# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 BL2 mtd1: 00040000 00020000 Nvram mtd2: 00040000 00020000 Bdata mtd3: 00200000 00020000 Factory mtd4: 00200000 00020000 FIP mtd5: 07a80000 00020000 ubi 5. Load kmod-mtd-rw to temporarily make the bootloader partions writable. The kmod-mtd-rw is from the feeds, it is not packed in initramfs-factory by default. To install kmod-mtd-rw via opkg: opkg update && opkg install kmod-mtd-rw Or, download kmod-mtd-rw.ipk from OpenWrt server and install it manually e.g: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/ Select your OpenWrt release version and kernel version accordingly. Load kmod-mtd-rw: insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1 6. Run the following cmd to clean all pending crash dumps in pstore, or OpenWrt U-Boot may boot into NAND recovery or tftp recovery. rm -f /sys/fs/pstore/* 7. Format ubi and create new ubootenv volume: 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 8. This is optional. Skip this if you do not want to have NAND recovery boot feature offered by OpenWrt U-Boot. Don't worry, you always have automatic tftp recovery feature enabled. ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB ubiupdatevol /dev/ubi0_2 /tmp/ax6000-ubootmod-initramfs-recovery.itb 9. Now, flash new U-Boot. Bye-bye ugly stock U-Boot. mtd write /tmp/ax6000-ubootmod-preloader.bin BL2 mtd write /tmp/ax6000-ubootmod-bl31-uboot.fip FIP 10. Flash the squashfs-sysupgrade.bin as usual: sysupgrade -n /tmp/ax6000-ubootmod-squashfs-sysupgrade.itb Enjoy! Signed-off-by: Furong Xu <xfr@outlook.com>
* uboot-mediatek: bpi-r3: raise CONFIG_LMB_MAX_REGIONS to 64Daniel Golle2022-11-291-6/+8
| | | | | | | | Raise CONFIG_LMB_MAX_REGIONS to 64 as there are going to be more than 8 (the default value) reserved regions to allow supporting offloading Wireless-to-Ethernet traffic on MT7986. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: optimize MMC eraseDaniel Golle2022-11-174-7/+7
| | | | | | | | | Fix mmc_write_vol hush script used by many boards to avoid timeouts on slow SD cards: Instead of erasing a complete partition, only erase blocks for the to-be-written image when writing to MMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to U-Boot 2022.10Daniel Golle2022-10-1867-8703/+71
| | | | | | | | | Remove patches adding support for MT7621 which have been merged upsteam. Patches for MT7981 and MT7986 have been merged too, but not in time to be included in the 2022.10 release, so we have to keep carrying them until the 2023.01 release. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fixes defconfig typo for UniFi 6 LRChukun Pan2022-10-111-1/+1
| | | | | | | CONFIG_CMD_MTDPART does not exist, fix it. Fixes: e9ad412 ("uboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: fixes defconfig typo for Linksys E8450Chukun Pan2022-10-111-1/+1
| | | | | | | CONFIG_CMD_MTDPART does not exist, fix it. Fixes: ed50004 ("uboot-mediatek: add support for Linksys E8450") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mediatek: filogic: use WPS button instead of RST on BPi-R3Daniel Golle2022-09-101-3/+3
| | | | | | | | | The GPIO used for the RST button is also used for PCIe-CLKREQ signal. Hence it cannot be used as button signal if PCIe is also used. Wire up WPS button to serve as KEY_RESTART in Linux and "reset" button in U-Boot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: replace patches with updated versionsDaniel Golle2022-08-3136-164/+791
| | | | | | | | | | | | | | | | Weijie Gao has submitted an updated version of the patchset adding support for MT7986 and MT7981 to U-Boot. Use that v2 patchset. Changes of v2: - Add cpu driver for print_cpuinfo() - Fix NULL pointer dereference in mtk_image (was already fixed in OpenWrt) - Fix coding style - Minor changes https://patchwork.ozlabs.org/project/uboot/list/?series=316148 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for Bananapi BPi-R3Daniel Golle2022-08-301-0/+1368
| | | | | | | | | | | | | | | The Bananapi BPi-R3 board can boot from eMMC, SD card, SPI-NAND and SPI-NOR, depending on the position of switches controlling the BOOTSEL bootstrap pins as we as hard-wired chip-select lines. The position of the chip-select switch SW6 decides whether either SD card or eMMC can be accessed, SW5 selects either SPI-NAND or SPI-NOR. Generate U-Boot for all 4 boot options. The SD card version allows installation to SPI-NAND and SPI-NOR (eMMC cannot be accessed simultanously with the SD card), the SPI-NAND version allows installation to eMMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: no compression means IH_COMP_NONEDaniel Golle2022-08-283-1/+120
| | | | | | | | | | Treat missing compression node in FIT image as IH_COMP_NONE. This is implicentely already happening in most places, but for now was still triggering an annoying warning about initramfs compression being obsolete despite compression note being absent. Fix this. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: mt7986: add generic reset button supportDaniel Golle2022-08-281-0/+40
| | | | | | | Allow resetting environment to default values when defined button exists in device tree. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: mt7986: support PSTORE/ramoopsDaniel Golle2022-08-281-0/+38
| | | | | | Assign reserved memory for PSTORE/ramoops for the MT7986 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: additions from MTK SDKDaniel Golle2022-08-2845-276/+10562
| | | | | | | | | | | | | | | * updated SNAND/SNFI driver brings support for MT7981 * add support for MediaTek NAND Memory bad Block Management (NMBM) (not used for any boards atm, but could be useful in future) * wire up NMBM support for MT7622, MT7629, MT7981 and MT7986 * replace some local patches with updated version from SDK * bring some legacy precompiler symbols which haven't been converted into Kconfig symbols in U-Boot 2022.07, remove when bumbping to U-Boot 2022.10: 100-28-include-configs-mt7986-h-from-SDK.patch Source: https://github.com/mtk-openwrt/u-boot Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for MT798x platformsDaniel Golle2022-08-2835-5/+12163
| | | | | | Import pending patches to support the upcoming Filogic platforms. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix factory reset on UBIDaniel Golle2022-08-282-2/+2
| | | | | | | Truncating a UBI volume using `ubi write 0x0 volname 0x0` results in segfault on newer U-Boot. Write 1MB of 0s instead. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix Ubiquiti UniFi 6 LR U-Boot modDaniel Golle2022-08-281-20/+8
| | | | | | | Image names as well as the calculation of the padded image size did not work as intended. Fix that. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: backport pinctrl fix to avoid error messageDaniel Golle2022-08-114-8/+49
| | | | | | | Import a3ba6adb70 arm: dts: mt7622: remove default pinctrl of uart0 and apply also to locally added boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: reorder patchesDaniel Golle2022-07-302-0/+0
| | | | | | | Rename/reorder patches to avoid duplicate usage of 300-* prefix. No functional changes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: unbreak build with binmanDaniel Golle2022-07-1331-321/+71
| | | | | | | | | swig has been installed on the buildbots a while a ago and Petr Štetiar got a fix for the pylibfdt error. Use that and re-enable the builds for mt7620 and mt7621. Refresh patches while at it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for UBI EOF markerDaniel Golle2022-07-131-0/+51
| | | | | | | Let U-Boot handle free space in UBI partitions by recognizing the EOF marker OpenWrt is using as well for that purpose. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-ramips: add support for MT7621, merge into uboot-mediatekDaniel Golle2022-07-1127-6/+7577
| | | | | | | | | | | | * Merge uboot-ramips into uboot-mediatek. * Port support for the RAVPower RP WD009 to U-Boot 2022.07. * Add support for MT7621 and add builds for the reference boards. * Add builds for MT7620 and MT7628 reference boards. This should help to make development of U-Boot-level board support for all MediaTek targets much easier. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to 2022.07 releaseDaniel Golle2022-07-1118-160/+205
| | | | | | | | | | | Add patch to fix host-build of the mkimage tool without CONFIG_TOOLS_LIBCRYPTO. Update and refresh all patches. Tested on BananaPi R64 (MT7622) successfully booting from SD card, eMMC and SPI-NAND. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: replace patch with accepted commitDaniel Golle2022-04-201-34/+10
| | | | | | | | Replace pending patch with version accepted upstream. Other than in the first suggested version, the new property is now called 'u-boot,bootconf' instead of 'bootconf'. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: remove '0x' prefix from pstore nodeDaniel Golle2022-04-191-1/+1
| | | | | | | | Remove '0x' prefix from pstore node in dts, just like it was done for the device tree used by Linux on MT7622. This change is done in preparation to update U-Boot to 2022.04. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add patch to allow accessing bootconf from LinuxDaniel Golle2022-03-211-0/+60
| | | | | | | | Store selected boot configuration in '/chosen' node in device tree, so it can be accessed by Linux (and used for fine-tuning the FIT partition parser). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to version 2022.01Daniel Golle2022-01-2320-109/+60
| | | | | | | Tested on BananaPi R2 (SD, eMMC), BananaPi R64 (SD, eMMC, SPI-NAND) and UniElec U7623-02 (eMMC). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update build for the U7623-02 boardDaniel Golle2022-01-235-69/+272
| | | | | | | Brings bootmenu and production/recovery dual-boot scheme like on the BPi-R2, BPi-R64, E8450 and UniFi 6 LR. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to 2021.10Daniel Golle2021-10-0431-608/+70
| | | | | | | | | | | U-Boot 2021.10 has been released. Rebase mediatek patches on top of new release and remove some patches which have been merged upstream. Tested on Bananapi BPi-R2 (mt7623), Bananapi BPi-R64 (mt7622) and Linksys E8450 (mt7622). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix and make use of LEDs on BPi-R2Daniel Golle2021-09-302-5/+36
| | | | | | | Fix BPi-R2 GPIO LEDs to indicate boot into production or recovery firmware in DTS and define them in default environment. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: pass console=tty1 for BPi-R2Daniel Golle2021-08-211-1/+1
| | | | | | | BananaPi BPi-R2 comes with HDMI and MIPI-DSI. Use dislpay facility in Linux by add "console=tty1" boot argument. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: rework support for the BPi-R2Daniel Golle2021-07-202-13/+301
| | | | | | | | | * use built-in default environment instead of file in bootfs * get rid of bootfs alltogether and use uImage.FIT * auto-detect boot device like original script did * add support for factory button Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: several fixes for MT7622Daniel Golle2021-07-114-94/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | * ! Behavior change ! Old behavior: If the Reset button is held down during power-on do factory reset and try booting recovery from TFTP forever. If valid recovery is received via TFTP, write it to flash and boot. New behavior: If the Reset button is held down during power-on do factory reset, then try TFTP *once*, then try booting on-flash recovery, then keep trying via TFTP forever until a valid image is received. Only if there is no bootable recovery stored on flash, store the downloaded recovery. Then boot it. * Set loadaddr to 0x48000000 in order to allow booting images larger than ~47MB (reported by Oskari Lemmelä). Setting loadaddr to 0x48000000 gives us 384MB on devices with 512MB RAM, which should be more than enough as a maximum size for uImage.FIT to be loaded. * Widely unify device-specific default environment in preparation to auto-generate it from parameters. * backport upstream commit fixing MBR/DOS partitioning Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediaktek: add support for PSTORE and check it on bootDaniel Golle2021-05-085-15/+131
| | | | | | | | Add support for pstore/ramoops now that DRAM content is preserved over reboot on MT7622. On each boot, check pstore and boot to recovery image in case there are records stored in it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: unifi-6-lr: fix erase of production paritionDaniel Golle2021-05-072-13/+15
| | | | | | | | | | | mtd erase needs to be aligned with erase blocks. Use padded image size for erasing the production volume. As the environment grew above the current size of 0x1000 bytes by introducing the new padding function, increase the env size to 0x4000. While at it, clean up reset button function to work to more reliable on that board. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r64: add TFTP update options to eMMC bootmenuDaniel Golle2021-05-011-6/+14
| | | | | | | Just like on SPI-NAND, also allow updating the bootloader comfortably on eMMC installations. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: unifi6lr: mtd erase before write to flashChen Minqiang2021-04-281-2/+2
| | | | | | | | Erase firmware ereas before writing to recovery or production partition when updating them via the bootloader menu. Signed-off-by: Chen Minqiang <ptpt52@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: minor fixes for bpi-r64 spi-nand default envDaniel Golle2021-04-111-5/+4
| | | | | | | * check image checksums before writing to flash * only bootmenu_0...9 are working, remove bootmenu_a entry Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add spi-nand build for bananapi bpi-r64Daniel Golle2021-04-112-21/+290
| | | | | | | | Some of bpi-r64 boards have serial NAND attached to SPI bus. Build U-Boot for booting from SPI-NAND. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mediatek: bpi-r64: use separate partition for emmc bootloaderOskari Lemmela2021-04-111-4/+4
| | | | | | | eMMC booloader is stored to separate partition. FIP size is increased to 2MB. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* uboot-mediatek: add build for Ubiquiti Networks UniFi 6 LRDaniel Golle2021-04-093-7/+473
| | | | | | | | | | | | | | | | Add U-Boot build for the Ubiquiti Networks UniFi 6 LR access point. This allows updating the bootchain to modern ARM Trusted Firmware 2.4 and U-Boot 2021.04 while keeping as much of the existing flash layout as possible (u-boot-env, factory and eeprom partitions are retained), gaining robust recovery vs. production dual-boot mechanism. Add info for the Winbond W25Q512JV SPI NOR flash used in the device and wait for GPIOs to settle after reset before checking for reset button. I2C connected LED controller is not supported yet. Writing large amounts of data to SPI flash currently doesn't work due to watchdog timeout causing reset before data write completes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r64: erase eMMC environment on installationDaniel Golle2021-04-091-1/+1
| | | | | | | Erase U-Boot environment partition on eMMC on installation to make sure chages are applied. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to v2021.04Daniel Golle2021-04-058-77/+6
| | | | | | | | | | Remove patches merged upstream and refresh the remaining ones. Runtime tested on * Bananapi BPi-R64 (eMMC and SD Card) * Linksys E8450 (SPI-NAND) * Ubiquiti UniFi 6 LR (SPI-NOR) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r64: no longer force recovery on first-bootDaniel Golle2021-04-041-4/+4
| | | | | | | | Now that sdcard.gz image contains everything needed to boot straight into production image, no longer force booting into recovery image on first boot by removing the logic which implemented that. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: adapt root= cmdline arg for bpi-r64Daniel Golle2021-03-311-2/+2
| | | | | | Adapt to FIT partition parser changes. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: don't rely in 'lzma' cmdlineDaniel Golle2021-03-182-5/+11
| | | | | | | Use 'xz --format=lzma' instead. Fixes build for mt7629. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix default environment of bpi-r64 emmcDaniel Golle2021-03-171-1/+1
| | | | | | | The emmc variant used the default environment of the sdmmc variant. Fix that. Signed-off-by: Daniel Golle <daniel@makrotopia.org>