TS-TPC-7990 Kernel Compile Guide: Difference between revisions

From embeddedTS Manuals
(Created page with "This board has several kernels released and available in our git depending on the branch name. * [https://github.com/embeddedarm/linux-3.10.17-imx6 embeddedarm/linux-3.10.17-...")
 
No edit summary
Line 1: Line 1:
This board has several kernels released and available in our git depending on the branch name.
The kernels we use in our images are built using the toolchains built by Yocto.  You can download the appropriate cross toolchain for your Linux system here.  Right click and save as for the appropriate toolchain:
 
* [https://github.com/embeddedarm/linux-3.10.17-imx6 embeddedarm/linux-3.10.17-imx6]
 
* The "master" branch is 3.10.17 and is largely outdated and replaced with later kernels.  This is used with the old Yocto Dora builds.
* The "imx_3.10.53_1.1.0_ga" kernel is a stable supported branch.  If you are using Yocto Dizzy or Fido, you should use this branch.  This is also compatible with the Debian releases.
* The "imx_3.14.52_1.1.0_ga" branch is compatible with Yocto Jethro, and should also be used for most Debian releases.
* The "imx_4.1.15_1.0.0_ga" branch is still under development and currently only intended for i.MX6ul (TS-4100) support.
 
You can pick the branch below.  The kernel can be rebuilt by cross compiling from an X86/X86_64 Linux.  Our default kernels are rebuilt using the toolchains built by Yocto.  You can download the appropriate cross toolchain for your Linux system here.  Right click and save as for the appropriate toolchain:


* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/krogoth/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh X86_64]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/krogoth/toolchain/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh X86_64]

Revision as of 10:39, 31 August 2016

The kernels we use in our images are built using the toolchains built by Yocto. You can download the appropriate cross toolchain for your Linux system here. Right click and save as for the appropriate toolchain:

# X86_64 (64 bit)
chmod a+x poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh
sudo ./poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh

# i686 (32 bit)
chmod a+x poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh
sudo ./poky-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.1.sh

This will ask for the install directory for the toolchain. You can choose another directory than the default, but the following instructions will assume the defaults.

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

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

Once those are installed:

# This is the branch we recommend for our standard images:
git clone https://github.com/embeddedarm/linux-3.10.17-imx6.git -b imx_4.1.15_1.0.0_ga linux-technologic
cd linux-technologic/

# This mus be run every time you open a new terminal to build the kernel
source /opt/poky/2.1.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
export LOADADDR=0x10008000
make ts4900_defconfig

## Make any changes in "make menuconfig" or driver modifications, then compile
make -j4 && 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
# Yocto makes this a symlink which must first be removed
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/
sync

Change Kernel Splash Screen

The kernel splashscreen allow for a 224 color image, up to the full screen resolution. For the fastest boot speed, it should be kept as small as possible. The image will be centered around a black background.

To convert an image, for example, "mylogo.png":

convert mylogo.png mylogo.ppm
ppmquant 224 mylogo.ppm > mylogo-224.ppm
pnmnoraw mylogo-224.ppm > logo_user_clut224.ppm
cp logo_user_clut224.ppm <kernel build sources>/drivers/video/logo/

Recompile the kernel following the guide in the previous section to have the splashscreen appear on all future boots.

Add to the kernel cmdline in U-Boot, "logo.nologo" in order to completely disable the splash screen.