添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Today, we’re going to build our own toolchain using crosstool-NG . There are so many cases that we want to build a particular toolchain for a specific embedded system development board. One MOST important reason for that is probably because the specific development board has limited resource to build upon, therefore, the time-consumption to build some software on the development board is VERY inefficient . In the other way around, cross compiling on the host PC is MORE efficient with respective to the time-consumption.

In this blog, for simplicity, we take Raspberry Pi 3B as our demo development board, for which we are building the cross compiler . Some references can be found at:

  • crosstool-ng Official Documentation
  • elinux: RPi Linaro GCC Compilation
  • 1. Installation

    How to install crosstool-NG are thoroughly summarized at its official website . In my case, I had it installed under folder /opt/compilers/crosstool-ng . Let’s take a look:

    1
    2
    3
    4
    5
    6
    longervision-GT72-6QE% pwd
    /opt/compilers/crosstool-ng
    longervision-GT72-6QE% ls
    bin libexec share
    longervision-GT72-6QE% ls bin
    ct-ng

    And make sure /opt/compilers/crosstool-ng/bin is under environment variable PATH .

    2. Configuration

    Under any directory that you want to save your .config file, we can configure our target cross compiler .

    1
    longervision-GT72-6QE% ct-ng menuconfig

    According to elinux: RPi Linaro GCC Compilation , we need to do the following selections:

  • Paths and misc options :
  •