On 9/29/22 05:45, Majid B. wrote:
Hello,

I've tried to build U-Boot 2022.07 with the following series of
instructions:

export CROSS_COMPILE=mipsel-linux-gnu-
make mrproper
make O=build maltael_defconfig
make V=1 O=build -j$(nproc)

Unfortunately, I seem to always run into this error:

In file included from arch/mips/lib/cache.c:10:
./arch/mips/include/asm/cacheops.h: In function ‘flush_cache’:
./arch/mips/include/asm/cacheops.h:18:9: error: invalid argument to
built-in function
    18 |         __builtin_mips_cache(op, addr);
       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:257: arch/mips/lib/cache.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1906: arch/mips/lib] Error 2
make: *** Waiting for unfinished jobs....

What could I be doing wrong?

what toolchain you are using? Is the toolchain bin path set in your PATH variable? If not, you need to include the absolute path to the toolchain in your CROSS_COMPILE variable.

So either do (my example uses the kernel.org toolchains):

export PATH=/opt/gcc-11.1.0-nolibc/mips-linux/bin:$PATH
export CROSS_COMPILE=mips-linux-

or

export CROSS_COMPILE=/opt/gcc-11.1.0-nolibc/mips-linux/bin/mips-linux-


To rule out toolchain issues, you could always try the kernel.org toolchains, with which all U-Boot configs are built in CI. You could use U-Boot's buildman tool to download those toolchains for each supported architecture. E.g.

./tools/buildman/buildman --fetch-arch mips
./tools/buildman/buildman --list-tool-chains



I'd really appreciate any help I can get on this.
Thank you in advance!

Regards,
Majid B.

--
- Daniel

Reply via email to