Hello,
On Wed, 19 Nov 2025, Michael Tokarev wrote:
Almost an year ago I submitted a few patches for
u-boot-sam460ex code so it can be built by a
current gcc:
https://lists.nongnu.org/archive/html/qemu-devel/2025-01/msg00767.html
Here's another try. Some of the old issues are
now gone, some remains, and some new emerged.
Thanks but maybe try upstream at https://acube-systems.biz/ as they are
still maintaining this U-Boot version and I don't want to diverge too much
from it so it's easier to update it when a new version comes from
upstream. (There's already a version newer than the one we have in QEMU
but that did not work with the emulation for some reason and I did not
have time to find out why so went with the last version that works as that
already has the USB fixes we needed and newer version does not have
anything we need yet but maybe in the future we'll want to update
further.)
The below set allows me to build u-boot-sam460ex
code with gcc-15.
Some bugs are rather harsh and has been there for
a long time (like multiple definition of fbi symbol -
the file has been moved to a different dir, but the
prob remains - it is really a bad code).
Some are harsh but new (the reuse of `failed' variable -
any compiler, even ancient gcc4, should've catched it).
And some are due to too old code (supporting only gcc4).
The code may be bad and also based on an old U-Boot version that did not
have support for newer compilers but apparently it works on real boards
which we try to emulate so I'd like to keep the firmware close to that one
including bugs so it works the same as the real machine.
For things fixed in newer U-Boot versions it may be better to cherry-pick
from there and for things that broke because of -Werror settings in Debian
different from gcc defaults it makes sense to carry patches for that in
Debian or merge upstream and not just in QEMU.
Regards,
BALATON Zoltan