Linux Device Driver Programming Lecture 2: Cross compiler and tool-chain download

  • Post author:
  • Post category:Blog

 

Cross compiler and tool-chain download

 

 

Cross Compiler and Toolchain Download Guide

Our next task is cross compiler and toolchain download. To cross-compile Linux kernel, Linux application, and kernel modules to ARM Cortex Ax architecture, we need a cross compiler.

Because the SOC which is there on our beagle bone black hardware is AM335x, which is from Texas instruments, this SOC is based on the ARM Cortex A8 processor of ARMv7 architecture. That’s a reason why we need to have the cross compiler because we need to cross-compile all our Linux source code, the application, and the kernel modules.

We are going to download cross compiler from linaro.org.

You have to just head over to your browser and just type in the Google linaro toolchain, and follow this link linaro.org > downloads as shown in Figure 1.

  1. Open your web browser and search for “Linaro Toolchain” on Google.
  2. Navigate to the official Linaro website by clicking on the link labeled “linaro.org > downloads” as shown in Figure 1.
Figure 1. Downloading linaro toolchain
Figure 1. Downloading linaro toolchain

 

Refer to this section of Linaro’s GNU and LLVM Toolchains as in Figure 2. 

Figure 2. Linaro’s GNU and LLVM Toolchains page
Figure 2. Linaro’s GNU and LLVM Toolchains page

 

Just click on GNU Toolchain Integration Builds.

 

Cross compiler and tool-chain download
Figure 4. Latest Linaro releases page

 

Click on the latest stable linaro release. It will take you to cross-toolchain packages for a different architecture as shown in Figure 5. For armhf architecture, click arm-linux-gnueabihf directory.

Cross compiler and tool-chain download
Figure 5. Cross-toolchain packages for different architectures.

 

Downloading the Appropriate Version

  1. Depending on your machine’s architecture, follow these guidelines:
    • If your machine is 32-bit or you are using a 32-bit OS, download the version named “i686_arm-linux-gnueabihf.tar.xz.”
    • If you are using a 64-bit machine or a 64-bit OS, download the version named “x86_64_arm-linux-gnueabihf.tar.xz.” For 64-bit systems, the Linaro toolchain is available, as shown in Figure 6; click that and proceed with the download.

Cross compiler and tool-chain download
Figure 6. Linaro toolchain for 64-bit machine

 

Verifying Your Machine’s Architecture

  1. If you’re unsure about your machine’s architecture, you can verify it by running the command uname -a in your terminal, as demonstrated in Figure 7. If the output includes “x86_64,” then your machine is 64-bit.
Cross compiler and tool-chain download
Figure 7. To find out machine type

I hope you can do that and place this in the downloads folder. We will see you in the upcoming article.

 

FastBit Embedded Brain Academy Courses

click here: https://fastbitlab.com/course1 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.