Solved When I try to compile any u-boot-* port they freezes on "checking whether compiler driver understands Ada and is recent enough..."

Hello.

For example I would like to compile the u-boot port for the firefly rk3399,but it freezes on the message that you can read on the title :

Code:
marietto# cd /usr/ports/sysutils/u-boot-firefly-rk3399
marietto# make
===>  License GPLv2 accepted by the user
===>   u-boot-firefly-rk3399-2025.04 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by u-boot-firefly-rk3399-2025.04 for building
===>  Extracting for u-boot-firefly-rk3399-2025.04
=> SHA256 Checksum OK for u-boot/u-boot-2025.04.tar.bz2.
===>  Patching for u-boot-firefly-rk3399-2025.04
===>   u-boot-firefly-rk3399-2025.04 depends on executable: gsed - found
===>   u-boot-firefly-rk3399-2025.04 depends on executable: swig - found
===>   u-boot-firefly-rk3399-2025.04 depends on package: dtc>=1.4.1 - found
===>   u-boot-firefly-rk3399-2025.04 depends on executable: mkimage - found
===>   u-boot-firefly-rk3399-2025.04 depends on package: py311-setuptools-pkg>=0 - found
===>   u-boot-firefly-rk3399-2025.04 depends on executable: aarch64-none-elf-gcc - not found
===>   aarch64-none-elf-gcc-11.3.0_3 depends on executable: aarch64-none-elf-as - not found
===>   aarch64-none-elf-binutils-2.44,1 depends on file: /usr/local/lib/libgmp.so - found
===>   aarch64-none-elf-binutils-2.44,1 depends on file: /usr/local/lib/libmpfr.so - found
===>   aarch64-none-elf-binutils-2.44,1 depends on package: gmake>=4.4.1 - found
===>   aarch64-none-elf-binutils-2.44,1 depends on package: pkgconf>=1.3.0_1 - found
===>   aarch64-none-elf-binutils-2.44,1 depends on file: /usr/local/bin/makeinfo - found
===>   aarch64-none-elf-binutils-2.44,1 depends on package: perl5>=5.40.r<5.41 - found
===>   aarch64-none-elf-binutils-2.44,1 depends on shared library: libzstd.so - found (/usr/local/lib/libzstd.so)
===>  Configuring for aarch64-none-elf-binutils-2.44,1
configure: loading site script /usr/ports/Templates/config.site
checking build system type... x86_64-portbld-freebsd14.3
checking host system type... x86_64-portbld-freebsd14.3
checking target system type... aarch64-none-elf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for gawk... (cached) /usr/bin/awk
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for cc option to accept ISO C99... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada and is recent enough... ^C

it stucks there forever and an additional message sounds like "failed to reclaim memory"...
 
Well if you compiled the last u-boot port like I showed I use a command to install from packages all required dependencies to build a port.
make build-depends-list | cut -c 12- | xargs pkg install -A -y
This downloads packages and allows you to quickly compile u-boot.

The problem becomes which branch of packages you use. QUARTERLY or LATEST
Maybe something changed in u-boot and it needs a newer port and you are using QUARTERLY.
That could be a problem.
You could try switching to LATEST for packages. Then upgrade your packages. Run above command again.

Make sure you are using make clean on failed builds.

ada is part of the toochain required to compile u-boot. Something is wrong with the version.
 
I don't know which FireFly Board you have but for Firefly Station P1 I had to use "roc-pc-rk3399" defconfig and that does not work perfect.
In fact I built my first defconfig for mine to chance some settings. It did not help any. Waste of time.
roc-pc-pro-rk3399
The roc-pc-pro added 2230 M.2 NVMe over the regular roc-pc-rk3399
 
I don't know which FireFly Board you have but for Firefly Station P1 I had to use "roc-pc-rk3399" defconfig and that does not work perfect.
In fact I built my first defconfig for mine to chance some settings. It did not help any. Waste of time.
roc-pc-pro-rk3399
The roc-pc-pro added 2230 M.2 NVMe over the regular roc-pc-rk3399

I have LATEST. The error happens with LATEST. Anyway the command "make build-depends-list | cut -c 12- | xargs pkg install -A -y" fixed the error. Very thanks.

I have this board : https://libre.computer/products/roc-rk3399-pc/

I'm going to install these files :

Code:
marietto# cd ./work/stage/usr/local/share/u-boot/u-boot-firefly-rk3399/
marietto# ls
README        idbloader.img    u-boot.itb

to the sd card. The problem is that some days ago I've installed this image to the sd card :

FreeBSD-aarch64-13.0-CURRENT-Firefly-Station-P1-20210110.img

but the version of u-boot used is not able to boot FreeBSD (booting freezes on the u-boot console,showing some errors),so I suppose that's not the right board.

UPDATE :

After having installed the firefly-rk3399 idbloader.img and u-boot.itb to the sd card :

Code:
marietto# dd if=idbloader.img of=/dev/da7 oflag=direct seek=64
marietto# dd if=u-boot.itb of=/dev/da7 oflag=direct seek=16384

I get this scenario :


Screenshot_2025-09-28_16-15-13.png
 
I have LATEST. The error happens with LATEST. Anyway the command "make build-depends-list | cut -c 12- | xargs pkg install -A -y" fixed the error. Very thanks.

I have this board : https://libre.computer/products/roc-rk3399-pc/

I'm going to install these files :

Code:
marietto# cd ./work/stage/usr/local/share/u-boot/u-boot-firefly-rk3399/
marietto# ls
README        idbloader.img    u-boot.itb

to the sd card. The problem is that some days ago I've installed this image to the sd card :

FreeBSD-aarch64-13.0-CURRENT-Firefly-Station-P1-20210110.img

but the version of u-boot used is not able to boot FreeBSD (booting freezes on the u-boot console,showing some errors),so I suppose that's not the right board.

UPDATE :

After having installed the firefly-rk3399 idbloader.img and u-boot.itb to the sd card :

Code:
marietto# dd if=idbloader.img of=/dev/da7 oflag=direct seek=64
marietto# dd if=u-boot.itb of=/dev/da7 oflag=direct seek=16384

I get this scenario :


View attachment 23745

I'm on a Telegram channel called "Libre Computer" and the owner says :

"That is the standard UEFI loader. Firefly rk3399 is a different board. It is the standard UEFI loader. It says Libre Computer at the top. You have to use the boot switch. To use third party loaders"

In FreeBSD can we use "third party loaders" ? Which ones ?
 
On the libre computer,the maker of the board,"Renegade Elite ROC-RK3399-PC" there is an interesting post of an user that has been able to install NetBSD on the board :


at some point,he says :

Makes me super satisfied that NetBSD is working. This means that it wouldn’t be much of a jump to get something like FreeBSD working. And to be frank, I no longer wanted to use the Le Potato after I got tired of all the Linux stuff and wanted to move my skills/career more into a BSD world. But now that I can use NetBSD on this thing, I don’t have to give it away! The joy.

Good,I want to contact him.
 
Back
Top