GUIDE: CrossCompiling for C series:recompiling kernel

Ideas and dreaming about C series TV will go this forum.
Post Reply

Mkò
Posts: 196
Joined: Fri Jul 29, 2011 2:34 pm

GUIDE: CrossCompiling for C series:recompiling kernel

Post by Mkò » Fri Aug 30, 2013 10:42 am

For cross compiling on C series you need:
  • 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)
So let's start
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
Install subversion (svn) that is needed for get the toolchain from samygo.
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
go to opt directory

Code: Select all

cd //opt
get cross-compilation toolchain from samygo svn

Code: Select all

svn checkout svn://svn.code.sf.net/p/samygo/code/develop/toolchains/T-VAL
You'll find the toolchain in //opt/T-VAL/arm_v7_vfp_le_20091117 directory

Code: Select all

cd opt/T-VAL/
rename the toolchain dir for simple usage

Code: Select all

mv arm_v7_vfp_le_20091117 arm_v7_vfp_le
add the path to bash.rc

Code: Select all

export PATH=$PATH:/opt/T-VAL/arm_v7_vfp_le/bin
verify that the path is export

Code: Select all

echo $PATH
--------------------------------------------------------------------------------------------------------------------------------------------------- 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

Code: Select all

mkdir src
copy kernel sources (file linux.tgz from UE40C8000.zip) to //opt/src/

Code: Select all

cp -r linux.tgz //opt/src/
extract kernel sources

Code: Select all

tar xzvf linux.tgz
download this config files (thanks to juuso) download/file.php?id=2029
unzip it and you get file .config.valdeuc

Code: Select all

unzip config_valdeuc.zip
copy .config.valdeuc downloaded to opt/src/linux/ (root of linux kernel sources)

Code: Select all

cp -r .config.valdeuc //opt/src/linux/ 
--> 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

Code: Select all

mv .config.valdeuc .config.old
Now we are ready to recompile the kernel so go to the root of kernel sources

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
Compile the kernel

Code: Select all

make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- Image
-->at this point before you proceed is mandatory that you have previously installed the ncurseslib for your linux version. <--

Code: Select all

make ARCH=arm CROSS_COMPILE=arm_v7_vfp_le- menuconfig
Done.
You'll find your recompiled kernel in //opt/src/linux/arch/arm/boot/ as Image.
Last edited by Mkò on Sat Aug 31, 2013 3:19 pm, edited 2 times in total.

User avatar
juusso
SamyGO Moderator
Posts: 9623
Joined: Sun Mar 07, 2010 6:20 pm

Re: GUIDE: CrossCompiling for C series:recompiling kernel

Post by juusso » Fri Aug 30, 2013 10:47 am

maybe usefull
https://fedoraproject.org/wiki/Building_a_custom_kernel

config i got from arris69, btw.

oops, and you have to have big eggs if you try to install this kernel to your TV. Don`t forget to calculate proper hash for it though! and write it at once to proper partition!
LE40B653T5W,UE40D6750
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

User avatar
greenhorn
SamyGO Project Donor
Posts: 685
Joined: Wed Feb 15, 2012 3:05 pm
Location: Eastern Europe

Re: GUIDE: CrossCompiling for C series:recompiling kernel

Post by greenhorn » Fri Aug 30, 2013 11:39 am

Great job!
TV: UE40F7000 - T-FXPDEUC-1115.0 - SamyGO Extensions on F series
TV: UE55ES7000S - T-ECPDEUC-2003.4 - SamyGO tool Right from USB - no develop account is needed
TV: UE40C6710 - T-VALDEUC 3011 - Hacking TV over Hotel mode (C650 T-VALDEUC-3009.2)
BD-Player: BD-E6100 - B-FIRBPEWWC 1063.3 - rooted, no more Cin@vi@
NAS: CIFS: MAG250 NFS: Playon!HD

Post Reply

Return to “[C] Brainstorm”