Wiki Home » vmx25 » linux

linux

Last modified by Administrator on 2018/10/21 17:20
Linux kernel.

Build

Set toolchain

Export toolchain variables for every related terminal session.

Initial steps

Create working directory

mkdir -pv ~/workdir/vmx/linux/

Linux 4.14

Download & Extract source code

cd ~/workdir/vmx/linux/
git clone https://github.com/voipac/linux.git linux-voipac
cd linux-voipac
git checkout linux-4.14

Compile

cd ~/workdir/vmx/linux/linux-voipac
#make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- imx_v4_v5_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8
#sudo make ARCH=arm INSTALL_MOD_PATH=/srv/nfs/vmx25-rootfs modules_install
Output file is called arch/arm/boot/zImage, arch/arm/boot/dts/imx25-voipac-vmx25-254.dtb, arch/arm/boot/dts/imx25-voipac-vmx25-264.dtb and arch/arm/boot/dts/imx25-voipac-vmx25-265.dtb.

Linux 3.12.13

Set shell variables

LK_VERSION=3.12.13
SW_VERSION=20140817
LK_VNAME=${LK_VERSION%[-.]*}

Download & Extract source code

cd ~/workdir/vmx/linux/
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-${LK_VERSION}.tar.xz
tar -xvJf linux-${LK_VERSION}.tar.xz
mv linux-${LK_VERSION} linux-${LK_VNAME}.orig
cp -rv linux-${LK_VNAME}.orig linux-${LK_VNAME}.work

Patch

cd ~/workdir/vmx/linux/
wget https://www.voipac.com/downloads/imx/25/src/kernel/linux-${LK_VERSION}_vmx25_${SW_VERSION}.patch
wget https://www.voipac.com/downloads/imx/25/src/kernel/linux-${LK_VERSION}_vmx25_${SW_VERSION}.cfg
cd ~/workdir/vmx/linux/linux-${LK_VNAME}.work
patch -p1  < ../linux-${LK_VERSION}_vmx25_${SW_VERSION}.patch
cp ../linux-${LK_VERSION}_vmx25_${SW_VERSION}.cfg .config

Compile

cd ~/workdir/vmx/linux/linux-${LK_VNAME}.work
#make ARCH=arm menuconfig
make -j4 zImage imx25-vmx25.dtb
#sudo make ARCH=arm INSTALL_MOD_PATH=/srv/nfs/vmx25-rootfs modules_install
Output file is called arch/arm/boot/zImage and arch/arm/boot/dts/imx25-vmx25.dtb.

How to

Custom DTB file

TODO

Tags:
Created by Administrator on 2014/08/19 18:18

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.1 - Documentation