TS-4900 Kernel Compile Guide: Difference between revisions

From embeddedTS Manuals
(Created page with "The TS-4900 runs a 3.10 kernel hosted on github. * [https://github.com/embeddedarm/linux-3.10.17-imx6 embeddedarm/linux-3.10.17-imx6] The kernel can be rebuilt by cross comp...")
 
No edit summary
Line 5: Line 5:
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:
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:


* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-systemd-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh X86_64]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh X86_64]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-systemd-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh i686]
* [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/toolchain/poky-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh i686]


<source lang=bash>
<source lang=bash>
# X86_64
# X86_64
chmod a+x poky-systemd-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
chmod a+x poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-systemd-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh


# i686
# i686
chmod a+x poky-systemd-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
chmod a+x poky-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-systemd-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
</source>
</source>


Line 24: Line 24:
cd linux-3.10.17-imx6
cd linux-3.10.17-imx6
export ARCH=arm
export ARCH=arm
export CROSS_COMPILE=/opt/poky-systemd/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export CROSS_COMPILE=/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export LOADADDR=0x10008000
export LOADADDR=0x10008000



Revision as of 17:01, 10 September 2014

The TS-4900 runs a 3.10 kernel hosted on github.

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:

# X86_64
chmod a+x poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh

# i686
chmod a+x poky-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
sudo ./poky-eglibc-i686-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.6.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.

git clone https://github.com/embeddedarm/linux-3.10.17-imx6.git
cd linux-3.10.17-imx6
export ARCH=arm
export CROSS_COMPILE=/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export LOADADDR=0x10008000

make ts4900_defconfig

# Make any changes in "make menuconfig"

make
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 &&
sudo cp arch/arm/boot/uImage  /mnt/sd/boot/uImage && \
sudo cp arch/arm/boot/dts/imx6*ts4900*.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