lsdk20.04 cross compile setup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lsdk20.04 cross compile setup

3,910 Views
kai_wu
Contributor III

Hi,

I am using lsdk20.04 for my development. The userland I selected is Ubuntu.    

From the lsdk20.04 user guide, section 3.2 components I found following information:

Toolchain: gcc: Ubuntu/Linaro 7.3.0-16ubuntu3~18.04, glibc-2.27, binutils-2.30-0, gdb-8.1

I started my kernel with the ubuntu root file system(rootfs_lsdk2004_ubuntu_main_arm64.tgz)I checked the versions of following components:

Toolchain(ubuntu userland)

  • gcc: Ubuntu/Linaro 7.5.0-3ubuntu1~18.04 (not 7.3.0)
  • binutils: GNU Binutils for Ubuntu 2.30
  • glibc: glibc-2.27

In Yocto sdk I can source an environment file

environment-setup-aarch64-fsl-linux

But If I want to do cross-compilation for ls1012ardb on my ubuntu 18.04 host machine. How could I set up the cross-compilation environment(set up the toolchain) for this case(ubuntu user land)?   

Thank you!

Labels (2)
5 Replies

1,906 Views
nobitashizuka227
Contributor I

Hello there.

I unable to find the toolchain at link fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-3.1.sh - Google Drive

Please help.

Best regards,
Pratik

0 Kudos
Reply

3,485 Views
pk16
Contributor I

Hello,

Could you do the cross-compilation in Ubuntu main? I mean could you setup cross-compilation environment? If yes could you provide the details.

Thank you.

0 Kudos
Reply

3,811 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could use Toolchain from Yocto 3.0 release, I uploaded it fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-3.0.sh - Google Drive .

$chmod 777 fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-3.0.sh

$ ./fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-3.0.sh

$ source /opt/fsl-qoriq/3.0/environment-setup-aarch64-fsl-linux

$ ${CC} hello.c -o hello

3,811 Views
kai_wu
Contributor III

Hi Yiping,

Thank you for the quick reply.

Is it ok to cross-build packages for the ubuntu userland using the Yocto toolchain?

If I move to yocto sdk(3.1) and use yocto based tiny userland, could I get the Yocoto toolchain 3.1 from you? because I do not know where to get it. 

I checked Index of /releases/yocto/yocto-3.1/toolchain/x86_64/ , didn't find the proper one for ls1012a.    

Best regards,

Kai Wu

0 Kudos
Reply

3,811 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kai Wu,

I uploaded Yocto 3.1 Toolchain to fsl-qoriq-glibc-x86_64-fsl-toolchain-aarch64-toolchain-3.1.sh - Google Drive , please download it.

Thanks,

Yiping