TS-7400-V2 4.9 kernel compile guide

From Technologic Systems Manuals

Compiling the kernel requires an armel toolchain. We recommend development using Debian Stretch workstation which includes an armel compiler in the repositories. See the Debian Stretch cross compile section for instructions on installing the proper cross compiler.

git clone https://github.com/embeddedarm/linux-4.9.y
cd linux-4.9.y

# These next commands set up some necessary environment variables
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
export LOADADDR=0x40008000

# This sets up the default configuration that we ship with
make ts_imx28_defconfig

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

To install the kernel and modules to an SD card, attach it to the PC and assuming the the SD card shows up as /dev/sdc, run the following:

export DEV=/dev/sdc2
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/imx28*ts*.dtb /mnt/sd/boot/
INSTALL_MOD_PATH="/mnt/sd" sudo -E make modules_install 
sudo -E make headers_install INSTALL_HDR_PATH="/mnt/sd/usr"
sudo umount /mnt/sd/