LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 03-19-2024, 03:46 AM   #1
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Rep: Reputation: 34
Slarm64-15.0 trusted-firmware-a-master aarch64-none-elf-gcc


Greetings Slarm64 community, I have been attempting to build the trusted-firmware-a-master from a default Slarm64-15.0 install, running on a Banana Pi M64.

Compile instruction can be found here ....
https://trustedfirmware-a.readthedoc...allwinner.html

When I attempt to compile the firmware using the instruction from the website, I get:

Code:
export BL31=$(pwd)/build/sun50i_a64/debug/bl31.bin
make PLAT=sun50i_a64 DEBUG=1 bl31

/bin/sh: line 1: aarch64-none-elf-gcc: command not found
The compile immediately produces the above error ...

All the online pre-packaged aarch64-none-elf-gcc compilers I have found for native Aarch64 systems, are all built from different glibc, so the Slarm64-15.0 system fails to use them successfully. So, now I am left with some question ....

First, what is the difference between the aarch64-slackware-linux-gcc and the aarch64-none-elf-gcc?

Second, Is there a workaround, so I can use the aarch64-slackware-linux-gcc which is already installed in the system rather than an aarch64-none-elf-gcc to compile the trusted-firmware-a-master?

Third, would building an aarch64-none-elf-gcc for slarm64-15.0 and Slackware-current Aarch64 be beneficial for Slackware Arm's & Aarch64's further development? ( Since the trusted-firmware-a-master used by u-boot for Arm / Aarch64 depends on an aarch64-none-elf-gcc compiler )

Fourth, do I need to compile my own aarch64-none-elf-gcc compiler from the gcc-11.2.0 source with ./configure --target=aarch64-none-elf?

Fifth, How would I go about compiling my own aarch64-none-elf-gcc compile if it is more complicated than just ./configure --target=aarch64-none-elf?

Anyway, I'm not sure if this is more of the whole cross-compiling nightmare of using an Arm32/Arm64 systems or not.

Plus: Why do some many build scripts from github assume I am cross-compiling from a x86_64 system?
 
Old 03-19-2024, 12:47 PM   #2
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
all this is already in images_build_kit, link 1, link 2

Last edited by sndwvs; 03-19-2024 at 12:53 PM.
 
Old 03-19-2024, 09:44 PM   #3
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Original Poster
Rep: Reputation: 34
Thank you for the information!

I downloaded the source and ...

Code:
# tar xvf images_build_kit-arm.tar.gz
There was no selection for the Banana Pi M64, so I selected the Pinebook, as they both use an Allwinner A64, and hoped the build script doesn't clean up it's mess, so I can use the bl31.bin in my own u-boot build - as I am currently just after the TF-A bl31.bin to compile into BPI-M64 uboot for Slarm64-15.0.

Code:
|info| added        configuration file environment.conf
|info| added        configuration file build-packages.conf
|info| added        configuration file pinebook.conf
|info| added        configuration file sun50iw1.conf
|info| download     gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf
|info| extract      gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf
|info| download     u-boot
|err | details      /opt/images_build_kit-arm/build/source/build.log
The build.log ended with the following lines ...

Code:
|----------- delimiter ----------- "download" "u-boot" -----------|
Cloning into '/opt/images_build_kit-arm/build/source/u-boot'...
fatal: unable to access 'https://gitlab.denx.de/u-boot/u-boot.git/': SSL certificate problem: unable to get local issuer certificate
So, it looks like there is a problem with my SSL certificates, I'll have to investigate it.
 
Old 03-20-2024, 11:57 AM   #4
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
Quote:
Originally Posted by Stragonian View Post
Code:
|----------- delimiter ----------- "download" "u-boot" -----------|
Cloning into '/opt/images_build_kit-arm/build/source/u-boot'...
fatal: unable to access 'https://gitlab.denx.de/u-boot/u-boot.git/': SSL certificate problem: unable to get local issuer certificate
So, it looks like there is a problem with my SSL certificates, I'll have to investigate it.
this problem is described.
solution:
Code:
git config --global http.sslVerify false

Last edited by sndwvs; 03-20-2024 at 12:01 PM.
 
1 members found this post helpful.
Old 03-22-2024, 01:41 AM   #5
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Original Poster
Rep: Reputation: 34
Ok, Thank you for the link, I followed solution 114 of the link, and it worked.

Code:
mkdir ~/certs
curl https://curl.haxx.se/ca/cacert.pem -o ~/certs/cacert.pem

touch .gitconfig

added the lines below to .gitconfig

