Re: Barebox as first and second stage bootloader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

please keep the barebox mailing list in CC.

On 2/27/20 12:44 PM, gianluca wrote:
>> ST's TF-A fork does. Upstream TF-A doesn't. The Programmer software uses vendor TF-A.
>>
> 
> I've found the forked ST's TF-A repo:
> 
> https://github.com/STMicroelectronics/arm-trusted-firmware
> 
> is it right?

Yes. I have only tried upstream TF-A though.

> I tried to compile for STM32MP1 but it gives me a lot of issues regarding the compiler toolchain.
> 
> I have used:
> 
>> Using built-in specs.
>> COLLECT_GCC=arm-none-eabi-gcc
>> COLLECT_LTO_WRAPPER=/home/gianluca/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/lto-wrapper
>> Target: arm-none-eabi
>> Configured with: /tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native --libexecdir=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/lib --infodir=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap
>> --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/install-native/arm-none-eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-gmp=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/build-native/host-libs/usr --with-mpfr=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/build-native/host-libs/usr --with-mpc=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/build-native/host-libs/usr --with-isl=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/build-native/host-libs/usr --with-libelf=/tmp/jenkins/jenkins-GCC-7-build_toolchain_docker-775_20180622_1529687456/build-native/host-libs/usr
>> --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 7-2018-q2-update' --with-multilib-list=rmprofile
>> Thread model: single
>> gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded Processors 7-2018-q2-update)
> 
> but when trying compiling it gives me this error:
> 
>> STM32MP_EMMC=1 CROSS_COMPILE=arm-none-eabi- make PLAT=stm32mp1
>>   CC      lib/libfdt/fdt.c
>> arm-none-eabi-gcc: error: unrecognized command line option '-mgeneral-regs-only'
>> arm-none-eabi-gcc: error: unrecognized command line option '-mstrict-align'; did you mean '-Wstrict-aliasing'?
>> lib/libfdt/libfdt.mk:19: recipe for target 'build/stm32mp1/release/libfdt/fdt.o' failed
>> make: *** [build/stm32mp1/release/libfdt/fdt.o] Error 1
> 
> What compiler are you using to compile TF-A???

OSELAS.Toolchain-2019.09.1

But I think you are calling it with the wrong parameters, you need:

make ARCH=aarch32 ARM_ARCH_MAJOR=7 AARCH32_SP=sp_min DEBUG=1 STM32MP_EMMC=1 \
        DTB_FILE_NAME=stm32mp157c-dk2.dtb \
        CROSS_COMPILE=${CROSS_COMPILE} \
        PLAT=stm32mp

It's described in the TF-A platform documentation.
You can also check out the ptxdist rule for building it:
https://www.mail-archive.com/ptxdist@xxxxxxxxxxxxxx/msg15787.html

Cheers,
Ahmad
                                                                        
 
> Regards,
> Gianluca


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux