[Galaxy Note GT-N7000 Android Development] g.lewarne:
might try and make a turotial sometime soon.

but basicall it is as thus-

on your linux computer you need to have the following installed

GCC

GCC C++

libqt3-devel and/or qt4-devel

libncurses

Download the kernel source tar from OP

Download the suggested linaro toolchain (only the suggested version - all other/later ones will not compile)

extract the kernel tar to a folder called "kernel"

extract the toolchain to a folder somewhere near the kernel folder

edit the /kernel/Makefile and change the toolchain path

make two folders on your desktop, one called "kernel_out_ex" and one called "kernel_out_std"

open the /kernel/buildEX.sh and /kernel/buildSTD.sh scripts and change all the direcotries to match where you extracted stuff

now open the kernel folder in a root terminal

make clean

make q1_glnotecore_defconfig

this will setup the kernel .config as per my configuration settings.

now, in the same terminal, execute this

./buildSTD.sh

and watch the magic happen. It will, if you edited the scripts correctly to match where you put things, do the following

copy the initramfs to the build area

make xconfig

then xconfig will load where you can change the kernel setup. once you exit xconfig...

compile the kernel

copy the modules to the initramfs

recompile with the new initramfs

copy the final zImage to the desktop/kernel_out_std folder

tar the kernel

zip the kernel

FINISHED!

then, execute

./buildEX.sh

which will do all of the above but build the EXTREME kernel by auto-swapping some kernel source code files

you can execute buildSTD and buildEX any way around you wish the correct source files will always be swapped correctly.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The scripts and my build area

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

kernel source located in

/home/gavin/Desktop/kernel

toolchain loacted in

/home/gavin/Desktop/toolchain/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-

Final zip'd and tar'd STANDARD kernel output

/home/gavin/Desktop/kernel_out_std

Final zip'd and tar'd EXTREME kernel output

/home/gavin/Desktop/kernel_out_ex

/kernel/Makefile cross_compiler edit line (adjust to your directories)

LINE 196: CROSS_COMPILE	= /home/gavin/Desktop/toolchain/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-

buildSTD.sh standard kernel autobuilder script

