TS-7180 Kernel Compile Guide

From Technologic Systems Manuals

This board has several kernels released and available in our git depending on the branch name. Compiling the kernel requires an armhf toolchain. We recommend development under Debian which includes an armhf compiler in the repositories.

This also requires several tools from your distribution. For Debian:

WARNING: This process is broken pending update, the commands for Ubuntu should be correct.
su root

apt-get install curl git build-essential lzop u-boot-tools libncursesw5-dev
echo "deb http://emdebian.org/tools/debian jessie main" > /etc/apt/sources.list.d/emdebian.list
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
dpkg --add-architecture armhf
apt-get update
apt-get install crossbuild-essential-armhf

For Ubuntu:

sudo apt-get update
sudo apt-get install crossbuild-essential-armhf git build-essential lzop u-boot-tools libncursesw5-dev

Once those are installed:

git clone https://github.com/embeddedarm/linux-tsimx
cd linux-tsimx
git checkout ts-imx_4.1.15_2.0.0_ga

## If you are using the 64-bit toolchain:
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
export LOADADDR=0x80800000

make tsimx6ul_defconfig

## Make any changes in "make menuconfig" or driver modifications, then compile
make && make uImage

To install this to a board you would use a USB SD reader and plug in the card. Assuming your Linux rootfs is all on "sdc1":

export DEV=/dev/sdc1
sudo mount "$DEV" /mnt/sd
sudo rm /mnt/sd/boot/uImage
sudo cp arch/arm/boot/uImage  /mnt/sd/boot/uImage
sudo cp arch/arm/boot/dts/imx6*ts*.dtb /mnt/sd/boot/
INSTALL_MOD_PATH="/mnt/sd" sudo -E make modules_install 
INSTALL_HDR_PATH="/mnt/sd" sudo -E make headers_install
sudo umount /mnt/sd/

Note: If you experience problems compiling the kernel with the compiler in your distribution, please try the one below:

In the case of either toolchain you would run these commands to install them:

chmod a+x poky-*.sh
sudo ./poky-*.sh