How to compile modules for E series from kernel sources

Here for general support for E series TVs, request and problem solve area.
Post Reply

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

How to compile modules for E series from kernel sources

Post by juusso »

Temporal place for some short howto, requested by yepp.

First you may need to install xz-utils to extract archive.

Code: Select all

apt-get instal xz-utils
1. download required toolchain from SamyGO downloads (http://download.samygo.tv/Toolchains/VD ... 630.tar.xz) and extract it to /opt dir.
I renamed folder to be shorter: /opt/VDLinux-arm-v7a8v2r2

Code: Select all

cd /opt
unxz ./VDLinux-ARMv7-4.4-202-toolchain-v2r2-20110630.tar.xz
tar -C /opt/vd -xvf ./VDLinux-ARMv7-4.4-202-toolchain-v2r2-20110630.tar
2. download sources from opensource.samsung.com
you need UExxES6xxx.zip and take archive named VDLinux_2.6.35.11.tgz from there, and extract it (let`s say to /opt/src/).

Code: Select all

cd /opt
mkdir ./src && cd ./src
tar -xzvf VDLinux_2.6.35.11.tgz
3. copy defconfig to root of toolchain

Code: Select all

cd /opt/src/VDLinux-2.6.35.11/linux-2.6.35.11
and copy default config for your kernel to root of sources and rename it to .config

Code: Select all

cp -ar arch/arm/configs/X10P_defconfig_release .config
cp -ar arch/arm/configs/X10P_defconfig_release .config.old
4. export path to your compilers bin dir (or add to ~/.bashrc at the end), re-open terminal to use new path.

Code: Select all

export PATH=$PATH:/opt/VDLinux-arm-v7a8v2r2/bin
5. Check modules version, edit the file include/linux/vdlp_version.h (it is symlink to vdlp_version_X10P.h) and change for 0064 driver to:

Code: Select all

#define DTV_KERNEL_VERSION "0064, release"
#define DTV_LAST_PATCH "0713, DTV, X10P, release, AUS_BRANCH"
6. Prepare. Execute one by one (just for first time):

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- oldconfig
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- prepare
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- prepare scripts
7. Compile kernel:

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- Image
8. If it finishes without errors (ignore warnings), then

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- menuconfig
(this require ncurses-dev to be pre-installed on your linux)
9. select your modules you need to compile... (like here), don`t forget to save when exit
10. Compile modules:

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- modules
11. If no errors (MODPOST stage 2 w/o errors), check for your kernel modules
12. To make modules smaller size, strip with -g :

Code: Select all

arm-v7a8v2r2-linux-gnueabi-strip -g ./<path>/yourmodule.ko
Now you can repeat steps 8-10 to select and compile modules every time you need it.

If your pc is dualcore, you can add -j3 at the end of your command, this makes job quicker. Or for more cores: -j1+n, where n=your core number. For example:

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- Image -j3
or for 4 core:

Code: Select all

make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- Image -j5
Hope this helps. Good luck :)

p.s. This "How-TO" will be moved to wiki...
p.p.s. If anyone want to add some info, please post here.
p.p.p.s. For other series/models steps are same, just you have to use different toolchain/kernel sources.
LE40B653T5W,UE40D6750,UE65Q8C
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. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

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

Re: How to compile modules for E series from kernel sources

Post by greenhorn »

Awesome! Thank you!
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

yepp
Posts: 43
Joined: Sat Oct 08, 2011 1:06 pm

Re: How to compile modules for E series from kernel sources

Post by yepp »

error on last stage 2

Code: Select all

  Building modules, stage 2.
  MODPOST 35 modules
WARNING: could not find fs/tntfs/.aops.o.cmd for fs/tntfs/aops.o
ERROR: "video_device_release" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "video_usercopy" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "video_register_device" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "video_device_alloc" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "video_unregister_device" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "v4l_printk_ioctl" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "video_devdata" [drivers/media/video/uvc/uvcvideo.ko] undefined!
ERROR: "v4l_compat_translate_ioctl" [drivers/media/video/uvc/uvcvideo.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

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

Re: How to compile modules for E series from kernel sources

Post by juusso »

Code: Select all

make clean
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- prepare modules
Btw, toolchain is available on svn

Code: Select all

svn checkout svn://svn.code.sf.net/p/samygo/code/develop/toolchains/T-ECP VDLinux-ARMv7-4.4-202-toolchain-v2r2-20110630
LE40B653T5W,UE40D6750,UE65Q8C
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. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[E] Support”