TS-7553-V2 4.9 kernel compile guide

From embeddedTS Manuals
Revision as of 16:58, 3 April 2019 by Kris (talk | contribs) (Create 4.9 kernel compile for armhf)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Compiling the kernel requires an armhf toolchain. We recommend development using Debian Stretch workstation which includes an armhf 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-gnueabihf-
export LOADADDR=0x80800000

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

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


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/zImage
sudo cp arch/arm/boot/zImage  /mnt/sd/boot/zImage
sudo cp arch/arm/boot/dts/imx6ul*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/
sync