aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek/patches
Commit message (Collapse)AuthorAgeFilesLines
* uboot-mediatek: mt7622: suppress unwanted pinctrl warningDaniel Golle2022-09-032-6/+2
| | | | | | | Import patch which removes the default pinctrl of uart0 to suppress the unwanted warning. Apply also to downstream boards. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: backport fix for unstable UART on MT7622Daniel Golle2022-09-031-0/+26
| | | | | | | | | | | | | Import pending patch "arm: dts: mt7622: force high-speed mode for uart" from Weijie Gao <weijie.gao@mediatek.com> fixing the UART problems on MT7622 which made it hard to use the U-Boot menu on devices with this SoC. This patch is also contained in commit c09eb08dad ("uboot-mediatek: add support for MT798x platforms") in the development branch. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: no compression means IH_COMP_NONEDaniel Golle2022-09-034-4/+121
| | | | | | | | | | | 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> (cherry picked from commit 0a18456ffc25d6a26911fca6f9079090243c2284)
* uboot-mediatek: fix factory reset on UBIDaniel Golle2022-09-032-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> (cherry picked from commit d118cbdfece181994a96d1bcb1868bd807d481bf)
* uboot-mediatek: fix Ubiquiti UniFi 6 LR U-Boot modDaniel Golle2022-09-031-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> (cherry picked from commit 0bc8889e7b4f19d7e33a9be6c3db918fed051501)
* uboot-mediatek: remove '0x' prefix from pstore nodeDaniel Golle2022-04-231-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> (cherry picked from commit 810b48e79389a54b9b332fa2834360602a9734f3)
* uboot-mediatek: add patch to allow accessing bootconf from LinuxDaniel Golle2022-03-271-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> (cherry picked from commit dfc3ea6810904f4f498d4a1304443c1a4c9f1e3c)
* 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>
* uboot-mediatek: bpi-r64: make use of FIT configuration selectionDaniel Golle2021-03-171-10/+16
| | | | | | | | | | | | | Allow selecting either SATA or PCIE functionality using uImage.FIT configurations and device-tree overlays. By default, PCIE1 is selected (as it has been before this change). To select SATA instead, you can do this now: fw_setenv bootconf config-mt7622-bananapi-bpi-r64-sata and reboot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: also install production image to eMMCDaniel Golle2021-03-141-2/+5
| | | | | | | Make installation to eMMC more convenient on the BPi-R64 by also copying the production image (if valid) from SD Card to eMMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: import fix for AHCI and enable SATADaniel Golle2021-03-132-2/+26
| | | | | | | | Import patch form Frank Wunderlich <frank-w@public-files.de> to fix build of MediaTek AHCI SATA driver. Enable that driver on Bananapi BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix build on Mac OS XDaniel Golle2021-03-131-0/+10
| | | | | | | Copy patch added to uboot-sunxi by commit 3cc57ba462 ("uboot-sunxi: add missing type __u64") also to uboot-mediatek. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update configs for MT7622 deviesDaniel Golle2021-03-122-4/+48
| | | | | | | * make sure USB 2.0 works (useful for UEFI-booting eg. memtest86) * include more useful U-Boot config options on BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to 2021.04-rc3 with MediaTek's patchesDaniel Golle2021-03-1138-8845/+5709
| | | | | | | | | | | | | | MediaTek published their current U-Boot patchset on github: https://github.com/mtk-openwrt/u-boot/commits/mtksoc Import the platform patches from there (`00-mtk-*.patch`), arrange, them nicely, drop no longer needed local patches and rebase on top of U-Boot 2021.04-rc3. Tested and works well on Linksys E8450 (snand-1ddr) as well as Bananapi BPi-R64 (sdmmc-2ddr, emmc-2ddr). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: improve BPi-R64 supportDaniel Golle2021-03-052-6/+14
| | | | | | | | * allow MAC address from U-Boot env to be inhertied * allow eMMC installation to succeed also without recovery present on the SD Card. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r64: make sure eMMC installation runs only onceDaniel Golle2021-03-021-3/+3
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r64: fix eMMC installation menu labelDaniel Golle2021-03-011-1/+1
| | | | | | Change boot menu label for eMMC installation to tell what it does now. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: bpi-r64: simplify eMMC install procedureDaniel Golle2021-03-011-6/+10
| | | | | | | | Write everything needed for eMMC install into the gaps between partitions on SD card. In that way, installation to eMMC only needs the SD card, no additional files need to be loaded via TFTP any more. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: rework support for Bananapi BPi-R64 boardDaniel Golle2021-02-283-0/+578
| | | | | | | | | | | | | | Provide U-Boot variants for SD-card as well as eMMC boot, so we can generate whole-disk images for the device. While at it, rename 'mt7622' to 'mt7622-rfb1' to make it less confusing now that more boards are being added. Thanks to Frank Wunderlich (@frank-w) for making that nice SVG image explaining the MMC boot process[1] and for providing the necessary binary header blobs. [1]: https://github.com/frank-w/BPI-R64-ATF Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for Linksys E8450Daniel Golle2021-02-2812-157/+681
| | | | | | | | | | | | | | | | | | | | | Build U-Boot for the Linksys E8450 in order to have support for UBI. The loader has a default environment with scripts handling the reset button as well as fall-back to recovery firmware. If the loader comes up without a valid environment found in UBI, it will automatically make sure UBI is formatted and create a new environment and proceed to load recovery firmware (either from UBI or via TFTP if recovery is corrupted or unavailable). If the button is held down during power-on, the yellow status LED turns on and the bootloader environment is reset to factory defaults. If the button is released at this point, the recovery firmware (if existing) is loaded from UBI and booted. If the button is continously held down even beyond the point that the yellow LED turned on, the loader will try to load the recovery firmware via TFTP from server 192.168.1.254, write it to UBI and boot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: update uboot to latest patchset provided by MTKJohn Crispin2020-11-046-715/+5
| | | | | | MTK sent us their latest version of the staging uboot. Lets merge the patches. Signed-off-by: John Crispin <john@phrozen.org>
* uboot-mediatek: update to latest versionJohn Crispin2020-09-013-1080/+3
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* uboot-mediatek: resync patches with upstreamDavid Woodhouse2020-08-124-23/+49
| | | | | | | Now that my patches have been merged into upstream U-Boot, resync the cosmetic changes and the commit IDs from the final commits. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: add U-Boot build for UniElec U7623David Woodhouse2020-07-263-0/+378
| | | | | | | | | Patches submitted upstream at https://patchwork.ozlabs.org/project/uboot/list/?series=189178 Tested on Banana Pi R2 and U7623-06. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* uboot-mediatek: remove swig requirementRosen Penev2020-07-231-0/+25
| | | | | | | | | Ever since this package was introduced, the SDK for mt7629 failed to build as it started failing on this package. Fixed by porting Hauke's similar patch for uboot-sunxi to uboot-mediatek. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mediatek: add SD card image creation for Banana Pi R2David Woodhouse2020-07-081-1/+2
| | | | | | Based on work by Alexey Loukianov <lx2@lexa2.ru> and others. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: use U-Boot FAT environment support for Banana Pi R2David Woodhouse2020-07-082-2/+93
| | | | | | | | | | Instead of building in a default environment which loads our environment from the FAT partition.... just ask U-Boot to do it. Submitted upstream at https://patchwork.ozlabs.org/project/uboot/list/?series=184688 Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: fix U-Boot pinctrl setup for mt7623 eMMCDavid Woodhouse2020-07-081-0/+236
| | | | | | | | | | The U-Boot pinctrl driver for mt7623 was incomplete and didn't handle the settings required for eMMC to work. Submitted upstream at https://patchwork.ozlabs.org/project/uboot/list/?series=184529 Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: add mt7623 u-boot build for Banana Pi R2David Woodhouse2020-07-081-0/+14
| | | | | | | For building full SD/eMMC images for Banana Pi R2 we'll want a u-boot image built for that platform. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: add ubootJohn Crispin2020-05-044-0/+9835
Signed-off-by: John Crispin <john@phrozen.org>