Skip to content
Tommaso Merciai edited this page Jul 13, 2019 · 6 revisions

Install toolchain for Kernel 4.19.37 and U-Boot 2018-09

Install Required Packages

$ sudo apt-get install build-essential linux-source bc kmod cpio flex cpio libncurses5-dev

Get Toolchain Binary

Go to Linaro release page:

https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/

Download toolchain archive

gcc-linaro-7.4.1-2019.02-i686_aarch64-linux-gnu.tar.xz

Install the Toolchain

Now extract under /opt folder and give the right permission

$ cd /opt

$ sudo chmod 777 gcc-linaro-7.4.1-2019.02-i686_aarch64-linux-gnu

Add these 2 export in ~/.bashrc file

$ gedit ~/.bashrc

Append:

#export ARCH=arm64 (remember for u-boot use ARCH=arm)

#export CROSS_COMPILE=/opt/gcc-linaro-7.4.1-2019.02-i686_aarch64-linux-gnu/bin/aarch64-linux-gnu

Compile Kernel and U-Boot

Compile Kernel

Then in the root Kernel folder you can type for test.

$ git clone https://github.com/Scott31393/linux-tm-4.19.37.git

$ cd linux-tm-4.19.37

$ make bcm2837_defconfig

$ make -j16

Compile U-Boot

Modify ARCH=arm64 to ARCH=arm in ~/.bashrc, then in the root U-Boot folder you can type for test.

$ git clone https://github.com/Scott31393/u-boot-tm-2018.09.git

$ cd u-boot-tm-2018.09

$ make rpi_3_defconfig

$ make -j16