From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: gianluca <gianlucarenzi@eurek.it>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Barebox as first and second stage bootloader
Date: Thu, 27 Feb 2020 12:51:50 +0100 [thread overview]
Message-ID: <8da838d3-ac20-adcb-74c0-e0f921c4a083@pengutronix.de> (raw)
In-Reply-To: <2b5d2afe-c71e-34b9-efa5-57aaa5f28445@eurek.it>
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@pengutronix.de/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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-02-27 11:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 11:57 gianluca
2020-02-26 14:28 ` Ahmad Fatoum
2020-02-26 14:46 ` gianluca
2020-02-26 15:08 ` Ahmad Fatoum
2020-02-26 15:30 ` gianluca
2020-02-26 15:46 ` Ahmad Fatoum
[not found] ` <2b5d2afe-c71e-34b9-efa5-57aaa5f28445@eurek.it>
2020-02-27 11:51 ` Ahmad Fatoum [this message]
2020-02-28 7:50 ` gianluca
2020-02-28 8:28 ` gianluca
2020-03-03 6:58 ` Ahmad Fatoum
[not found] ` <fb81fdd3-b674-ce0b-e472-ec8e606e4131@eurek.it>
2020-03-03 7:03 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8da838d3-ac20-adcb-74c0-e0f921c4a083@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=gianlucarenzi@eurek.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox