U-boot cannot build

Hello! I am at work so can’t provide too many details right now, but I’m trying to boot manjaro from SPI flash / nvme. I keep trying to build the rk3399 u-boot (The one that supports SPI/NVME boot) but the build keeps failing giving me this error:

  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:108: scripts/dtc/dtc] Error 1
make[2]: *** [scripts/Makefile.build:425: scripts/dtc] Error 2
make[1]: *** [Makefile:491: scripts] Error 2
make: *** [Makefile:461: __build_one_by_one] Error 2
 MAKE UBOOT IMAGE FAILED.

Any help?
Rockpi4b V1.72

use gcc9 instead of 10

1 Like

How would I do that? I’ve never messed with gcc before.

You can try this alternative way as mentioned in,
https://fw64.net/solution-for-multiple-definition-of-yylloc-error

The above method worked for me in banana-pi’s uboot code, should also work for rock pi. but in general, GCC9 doesnt seem to show these errors. You can download older gcc versions here

Yeah I saw that. Searched my system for that file and I couldn’t find it

gcc9 confirmed. Now to figure out how to install and run from NVME. I figured out how to install to eMMC, so I guess that’s one step down.