[http]
sslCAinfo = /<path>/certs/cacert.pem
The images_build_kit-arm got this far into the build.
Code:
|info| added        configuration file environment.conf
|info| added        configuration file build-packages.conf
|info| added        configuration file pinebook.conf
|info| added        configuration file sun50iw1.conf
|info| download     gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf
|info| extract      gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf
|info| download     u-boot
|info| download     arm-trusted-firmware
|info| download     linux-legacy
|info| download     linux-firmware
|info| start        build slarm64 ARCH aarch64 images: core server
|info| clear        boot tools
|info| compiling    arm-trusted-firmware master:tag:v2.9
|info| patching     succeeded: allwinner-a10-spi-driver.patch
|info| patching     succeeded: allwinner-disable-de2-to-improve-edid-detection.patch
|info| patching     succeeded: allwinner-enable-autoboot-keyed.patch
|info| patching     succeeded: allwinner-enable-r_pio-gpio-access-h3-h5.patch
|info| patching     succeeded: allwinner-fdt-setprop-fix-unaligned-access.patch
|info| patching     succeeded: allwinner-h3-enable-power-led.patch
|info| patching     succeeded: allwinner-h3-fix-pll1-setup-to-never-use-dividers.patch
|info| patching     succeeded: allwinner-h3-set-safe-axi_apb-clock-dividers.patch
|info| patching     succeeded: allwinner-h616-GPU-enable-hack.patch
|info| patching     succeeded: allwinner-h616-THS-workaround.patch
|info| patching     succeeded: allwinner-sun8i-set-machid.patch
|warn| patching     not succeeded: do-not-relocate-initrd.patch
|info| patching     succeeded: enable-old-kernel-compat.patch
|info| patching     succeeded: pinebook-add-rare-panel-support.patch
|info| patching     succeeded: pinebook-analog-audio-jack-fix.patch
|info| compiling    u-boot 2023.10
|info| compiler     gcc 11.2.0
|err | details      /opt/images_build_kit-arm/build/source/build.log
Which is totally fine, because I am not running a pinebook, but rather I just needed the bl31.bin TF-A for the Allwinner A64, to use on a Banaba Pi M64.
After the compiler crash, I ...
Code:
export BL31=/opt/images_build_kit-arm/build/source/arm-trusted-firmware/build/sun50i_a64/release/bl31.bin
cd /opt/images_build_kit-arm/build/source/u-boot
make mrproper (to clean up the pinebook uboot build)
make bananapi_m64_defconfig
make menuconfig (set to boot from ext4 environment - so I don't need a fat partition)
	> Environment >
		[*] Environment is in a EXT4 filesystem
		(mmc) Name of the block device for the environment
		(:auto) Device and partition for where to store the environemt in EXT4
		(/boot/uboot.env) Name of the EXT4 file to use for the environment
make all
...
crash
The custom bpi-m64 uboot compile in images_build_kit-arm crashed. So I copied the bl31.bin into the BPI-Mainline-uboot-master u-boot-2022.07, then repeated the same steps above, but changed the export BL to the BPI-Mainline-uboot-master u-boot-2022.07 directory, and the compile worked.
Code:
cd /opt/BPI-Mainline-uboot-master/u-boot-2022.07
cp /opt/images_build_kit-arm/build/source/arm-trusted-firmware/build/sun50i_a64/release/bl31.bin ./
export BL31=`pwd`/bl31.bin
make mrproper ( just for good measure )
make bananapi_m64_defconfig
make menuconfig (set to boot from ext4 environment - so I don't need a fat partition)
	> Environment >
		[*] Environment is in a EXT4 filesystem
		(mmc) Name of the block device for the environment
		(:auto) Device and partition for where to store the environemt in EXT4
		(/boot/uboot.env) Name of the EXT4 file to use for the environment
make all
... 
u-boot-sunxi-with-spl.bin finished successfully
I still need to test the u-boot, and I have a lot more to do before I'm finished, but it's good to get this far. Thank You!

Last edited by Stragonian; 03-23-2024 at 11:55 PM.
 
  


Reply

Tags
compiling, firmware, gcc, slarm64, toolchain



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slarm64-15.0 trusted-firmware-a-master aarch64-none-elf-gcc Stragonian Slackware - ARM 12 03-19-2024 09:27 PM
[SOLVED] slarm64 (aarch64 unofficial slackware) sndwvs Slackware - ARM 347 12-15-2021 01:45 PM
[SOLVED] Station M1(RK3328)/P1(RK3399) (slarm64, aarch64) sndwvs Slackware - ARM 10 12-07-2021 09:34 AM
How to grep *.info;mail.none;authpriv.none;cron.none; in /etc/syslog.conf sharadchhetri Linux - Server 9 01-06-2012 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration