GUIDE: CrossCompiling for C series:recompiling kernel
Posted: Fri Aug 30, 2013 10:42 am
For cross compiling on C series you need:
I use a vmvare image of last CentOS but it work on Ubuntu too.
Open terminal and get root access to avoid permissions problems
Install subversion (svn) that is needed for get the toolchain from samygo.
On CentOS
On Ubuntu
Install native GCC
On CentOS
On Ubuntu
Instal ncurseslib
On CentOS
On Ubuntu
go to opt directory
get cross-compilation toolchain from samygo svn
You'll find the toolchain in //opt/T-VAL/arm_v7_vfp_le_20091117 directory
rename the toolchain dir for simple usage
add the path to bash.rc
verify that the path is export
--------------------------------------------------------------------------------------------------------------------------------------------------- At this point you have a fully working toolchain for C series with this you can compile what do you need if you have right sources.
---------------------------------------------------------------------------------------------------------------------------------------------------
The following instructions are for recompiling the kernel.
make src directory in opt
copy kernel sources (file linux.tgz from UE40C8000.zip) to //opt/src/
extract kernel sources
download this config files (thanks to juuso) download/file.php?id=2029
unzip it and you get file .config.valdeuc
copy .config.valdeuc downloaded to opt/src/linux/ (root of linux kernel sources)
--> this file is hidden so to see it in terminal you have to use ls -a command, in nautilus you can see it with ctrl+h <--
rename this files .config.valdeuc to .config.old
Now we are ready to recompile the kernel so go to the root of kernel sources
Compile the kernel
-->at this point before you proceed is mandatory that you have previously installed the ncurseslib for your linux version. <--
Done.
You'll find your recompiled kernel in //opt/src/linux/arch/arm/boot/ as Image.
- A unix system or a virtual image of it.
- Sources files UExxCxxx.zip example:ue40C8000.zip(I use this)
- Toolchain that is arm_v7_vfp_le_20091117.tgz
- native GCC for your linux version. (if you don't install it you get error 2 and error 127 gcc not found)
- ncurseslib for your linux version. (is necessary for the command menuconfig for configuring kernel options)
I use a vmvare image of last CentOS but it work on Ubuntu too.
Open terminal and get root access to avoid permissions problems
Code: Select all
su root
and type root password
On CentOS
Code: Select all
yum install subversion
On Ubuntu
Code: Select all
sudo apt-get subversion
Install native GCC
On CentOS
Code: Select all
yum install gcc
On Ubuntu
Code: Select all
sudo apt-get install gcc build-essential
Instal ncurseslib
On CentOS
Code: Select all
yum install ncurses-devel ncurses
On Ubuntu
Code: Select all
sudo apt-get install libncurses5-dev
Code: Select all
cd //opt
Code: Select all
svn checkout svn://svn.code.sf.net/p/samygo/code/develop/toolchains/T-VAL
Code: Select all
cd opt/T-VAL/
Code: Select all
mv arm_v7_vfp_le_20091117 arm_v7_vfp_le
Code: Select all
export PATH=$PATH:/opt/T-VAL/arm_v7_vfp_le/bin
Code: Select all
echo $PATH
---------------------------------------------------------------------------------------------------------------------------------------------------
The following instructions are for recompiling the kernel.
make src directory in opt
Code: Select all
mkdir src
Code: Select all
cp -r linux.tgz //opt/src/
Code: Select all
tar xzvf linux.tgz
unzip it and you get file .config.valdeuc
Code: Select all
unzip config_valdeuc.zip
Code: Select all
cp -r .config.valdeuc //opt/src/linux/
rename this files .config.valdeuc to .config.old
Code: Select all
mv .config.valdeuc .config.old
Code: Select all
cd opt/src/linux
Code: Select all
make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- oldconfig
make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- prepare
make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- prepare scripts
Code: Select all
make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- Image
Code: Select all
make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- menuconfig
You'll find your recompiled kernel in //opt/src/linux/arch/arm/boot/ as Image.