I'm trying to compile u-boot-2017.05 (because it can boot a 32-bit ARM board. It is an out-of-tree u-boot build that can execute the ubldr to boot FreeBSD. I found it here :
It has been suggested to me by the U-Boot Xen maintainers. Infact one of them said :
Yes, it can boot a 32-bit ARM board. I'm not a FreeBSD person, but I've helped a FreeBSD user booting a 32-bit ARM box with u-boot (GoFlexHome Marvell Kirkwood 6281). The u-boot version was 2017.05. I used an out-of-tree u-boot build. This u-boot executed the ubldr to boot FreeBSD. Please see here :
So. I tried to compile it directly on my ARM Chromebook,but it failed. And it also fails if compiled with "ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-" on my Ubuntu 23.04 x86_64 workstation :
/Chromebook/freebsd-xen/domU-freebsd/bootloaders/u-boot-2017.05# make
snow_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
/Chromebook/freebsd-xen/domU-freebsd/bootloaders/u-boot-2017.05# make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CC lib/asm-offsets.s
gcc: error: unrecognized -march target: armv5
gcc: note: valid arguments are: armv4 armv4t armv5t armv5te armv5tej
armv6 armv6j armv6k armv6z armv6kz armv6zk armv6t2 armv6-m armv6s-m
armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a armv8.1-a
armv8.2-a armv8.3-a armv8.4-a
armv8.5-a armv8.6-a armv8-m.base armv8-m.main armv8-r armv8.1-m.main
armv9-a iwmmxt iwmmxt2 native; did you mean ‘armv4’?
gcc: error: missing argument to ‘-march=’
make[1]: *** [Kbuild:44: lib/asm-offsets.s] Errore 1
make: *** [Makefile:1287: prepare0] Errore 2
What should I do to compile it succesfully ?