aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek
Commit message (Collapse)AuthorAgeFilesLines
* uboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlayDaniel Golle2023-06-092-20/+40
| | | | | | | | | Update bootloader environment for BPi-R3 and BPi-R64 to adapt to new device tree overlay mechanism now that support for multiple device tree overlays has been added. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit ec50d2d366fecb6f4bac2ae9d5cfa4aba9cf7bbc)
* uboot-mediatek: add Qihoo 360T7 supportChukun Pan2023-05-293-0/+476
| | | | | | | | | 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> (cherry picked from commit c51eb177308835f811ae43b17dde0ea962ed1df1) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7981: add reserved memory to support pstoreAlexander Couzens2023-05-291-0/+38
| | | | | | | | | | Add reserved memory for pstore/ramoops to device tree used by Linux as well as U-Boot. Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 3eb354f999a3687f9ae547899b0f5ec2b10185ab) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fixes build when nmbm enabledChukun Pan2023-05-021-3/+3
| | | | | | | | | | The image_header_t typedef has been removed from uboot v2023.01 [1], replaced with legacy struct. [1] https://github.com/u-boot/u-boot/commit/f3543e69442ca393e52df253d9c5d45bc189d471 Fixes: 3d5c542 ("uboot-mediatek: update to U-Boot 2023.01") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: fix CONFIG_TEXT_BASE variableChukun Pan2023-05-027-12/+12
| | | | | | | | | | CONFIG_SYS_TEXT_BASE has been renamed to CONFIG_TEXT_BASE in uboot v2023.01 [1], fixes all this variable. [1] https://github.com/u-boot/u-boot/commit/984639039f4cfe32ec2cc531d6ace05326ac49eb Fixes: 3d5c5427 ("uboot-mediatek: update to U-Boot 2023.01") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: remove duplicate config in mt7986Chukun Pan2023-05-022-14/+5
| | | | | | Some config was written twice by mistake, fix it. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: add TP-Link TL-XDR4288 and TL-XDR608xDaniel Golle2023-04-222-0/+968
| | | | | | | | | | | | | | | | TP-Link TL-XDR608x comes with locked vendor loader. Add U-Boot build for replacement loader for both TL-XDR6086 and TL-XDR6088. The only difference at U-Boot level is the different filename requested via TFTP, matching the corresponding OpenWrt build artifacts for each device. The TP-Link TL-XDR4288 has the same hardware as the TP-Link TL-XDR6088 except for the wireless part. Also create a uboot for the TP-Link TL-XDR4288. Signed-off-by: Daniel Golle <daniel@makrotopia.org> [rebase to uboot 23.04, correct led and button] Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: fix factory/reset buttonDaniel Golle2023-04-2013-22/+110
| | | | | | | | | | | U-Boot commit ea6fdc13595 ("dm: button: add support for linux_code in button-gpio.c driver") makes it mandatory to specify linux,code for all buttons. As that broke handling of the reset button in U-Boot with the update to U-Boot 2023.04, add linux,code for all butons. Reported-by: @DragonBluep Fixes: 50f7c5af4a ("uboot-mediatek: update to v2023.04") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* 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-1241-298/+427
| | | | | | | | | | | | | | | | | | | | | | | | 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: mark all packages as hiddenFelix Fietkau2023-03-041-0/+1
| | | | | | | They are enabled by selecting devices. Fixes build errors when enabling extra devices without creating a new config from scratch. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* 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-1370-12398/+118
| | | | | | | | 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-292-0/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1868-8705/+73
| | | | | | | | | 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>
* uboot-mediatek: fix extraneous right parensPetr Štetiar2022-09-131-1/+1
| | | | | | | | Fixes following warning: Makefile:310: extraneous text after 'ifeq' directive Signed-off-by: Petr Štetiar <ynezz@true.cz>
* 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-302-3/+1428
| | | | | | | | | | | | | | | 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-2836-6/+12173
| | | | | | Import pending patches to support the upcoming Filogic platforms. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add support for compressed BL3/FIP imageDaniel Golle2022-08-281-2/+7
| | | | | | | MediaTek's ARM Trusted Firmware v2.7+ allows the images inside a FIP structure to be compressed. Make use of that for boards with NOR flash. 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: mt7621: use silent stage1 by defaultDaniel Golle2022-08-111-1/+15
| | | | | | | Use faster and silent MT7621 stage1 blob by default unless CONFIG_DEBUG is selected. 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-1332-325/+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-mediatek: mark mt7620 build as @BROKENDaniel Golle2022-07-121-0/+2
| | | | | | Turns out also mt7620 build has a more hidden dependency on binman. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: mark MT7621 variants as @BROKENDaniel Golle2022-07-121-0/+2
| | | | | | | | | | Building U-Boot for the MT7621 SoC requires binman, a Python-based host tool to generate images. For now, binman cannot work inside the OpenWrt build system because it requires swig, so mark the MT7621 boards as borken to fix the ramips/mt7621 build until someone with knowledge about Python and swig fixes the underlaying issue. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-ramips: add support for MT7621, merge into uboot-mediatekDaniel Golle2022-07-1128-6/+7660
| | | | | | | | | | | | * 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-1119-162/+207
| | | | | | | | | | | 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: update UniFi 6 LR board nameDaniel Golle2022-06-161-1/+1
| | | | | | | Select matching U-Boot for both v1 and v2 variants. Fixes: 15a02471bb ("mediatek: new target mt7622-ubnt-unifi-6-lr-v1") 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-2321-111/+62
| | | | | | | 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-236-70/+273
| | | | | | | 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>
* u-boot.mk: fix pkg-config usageAndre Heider2021-10-241-2/+0
| | | | | | | | Using Host/Exports doesn't work as intended, explicitly add the required vars so that u-boot finds the required libraries when building its tools. Signed-off-by: Andre Heider <a.heider@gmail.com>
* uboot-mediatek: update to 2021.10Daniel Golle2021-10-0432-610/+77
| | | | | | | | | | | 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>