User talk:Zulu Foxtrott/Rockpro64/Bootloader

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.

Trusted Firmware A does not build

Talk status
This discussion is still ongoing as of 2021-11-14.

When was the last time this was tested?

Trusted Firmware A does not build for me.

Using make PLAT=rk3399 fails with:

make[1]: Entering directory '/usr/src/trusted-firmware-a/plat/rockchip/rk3399/drivers/m0'
  LD      /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf
arm-none-eabi-gcc -o /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib -mfloat-abi=soft -Wl,--gc-sections -Wl,--build-id=none -Wl,-Map=/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.map -Wl,-T/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.ld /usr/src/trusted-firmware-a/build/rk3399/release/m0/dram.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/stopwatch.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/startup.o
make[1]: arm-none-eabi-gcc: No such file or directory

This can be worked around with make PLAT=rk3399 M0_CROSS_COMPILE=, but then it fails with:

make[1]: Entering directory '/usr/src/trusted-firmware-a/plat/rockchip/rk3399/drivers/m0'
  LD      /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf
gcc -o /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib -mfloat-abi=soft -Wl,--gc-sections -Wl,--build-id=none -Wl,-Map=/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.map -Wl,-T/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.ld /usr/src/trusted-firmware-a/build/rk3399/release/m0/dram.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/stopwatch.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/startup.o
gcc: error: unrecognized command-line option ‘-mthumb’
gcc: error: unrecognized command-line option ‘-mfloat-abi=soft’

So I edited plat/rockchip/rk3399/drivers/m0/Makefile to remove -mthumb and -mfloat-abi=soft from COMMON_FLAGS and then it fails with:

make[1]: Entering directory '/usr/src/trusted-firmware-a/plat/rockchip/rk3399/drivers/m0'
  LD      /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf
gcc -o /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf -g -mcpu=cortex-m0 -Wall -O3 -nostdlib -Wl,--gc-sections -Wl,--build-id=none -Wl,-Map=/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.map -Wl,-T/usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.ld /usr/src/trusted-firmware-a/build/rk3399/release/m0/dram.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/stopwatch.o /usr/src/trusted-firmware-a/build/rk3399/release/m0/startup.o
/usr/lib/gcc/aarch64-unknown-linux-gnu/11.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/src/trusted-firmware-a/build/rk3399/release/m0/rk3399m0.elf: can not set architecture: no error

Which I don't know how to troubleshoot. — The preceding unsigned comment was added by Chuso (talkcontribs) 2021-11-14