Where are these commands present? There is a custom U-boot that has these commands?
I have no clue where I can add these commands. Anybody has any idea?
These are commands from sdk,not upstreamed in u-boot…why do you need these commands? There is a bootmenu,so you do not need mtk specific implementation.load is maybe combination of load+bootm/go. mtkboardboot sounds similar and upgrade will only work with sdk image…openwrt has different structure and has its own upgrade mechanism.
So why do you need these commands? If you really miss any feature from it it should be added to mainline commands in a generic way.
I’ve checked the U-boot OpenWRT source and I found all these commands in boards/mediatek/common.
Anyway there are not portable to newer versions of U-boot mainly because ubi.c moved a lot of functions to static, functions used by one of the helpers.
As you says and also as I’ve noticed I don’t need them.
@hackpascal In the case of MT7981B/MT7986A, when there is no switch, the three storage media SPI-NOR, SPI-NAND, and SD have systems, and can the default access to the system be from the SD card? When there is no SD card or the SD card system is damaged, can the system be accessed from SPI-NOR or SPI-NAND?
Booting from SD is a fallback if booting from SPI-NAND fails.
For other boot devices, you must change the bootstrap pins to the corresponding combinations.
does anyone know How to configure mt7981, uboot, openwrt, dts, default spi nand to boot into the system, and mount SD card as an external simple storage device? Thank you
Hi @hackpascal, it looks like current atf code misses some files (wdt,mmc,spi,efuse)
Or has build been changed? I see menuconfig support compared to my old tree.
after i got the missing efuse error also on my default atf-branch i had to delete ./build/mt7988/release/ manually (make clean does not clean it up) to be able to compile my old branch again, but i got a strange error
LD build/mt7988/release/bl2/bl2.elf
/bin/sh: 1: -g: not found
when compiling the new tree, it also seems like the MAKE_BUILD_STRINGS was dropped from make_helpers/build_macros.mk which i had used to print the bootdevice in bl2/fip
looks like the error above was caused by my comit readding the MAKE_BUILD_STRINGS, to where was this moved?
I got this working passing BUILD_STRING as parameter. See mtk-atf-2025 branch. This is also the way openwrt does it to extend the version string
@hackpascal do you miss drivers (mmc,…) above in current atf? I cherry-picked them into my new branch and this way it works,but have to remove build dir completely when using the older atf before (make clean is not enough,so there is something missing too).
regarding old ATF and poweroff…the older ATF shows this, but does not do reboot on poweroff
[ 82.860016] reboot: Power down
PANIC at PC : 0x00000000430052a4
Hello, i built an openbsd7.6 image with u-boot patch, like descrition above.
But the .dtb files are still for raspberry pi, can it be fixed, by adding the openwrt boot .dtb files?
Can anybody share the .config for the openwrt u-boot ? Because it must look very similar to the openbsd u-boot above : config.txt, or a diff?
The problem is, that the banana RPI R3 will not boot with mine. Something important must be left in the BOOT partition, you can reproduce mine, by following the description above.
Anybody interested? or have an idea to fix the boot?
I would make an extern topic, but this issue is also very common.
Openwrt does not use BOOT gpt partition like i do (and sdk did)…they flash kernel fit/itb (including dtbs) to specific offset or ubi partition.
Not sure openbsd has all necessary drivers as imho they do not use linux kernel
Is there any output on uart? Without uart it is nearly impossible to find error…
edit: tried without the additional patches (mmc,spi,efuse) and still seem to work…looks like my error was only because of unclean build-directory, dropped the commits from the tree to avoid confusion
Is there any possible solution to use a general atf .bin to use on both 4GB and 8GB versions of the R4?
Seems like the R4 gives nvme and nand errors when booting 8bg board with 4gb atf build.
To reduce the number of pre-build images, it would be nice if both versions can boot from 1 atf .bin, and once booted, the 8gb build can be written to mmc/nand of the 8gb board.