TS-7400-V2 4.9 kernel compile guide

From embeddedTS Manuals
Revision as of 16:45, 16 November 2018 by Kris (talk | contribs) (Added another necessary package)

Compiling the kernel requires an armel toolchain. We recommend development under Debian Stretch which includes an armel compiler in the repositories.

On a Debian host PC:

su root

apt-get install curl git build-essential lzop u-boot-tools libncursesw5-dev bc
dpkg --add-architecture armel
apt-get update
apt-get install gcc-arm-linux-gnueabi


Once those are installed:

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 
INSTALL_HDR_PATH="/mnt/sd" sudo -E make headers_install
sudo umount /mnt/sd/
sync