#!/bin/sh
#Copy the initramfs
cd /
cd /home/gavin/Desktop/kernel
echo Removing zImage
rm /home/gavin/Desktop/kernel_out_std/zImage -f >/dev/null
rm arch/arm/mach-exynos/cpufreq-4210.o -f >/dev/null
rm arch/arm/mach-exynos/cpufreq-4210.c -f >/dev/null
cp arch/arm/mach-exynos/cpufreq-4210_STD.c arch/arm/mach-exynos/cpufreq-4210.c >/dev/null
echo "Set CPUFREQ_STD as default"
rm drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.o -f >/dev/null
rm drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c -f >/dev/null
cp drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfsSTD.c drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c >/dev/null
echo "Set Mali to STD as default"
sleep 5
mkdir -p /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
rm -rf /home/gavin/Desktop/kernel/usr/initramfs/* >/dev/null
cp -R /home/gavin/Desktop/kernel/initramfs_n7000/* /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
chmod -R g-w /home/gavin/Desktop/kernel/usr/initramfs/* >/dev/null2
#rm $(find /home/gavin/Desktop/kernel/usr/initramfs -name EMPTY_DIRECTORY -print) >/dev/null
rm -rf $(find /home/gavin/Desktop/kernel/usr/initramfs -name .git -print) >/dev/null
export CONFIG_INITRAMFS_SOURCE=/home/gavin/Desktop/kernel/usr/initramfs >/dev/null
#Enable FIPS mode
export USE_SEC_FIPS_MODE=true >/dev/null
echo INITRAMFS copied to usr/
echo Loading xconfig....
make xconfig >/dev/null
echo "Compiling kernel....(this will take some time)"
make -j2
cp -a $(find . -name *.ko -print |grep -v initramfs) >/dev/null /home/gavin/Desktop/kernel/usr/initramfs/lib/modules/ >/dev/null
sleep 5
clear
touch /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
echo Rebuilding kernel with new initramfs
make -j2 >/dev/null
echo "Copy STD zImage to Desktop and make flash files"
cp /home/gavin/Desktop/kernel/arch/arm/boot/zImage /home/gavin/Desktop/kernel_out_std/ >/dev/null
cd /home/gavin/Desktop/kernel_out_std
rm *.tar -f >/dev/null
rm *.zip -f >/dev/null
zip -r GL_NOTECORE_Vxx.zip *
tar -H ustar -c zImage > GL_NOTECORE_vXX.tar
md5sum -t GL_NOTECORE_vXX.tar >> GL_NOTECORE_vXX.tar

buildEX.sh EXTREME kernel autobuilder script

#!/bin/sh
#Copy the initramfs
cd / >/dev/null
cd /home/gavin/Desktop/kernel/ >/dev/null
echo Removing zImage
rm /home/gavin/Desktop/kernel_out_ex/zImage -f >/dev/null
rm arch/arm/mach-exynos/cpufreq-4210.o -f >/dev/null
rm arch/arm/mach-exynos/cpufreq-4210.c -f >/dev/null
cp arch/arm/mach-exynos/cpufreq-4210_EX.c arch/arm/mach-exynos/cpufreq-4210.c >/dev/null
echo "Set CPUFREQ_EX as default"
rm drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.o -f >/dev/null
rm drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c -f >/dev/null
cp drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfsEX.c drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c >/dev/null
echo "Set Mali to EX as default"
sleep 5
mkdir -p /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
rm -rf /home/gavin/Desktop/kernel/usr/initramfs/* >/dev/null
cp -R /home/gavin/Desktop/kernel/initramfs_n7000/* /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
chmod -R g-w /home/gavin/Desktop/kernel/usr/initramfs/* >/dev/null2
#rm $(find /home/gavin/Desktop/kernel/usr/initramfs -name EMPTY_DIRECTORY -print) >/dev/null
rm -rf $(find /home/gavin/Desktop/kernel/usr/initramfs -name .git -print) >/dev/null
export CONFIG_INITRAMFS_SOURCE=/home/gavin/Desktop/kernel/usr/initramfs >/dev/null
#Enable FIPS mode
export USE_SEC_FIPS_MODE=true >/dev/null
echo INITRAMFS copied to usr/
echo Loading xconfig....
make xconfig >/dev/null
echo "Compiling kernel....(this will take some time)"
make -j2
clear
cp -a $(find . -name *.ko -print |grep -v initramfs) >/dev/null /home/gavin/Desktop/kernel/usr/initramfs/lib/modules/ >/dev/null
sleep 5
touch /home/gavin/Desktop/kernel/usr/initramfs >/dev/null
echo Rebuilding kernel with new initramfs
make -j2 >/dev/null
echo "Copy EX zImage to Desktop and make flash files"
cp /home/gavin/Desktop/kernel/arch/arm/boot/zImage /home/gavin/Desktop/kernel_out_ex/ >/dev/null
cd /home/gavin/Desktop/kernel_out_ex
rm *.tar -f >/dev/null
rm *.zip -f >/dev/null
zip -r GL_NOTECORE_Vxx_EX.zip *
tar -H ustar -c zImage > GL_NOTECORE_vXX_EX.tar
md5sum -t GL_NOTECORE_vXX_EX.tar >> GL_NOTECORE_vXX_EX.tar ^C

MAKE SURE IN XCONFIG YOU SET THE INITRAMFS PATH TO [yourdirectories]/kernel/usr/initramfs

ALSO MAKE SURE YOU EXTRACT THE CONTENTS OF THIS FILE INTO BOTH THE kernel_out_XX DIRECTORIES ON YOUR DESKTOP OTHERWISE THE AUTOBUILT CWM ZIPS WONT WORK

www.hecubus.com/xda/ksource/META-INF.zip

all of the above is a VERY rough guide :good:

EDIT: i know my scripts are n00bish and crappy but they work, so whatever :)