From: gianluca <gianlucarenzi@eurek.it>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: Barebox as first and second stage bootloader
Date: Fri, 28 Feb 2020 08:50:54 +0100 [thread overview]
Message-ID: <701628bd-3198-a670-a3e7-13f137a99d2d@eurek.it> (raw)
In-Reply-To: <8da838d3-ac20-adcb-74c0-e0f921c4a083@pengutronix.de>
On 02/27/2020 12:51 PM, Ahmad Fatoum wrote:
> 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
>
PLAT=stm32mp1
;-)
Now it compiles with the gcc version 7.3.1 20180622 (release)
[ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded
Processors 7-2018-q2-update).
Built build/stm32mp1/debug/tf-a-stm32mp157c-dk2.bin successfully
Generated build/stm32mp1/debug/tf-a-stm32mp157c-dk2.stm32
tools/stm32image/stm32image -s
./build/stm32mp1/debug/tf-a-stm32mp157c-dk2.bin -d
build/stm32mp1/debug/tf-a-stm32mp157c-dk2.stm32 -l 0x000000002ffc2500 -e
0x000000002ffd8000 -v 0
Image Type : ST Microelectronics STM32 V1.0
Image Size : 245128 bytes
Image Load : 0x2ffc2500
Entry Point : 0x2ffd8000
Checksum : 0x00ebe57e
Option : 0x00000001
Version : 0x00000000
> It's described in the TF-A platform documentation.
Frankly, the documentation in the github repo is quite messy. Anyway
thanks for your support.
> You can also check out the ptxdist rule for building it:
> https://www.mail-archive.com/ptxdist@pengutronix.de/msg15787.html
>
I will do ASAP. Thank you again.
Gianluca
--
Eurek s.r.l. |
Electronic Engineering | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377 | Fax: +39-(0)542-609212
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-02-28 7: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
2020-02-28 7:50 ` gianluca [this message]
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=701628bd-3198-a670-a3e7-13f137a99d2d@eurek.it \
--to=gianlucarenzi@eurek.it \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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