TS-7400-V2 4.9 kernel compile guide: Difference between revisions

From embeddedTS Manuals
(Added another necessary package)
(Removed crosscompiler section, moved)
Line 1: Line 1:
Compiling the kernel requires an armel toolchain.  We recommend development under Debian Stretch which includes an armel compiler in the repositories.
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 Compilation|Debian Stretch cross compile section]] for instructions on installing the proper cross compiler.
 
On a Debian host PC:
<source lang=bash>
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
</source>
 
 
Once those are installed:


<source lang=bash>
<source lang=bash>

Revision as of 11:48, 4 February 2019

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