lsdk20.04 cross compile setup

cancel
Showing results for 
Search instead for 
Did you mean: 

lsdk20.04 cross compile setup

268 Views
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)
3 Replies

169 Views
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

169 Views
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

169 Views
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