Forumsee logo
Forumsee » Mobility » Cellphones » Read message
RSS: Subscribe to RSS

Kernel compiling for PrimoC/U

One V General - xda-developers - forum.xda-developers.com
Dev Tutorial] Kernel compiling for PrimoC/U

Hello everyone. Today I decided I wanted to give back to the One V community with a tutorial on building a kernel. This is not specific to the Primoc/u and contains the directions for both. The source even includes both! So lets hit the ground running.

Now youll need to have access to sudo to get the packages needed. here are the commands to get packages

Ubuntu 10.04-11.10:

Code:

sudo apt-get update; sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gcc

Ubuntu 12.04

Code:

sudo apt-get update; sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 gcc

Now, to get the source run these commands

Code:

cd ~/

mkdir kernel

cd kernel

git clone git://github.com/teamblueridge/MSM7X30_KERNEL.git onev_kernel

cd onev_kernel

first you are changing to your home directory. Next your making a folder for kernels, and then pulling the source from github. This source is modified and maintained by me, so I know it stays working. Finally your changing into the kernels directory. Now how do we build this thing you ask. Well we have to do some more prep work. Lets start that prep work

run these commands

Code:

cd ~/

mkdir toolchains

cd toolchains

#this takes some time

git clone https://android.googlesource.com/platform/prebuilt android_prebuilt

cd ~/kernel/onev_kernel

Now we select our branch

for ics run

Code:

git checkout ics

For jb

Code:

git checkout jb-hack

Now were ready to build. Basically your grabbing the android prebuilts which includes the needed toolchain in the steps before.

Now heres the fun codes

To make CDMA

Code:

make ARCH=arm primoc_defconfig

make -j`grep -c processor /proc/cpuinfo` ARCH=arm CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"

To make GSM

Code:

make ARCH=arm primou_defconfig

make -j`grep -c processor /proc/cpuinfo` ARCH=arm CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"

So whats going on here you ask now? your using gnu make to build a kernel! arm is the architecture, CROSS_COMPILE is the toolchain we downloaded and -j`grep -c processor /proc/cpuinfo` will find the number of cpu cores you have and adjust the speed for your system!

So now your kernel is created and you want the kernel image to stick in your boot.img. Well its always located at ~/kernel/onev_kernel/arch/arm/boot/zImage any modules you selected are listed at the end of the build

If you were wondering, you can also modify the .config with this command

Primoc

Code:

make mrproper CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"

make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primoc_defconfig

make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" menuconfig

Primou

Code:

make mrproper CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"

make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primou_defconfig

make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" menu_config
Date: Nov 8, 2012   


Last videos:

Samsung Galaxy J1 Ace Bouton Home Repair step by step
Samsung Galaxy J1 Ace Bouton Home Repair step by step
fix camera failed on samsung s6 ege plus step by step
fix camera failed on samsung s6 ege plus step by step
fix & replace damaged charging port usb for samsung j1 ace
fix & replace damaged charging port usb for samsung j1 ace
Samsung galaxy s7 edge no sound
Samsung galaxy s7 edge no sound
sidekick Tmobile Unlock free
sidekick Tmobile Unlock free
Nokia 603 (RM-779) flashing latest software with Phoenix
Nokia 603 (RM-779) flashing latest software with Phoenix
Bypass J700F J7 , J5 , J2 D6 Edge Google Accounte 2016 Android 6.0.1
Bypass J700F J7 , J5 , J2 D6 Edge Google Accounte 2016 Android 6.0.1
Fix Custom Binary Blocked By Frp Lock & REV CHECK FAIL DEVICE
Fix Custom Binary Blocked By Frp Lock & REV CHECK FAIL DEVICE

Tags

Cars ·
Travel ·
Pets ·
production-frontend