How to compile modules for E series from kernel sources
Posted: Thu May 30, 2013 9:05 pm
Temporal place for some short howto, requested by yepp.
First you may need to install xz-utils to extract archive.
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
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/).
3. copy defconfig to root of toolchain
and copy default config for your kernel to root of sources and rename it to .config
4. export path to your compilers bin dir (or add to ~/.bashrc at the end), re-open terminal to use new path.
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:
6. Prepare. Execute one by one (just for first time):
7. Compile kernel:
8. If it finishes without errors (ignore warnings), then
(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:
11. If no errors (MODPOST stage 2 w/o errors), check for your kernel modules
12. To make modules smaller size, strip with -g :
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: or for 4 core:
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.
First you may need to install xz-utils to extract archive.
Code: Select all
apt-get instal xz-utils
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
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
Code: Select all
cd /opt/src/VDLinux-2.6.35.11/linux-2.6.35.11
Code: Select all
cp -ar arch/arm/configs/X10P_defconfig_release .config
cp -ar arch/arm/configs/X10P_defconfig_release .config.old
Code: Select all
export PATH=$PATH:/opt/VDLinux-arm-v7a8v2r2/bin
Code: Select all
#define DTV_KERNEL_VERSION "0064, release"
#define DTV_LAST_PATCH "0713, DTV, X10P, release, AUS_BRANCH"
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
Code: Select all
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- Image
Code: Select all
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- menuconfig
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
12. To make modules smaller size, strip with -g :
Code: Select all
arm-v7a8v2r2-linux-gnueabi-strip -g ./<path>/yourmodule.ko
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
Code: Select all
make ARCH=arm CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi- Image -j5

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.