[DEV][Kernel]Porting kernel 3.0.8 - Galaxy S Plus I9001 Android Development

!!!FIRST READ THEN POST!!!​
I am not a programmer so do not shout at me , I try to help you gather as much information as possible. Of course, I trying port kernel by myself but is going very slowly.
I decided to start this thread and share with you information that I managed to collect. Topic applies to porting the kernel 3.0.8 for i9001.
I found a phone that has the same motherboard, CPU and GPU as the i9001 and already got an official kernel 3.0.8.
Why this kernel is good for us? - because has already almost all drivers needed by i9001 so porting will be easier.
Why we need it - better battery life, better cooperation with ICS/JB, better speed, new possibilities? And why not?
- What needs to be done?
- include and port file from 2.6.35.X - arch/arm/mach-msm/board-ariesve.c
- include/find missing drivers for i9001
- Links:
i9001 spec - Samsung Galaxy S Plus
U8860 spec - Huawei Honor
Kernel sources
Thread - Huawei U8860 Honor / Honour / Glory - Index

How to build kernel:
This howto is working only with 2.6.35.X kernel, when this project will be finished will add HOWTO for 3.0.8
You need linux machine, i don't know it is possible on Windows and if so i don't help you with that!!!
1. Download toolchain.
Download toolchain and extract it to /opt/ directory.
Should looks like:
Code:
/opt/arm-eabi-4.4.3/
2. Set up evn.
Edit your:
Code:
~/.bashrc
file and add at the end of file this two rows:
export CROSS_COMPILE=/opt/arm-eabi-4.4.3/bin/arm-eabi-
export CCOMPILE=/opt/arm-eabi-4.4.3/bin/arm-eabi-
Click to expand...
Click to collapse
3. Download kernel - 2.6.35.14.
You can download kernel sources from Arco, Skywalker01 or Vitaliy_y repo, and extract to ~/kernel/, this kernels has already needed drivers etc.
4. Compile kernel:
When i'm compiling kernel i'm doing it in this way:
make ARCH=arm mrproper -j3
make ARCH=arm clean -j3
adb pull /proc/config.gz ./
gzip -d ./config.gz
mv ./config ./.config
make ARCH=arm oldconfig -j3
make ARCH=arm menuconfig -j3
make ARCH=arm -j3
Click to expand...
Click to collapse
5. Output files.
mkdir -p ../kernel-out/modules
cp arch/arm/boot/zImage ../
find ./ -name "*.ko" -exec cp {} ../kernel-out/modules \;
Click to expand...
Click to collapse
6. Create boot.img
split_bootimg.pl boot.img
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
Click to expand...
Click to collapse
- Swap kernel and modules and then:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
Click to expand...
Click to collapse
- Creat boot.img
mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --base 0x00400000 -o boot.img
Click to expand...
Click to collapse
Download: split_bootimg, mkbootimg
Extract files here /usr/local/bin and set permissions to 755.

What i have done:
1. Added board-ariesve.c here:
arch/arm/mach-msm/board-ariesve.c
2. Included Ariesve board to Kconfig and Makefile.
3. Added missing files:
include/linux/fsa9480.h
arch/arm/mach-msm/include/mach/msm_reqs.h
Compilation error:
arch/arm/mach-msm/board-ariesve.c: In function 'pm8058_gpios_init':
arch/arm/mach-msm/board-ariesve.c:329: error: variable 'sdcc_det' has initializer but incomplete type
arch/arm/mach-msm/board-ariesve.c:330: error: unknown field 'direction' specified in initializer
arch/arm/mach-msm/board-ariesve.c:330: warning: excess elements in struct initializer
error, forbidden warning: board-ariesve.c:330
make[1]: *** [arch/arm/mach-msm/board-ariesve.o] Error 1
Click to expand...
Click to collapse

Cool ! Thank you !

oisis said:
I am not a programmer so do not shout at me , I try to help you gather as much information as possible. Of course, I trying port kernel by myself but is going very slowly.
I decided to start this thread and share with you information that I managed to collect. Topic applies to porting the kernel 3.0.8 for i9001.
I found a phone that has the same motherboard, CPU and GPU as the i9001 and already got an official upgrade to ICS.
Why this kernel is good for us? - because has already almost all drivers needed by i9001 so porting will be easier.
What needs to be done?
- include board-ariesve.c - Board spec.
- include missing drivers for i9001
Links:
i9001 spec - Samsung Galaxy S Plus
U8860 spec - Huawei Honor
Kernel sources
Thread - Huawei U8860 Honor / Honour / Glory - Index
Click to expand...
Click to collapse
page not found - Huawei U8860 Honor / Honour / Glory - Index

What advantages will kernel 3.x have for us?
Sent from my GT-I9001 using XDA

chasemyass said:
page not found - Huawei U8860 Honor / Honour / Glory - Index
Click to expand...
Click to collapse
Fixed.
EternalFame said:
What advantages will kernel 3.x have for us?
Sent from my GT-I9001 using XDA
Click to expand...
Click to collapse
New drivers, better cooperation with ICS?

Awesome project!
What's the current status? How far does your current compile boot?

oisis said:
Fixed.
New drivers, better cooperation with ICS?
Click to expand...
Click to collapse
Kay
Just asked out of interest
Does it also bring some speed?
Sent from my GT-I9001 using XDA

EternalFame said:
Kay
Just asked out of interest
Does it also bring some speed?
Sent from my GT-I9001 using XDA
Click to expand...
Click to collapse
Not to much but can bring some. Also maybe bring better battery life, new possibilities.

hey about the jelly bean thing,i sent you the nexus boot.img with modified init.rc and init.traces .rc. did you try comparing them with some tool? like winmerge.

Doomsday94 said:
hey about the jelly bean thing,i sent you the nexus boot.img with modified init.rc and init.traces .rc. did you try comparing them with some tool? like winmerge.
Click to expand...
Click to collapse
First we need kernel then boot.img and init.rc scripts.

oisis said:
First we need kernel then boot.img and init.rc scripts.
Click to expand...
Click to collapse
you mean the 3.0 kernel?

Good luck, oisis. I do not know if this will help with something, but the dev tom3q, wrote kernel 3.0 for i5700 spica. Maybe he has some tips .....

Doomsday94 said:
you mean the 3.0 kernel?
Click to expand...
Click to collapse
Yes.
drummer1839 said:
Good luck, oisis. I do not know if this will help with something, but the dev tom3q, wrote kernel 3.0 for i5700 spica. Maybe he has some tips .....
Click to expand...
Click to collapse
Thanks for link.

PDK
Good to see progress.. By the way, you guys might already know this, but Google release a "Platform development Kit" in Google IO 2012, to help developers and manufacturers port new Android OSs (like Jelly Bean) to their devices.
I found the link below, maybe it can help bringing Jelly Bean to our device in the future :silly:
http://www.kandroid.org/online-pdk/guide/index.html
Thanks

So guys a quick review.
Oisis and me are both working on kernel now.
We are using parts of the Huawei honor kernel to make ICS camera work. But please be patient that it will take a while till we finish. and we dont give guarantee that ALL will work CORRECTLY then.
But for you guys, to see the status of developement and we are not bluffing ^^
Here you see the drivers which we'll use in new kernel.
https://github.com/dzo/kernel_huawei/tree/master/drivers
****Update Status****
Will be new in kernel:
- Changing drivers for radio (maybe will work then) -> https://github.com/dzo/kernel_huawei/tree/master/drivers/media
- Changing wifi drivers for better wifi thetering performance
- Changing Audio/Video drivers for ICS Camera -> https://github.com/dzo/kernel_huawei/tree/master/drivers/video
- And other little things will be changed (better battery usage -> new drivers/ better performance ... )
- Will change GPU drivers too -> https://github.com/dzo/kernel_huawei/tree/master/drivers/gpu

As i see those drivers of huwai are the same as Samsung galaxy s plus?
Sent from my GT-I9001 using xda app-developers app

Raimon93 said:
As i see those drivers of huwai are the same as Samsung galaxy s plus?
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
Its mostly the same Hardware, so we can use many things of that device, because it got official ICS with everything working!

Keinbockwurst said:
Its mostly the same Hardware, so we can use many things of that device, because it got official ICS with everything working!
Click to expand...
Click to collapse
That's true, because that device got a official ICS update and the hardware Is nearly the same we can use its drivers and we think it will work.
Kernel will be finished to try in this week I think...
Sent from my GT-I9001 using xda app-developers app

Related

[DEV] How to build cm7 for galaxy y (GT-S5360) ! Ubuntu 32 bits !

Requirements :
OS linux Ubuntu 12.04 32bits
2Gb RAM with 3Gb swap or above
Processor dual core or above
120Gb Harddisk or above
Fast internet connection ( i have no this )
First download this file
Installer SDK and Build packages by squadzone modified for me
you will get installerBuildRomGalmin.sh , run this file via Terminal on Ubuntu!
Code:
chmod a+x ~/installerBuildpackages.sh
installerBuildpackages.sh
Create the Directories
You will need to set up some directories in your build environment.
To create them:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16
Device repo !
clone its
choose branch master
put on device tree or replace totoro folder on device tree
(/device/samsung/totoro)
Vender folder clone its
pu on vendor folder !
(/vendor/samsung/totoro)
Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
~/android/system/vendor/cyanogen/get-rommanager
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Galaxys2.
. build/envsetup.sh && brunch totoro
Notes :
based on tutorial for galaxy mini by squadzone
the device repo created for me ( add credits if you use its )
sorry bad english !
changelog :
1.0
-initial tutorial for cm7 galaxy y ( may need some modifications! )
reserved for more updates if necessary !
Thanks for this buddy :good:
OFF : Any news about CM9 ?
wow.. reserved sir whitexp.. long time no post? D
I WIIL TRY IT BOR
By SOMKLL
But this Cyanogen has the same bugs,right?
whitexp what about cm9 ? when will u continue xD
and great guide
This message is COPYRIGHTED to me and stolen from:My post
Cyanogen 7/9 only get developed again when the gpu driver become released
Awesome tutorial sir...
Just one question...if we still have GPU restrictions while compiling CM7/9/10, then what is the use of the tutorial? Is there any update I should be aware of?
I'm not at all disrespecting OP's efforts...I respect him...he is doing commendable job for this device..hat's off! this question is just out of curiosity!
everyone needs brodcom drivers,without it nothing is possible.
PREMOLIKES said:
everyone needs brodcom drivers,without it nothing is possible.
Click to expand...
Click to collapse
Well it's still possible to boot it, so yeah. It's a handy tutorial, LEARN to appreciate guys! That's the reason why SGY devs are leaving, 1 by 1, because of you people that whine! Thank them for the effort!
PREMOLIKES said:
everyone needs brodcom drivers,without it nothing is possible.
Click to expand...
Click to collapse
Without this kind of tutorial and with gpu drivers will you make cm7 for sgy????
Awesome tutorial sir!!
Tutotial is good.no doubt.I said drivers are a stumbling block.
PREMOLIKES said:
Tutotial is good.no doubt.I said drivers are a stumbling block.
Click to expand...
Click to collapse
Drivers will be here soon! I am gettin ready already!
Sent from my GT-S5360 using XDA
Mohamed.Anwar said:
Thanks for this buddy :good:
OFF : Any news about CM9 ?
Click to expand...
Click to collapse
what gaming rom r using
Exellent tut buddy.:thumbup::thumbup:
sent while doin' some burnouts
hell_lock said:
Drivers will be here soon! I am gettin ready already!
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
really?
broadcom will release their drivers or are you just joking around because i just installed windows again on my pc ...
cosminx13 said:
really?
broadcom will release their drivers or are you just joking around because i just installed windows again on my pc ...
Click to expand...
Click to collapse
A suggestion from me.you can use both os like dualboot.for info about this try google
MANY GREEEEETZ!!!

[Guide][cm7] How to build cyanmobile from source

Hello guys i'm here with my first guide of how to build cyanmobile from source for galaxy fit ......
As you all might know cyanmobile went opensource thanks to squadzone now we can compile it from source with our own modifiactions.....
Requirements
1)Linux machine (recommended 64bit and ubuntu) with atleast 50gb free space
2)Common sense of how to use google and fix errors
3)Basic knowledge of git and its commands
4)A possibilty of bricking your fit
5)A fast and stable internet connection
now lets get started
Assuming we have linux installed
installing required build packages
from terminal
HTML:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
Note:- All the packages are important dont skip any of them
now making the directories to download the source
HTML:
mkdir -p ~/bin
mkdir -p ~/android/system
here mkdir stands for make directory
~ refers to your home folder (incase if you are a beginner)
Next
making the repo command executable
copy paste this terminal
HTML:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Reboot your system after executing this
This defines the repo command or the repo command usable on your machine
chmod is giving permissions to the folder a+x is the permissions given don't go deep into this.
Next
Downloading the source
i will be referring execute to copy pasting in the terminal
HTML:
repo init -u git://github.com/CyanMobile/android_cyanmobile.git -b gingerbread
now
repo sync
alternatives
repo sync -jx
here x can be anything depends on your internet speed ther will x number of simultaneous download if you use the arguement
like if you use
repo sync -j4
There will 4 downloads going on simulatneously
Next after the source has been downloaded you will find someting like this...
syncing working tree 100
now you have the source downloaded
Preparing the build environment
install java jdk6 or jdk 5 using this tutorial
http://codingforme.wordpress.com/2012/05/14/installing-oracle-java-jdk-6-or-7-on-ubuntu-12-04/
Install the android sdk following this tutorial
http://www.howtoforge.com/setting-up-an-android-app-build-environment-with-eclipse-android-sdk-phonegap-ubuntu-11.04
not testsed on jdk 7 so better use 6 or 5
fix its path using "export PATH=$PATH:"ur sdk path""
ur sdk path depends on where you install it
install adb using this guide
http://forum.xda-developers.com/showthread.php?t=921169
Connect your phone with usb debugging enabled and execute this
preferable do this when you are on a cm based rom ..
HTML:
adb devices
if you see something like this its working for you
HTML:
List of devices attached
S5670efac482b device
now go to device > samsung > beni execute extract-files.sh as root use sudo and drag that to terminal and hit enter
now cd into the root of your source folder
HTML:
cd ~/android/system
then
HTML:
source buid/envsetup.sh
HTML:
lunch
you will see all the build properties something like this
HTML:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.8
TARGET_PRODUCT=cyanogen_beni
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
now type make -jx otapackage
x depends on your hardware more it is faster the build
you will find the built one in out/samsung/beni /cm--xxx.zip
Flash it and enjoy
credits
wilfredcool007
vishwanthptl
sakindia123
yajnab
ravi h basawa
adit_pat
squadzone
google
xda
without these guys it wouldnt be possible pree thanks for them plz
1 st reserved
Thumbs up
Nice guide ajay :good:
Its same as the building of cyanogenmod. But to continue this thread u have to first build a copy too for promoting this and the errors while building , so start repo syncing. I am syncing the jelleybean now.
Best of luck for this thread
yajnab said:
Its same as the building of cyanogenmod. But to continue this thread u have to first build a copy too for promoting this and the errors while building , so start repo syncing. I am syncing the jelleybean now.
Best of luck for this thread
Click to expand...
Click to collapse
i am too doing a list of common errors encountered and will update the op
speed_bot said:
i am too doing a list of common errors encountered and will update the op
Click to expand...
Click to collapse
I'm on a low bandwidth. Can u please make a highly compressed .uha or Uharc compression package of the cyanmobile so that i can also help u in building this. not having the cm7 sources too. It cn be a grat sart for making a more modified cyanombile than squadzone.
yajnab said:
I'm on a low bandwidth. Can u please make a highly compressed .uha or Uharc compression package of the cyanmobile so that i can also help u in building this. not having the cm7 sources too. It cn be a grat sart for making a more modified cyanombile than squadzone.
Click to expand...
Click to collapse
dude do this remove all devices and sync only beni and tass the source is small and use aosps prebuilt the download is only 3gb bro...and can plz upload the prebuilt directory for me i will upload frameworks and devices by tmrw for you..........plz i need the prebuilt directory
You rock man, keep up the good work.. thank you..
praveen_kalasa said:
You rock man, keep up the good work.. thank you..
Click to expand...
Click to collapse
thanks bro..
Nice Work
Very useful Guide for Begineers. Keep this thread updated
RishabhAd said:
Very useful Guide for Begineers. Keep this thread updated
Click to expand...
Click to collapse
but only few people responded to it so what can i update with
??
hi.i am trying to build from your how to...will report ...thank you for this...
desalesouche said:
hi.i am trying to build from your how to...will report ...thank you for this...
Click to expand...
Click to collapse
im already compiling for your device
How to build cyanmobile x from source for p500?
thanks
x-dira said:
How to build cyanmobile x from source for p500?
thanks
Click to expand...
Click to collapse
just choose p500 during lunch
building for huawei u8800pro and u8860
hi can i build with 3.0.87 kernel?
or should i use a 2.6.35 one?
can we build only gingerbread or is there possibility to build 4.2.2?
thank you
Nice guide :thumbup:
I'll try it for GalaxyW
desalesouche said:
hi can i build with 3.0.87 kernel?
or should i use a 2.6.35 one?
can we build only gingerbread or is there possibility to build 4.2.2?
thank you
Click to expand...
Click to collapse
u need kernel 2.6 for gb 3.x supports only ics and above.android 4.2.2 is buildable provided u have all drivers and other binaries
K_TECH said:
Nice guide :thumbup:
I'll try it for GalaxyW
Click to expand...
Click to collapse
dude this guide is for galaxy fit but u can build it for w or any device by using the tress specific for that device.
Bump
I wanna try to port this ROM to the LG e739, but I have no idea what to do at this point. I downloaded the sources, but the device tree I have from cm7.2 is just plain, it lacks everything else the other devices have and to be honest I'm overwhelmed. Any help is greatly appreciated

[GUIDE] Compile CM from source, source basics & FAQ - Very detailed and noob friendly

[GUIDE] Compile CM from source, source basics & FAQ - Very detailed and noob friendly
Hey guys, I know there is already a tutorial about compiling CyanogenMod by sakindia123 but it requires basic Linux knowdlegde and he missed some things. I wrote this tutorial very detailed and simple.
This Guide have 4 parts:
1. How to compile CyanogenMod from source
2. Hardware Requirments and using SWAP memory
3. CyanogenMod source and device tree basics
4. FAQ
Click to expand...
Click to collapse
Before we start, I would like to thank these guys:
sakindia123, derefas, lirokoa, cute_prince - for amazing work on CM7-10.1 and Kernel 3.0
Nihar G. and bhargz16 that never refused to help me
How to compile CyanogenMod from source​
Lets assume you are new in Linux world and you just installed a fresh Ubuntu installation.
I will use:
- Ubuntu 12.10 64bit
- CyanogenMod 10.1 (sakindia123 device tree) - because its newest, and currently WIP, so its exciting to get new bulid with something fixed before release!
- Kernel 3.0.16 for Pico (sakindia123 github tree)
Lets get it started.
1. Open the Terminal (Press CTRL+ALT+T).
2. Get rid of administrator permissions ****.
Type:
sudo su
then type your password you set up during Ubuntu installation (password will be invisible) and hit enter
Click to expand...
Click to collapse
3. Download, install and setup Java:
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java6-installer
apt-get install oracle-java6-set-default
Click to expand...
Click to collapse
4. Install a needed packages:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
Click to expand...
Click to collapse
5. Download a Google Repo tool. Type these commands:
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
6. Reboot your computer. (No need for sudo su after reboot)
If you are building for HTC Explorer
7. Initalize the CyanogenMod 10.1 repository (with included pico stuff):
mkdir -p ~/CM10.1/android/system
cd ~/CM10.1/android/system
PATH=~/bin:$PATH
repo init -u git://github.com/TeamPico/manifest -b cm-10.1
Click to expand...
Click to collapse
8. Start source downloading (repository syncing):
repo sync
Click to expand...
Click to collapse
9. Get Terminal Emulator prebulit APK:
cd ~/CM10.1/android/system/vendor/cm/
./get-prebuilts
Click to expand...
Click to collapse
10. Start compiling bulid!
. build/envsetup.sh
brunch cm_pico-userdebug -jX
X is a number of your CPU cores + 1 or 2
Click to expand...
Click to collapse
Your bulid will be located at /CM10.1/android/system/out as cm-10.1-year/month/date-UNOFFICIAL-pico.zip
If you are building for other devices
7. Initalize the CyanogenMod 10.1 repository:
mkdir -p ~/CM10.1/android/system
cd ~/CM10.1/android/system
PATH=~/bin:$PATH
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
Click to expand...
Click to collapse
8. Start source downloading (repository syncing):
repo sync
Click to expand...
Click to collapse
9. Get Terminal Emulator prebulit APK:
cd ~/CM10.1/android/system/vendor/cm/
./get-prebuilts
Click to expand...
Click to collapse
How to get vendor, kernel, and device tree - search for developers github, its ofter mentioned on dev-thread or his xda profile..
manufacturer - htc, samsung,lge...
codename - device model codename (codename you can easily find on name of github repos of device tree,vendor and kernel)
Examples:
Explorer - pico
Desire - bravo
Galaxy Mini - tass
Galaxy Mini 2 - jena
Nexus 4 - mako
For some devices, example some LGs it can be model number like LG Optimus Me - p350
10. Setup a vendor tree:
Download the vendor tree and extract proprietary folder inside <something>-master folder in archive to /CM10.1/android/system/vendor/manufacturer/codename (you need to manually create folders)
Click to expand...
Click to collapse
11. Setup a device tree:
Download the device tree and extract files and folders inside <something>-master folder in archive to /CM10.1/android/system/device/manufacturer/codename (you will need to manually create folders)
Click to expand...
Click to collapse
12. Setup a kernel source:
Download the kernel source and extract files and folders inside <something>-master folder in archive to /CM10.1/android/system/kernel/manufacturer/codename (you will need to manually create folders)
Click to expand...
Click to collapse
13. If you are building for older device you will probably need to add display legacy support, as it's dropped in CM10.1:
Download the legacy display zip and extract files and folders inside android_hardware_qcom_display-legacy-cm-10.1 folder in archive to /CM10.1/android/system/hardware/qcom/display-legacy folder (you will need to manually create folder)
Click to expand...
Click to collapse
14, If you are building qualcomm (msm) device, apply singleton.h patch
Type in Terminal:
cd ~/CM10.1/android/system/frameworks/native
git fetch http ://review.cyanogenmod.org/CyanogenMod/android_frameworks_native/refs/changes/69/30269/1 && git format-patch -1 --stdout FETCH_HEAD
(delete space between http and :
Click to expand...
Click to collapse
15. Start compiling bulid!
. build/envsetup.sh
brunch cm_codename-userdebug -jX
X is a number of your CPU cores + 1 or 2
Click to expand...
Click to collapse
Your bulid will be located at /CM10.1/android/system/out as cm-10.1-year/month/date-UNOFFICIAL-codename.zip
If I missed something, feel free to report!
Hardware Requirments and using SWAP Memory​
Compiling uses alot of CPU power, but when you run out of RAM memory, you will get "Killed." error. No, you dont need to buy more RAM. You can use SWAP. Quickest and easiest way is to format USB drive to linux-swap and enable SWAP.
Less than 4GB of RAM - You will need SWAP
4GB - Just enough, but if you want to do something other on PC during compiling, its recommemend to make SWAP, just in case.
More than 4GB - You dont need SWAP.
1. Optionally, Copy your USB files to PC as a backup.
2. Go to GParted (preinstalled on Ubuntu)
3. Right-click on your USB drive -> Format -> linux-swap
4. Right-click on your USB drive -> Swap-on
5. Done!
After you are done right-click on your USB drive -> Swap-off, reformat your partition to FAT32 or NTFS and restore data you copied before (if you have any)
CyanogenMod Source and Device Tree basics​
Basic source folders:
/packages - apps
/frameworks - framework (UI look)
/kernel - kernel source folder when using inline kernel buliding (can be changed in BoardConfig.mk, and I'm going to explain that later in this post)
/device - device config
/hardware - drivers for display. audio etc...
What is BoardConfig?
It's a file where you setup pathes to files and enable/disable stuff, its very easy to understand - https://github.com/sakindia123/cm10.1_htc_pico/blob/master/BoardConfig.mk
--
How to use prebulit kernel:
1. Unpack boot.img using boot image tools (check sakindia123's compiling tutorial for step-by-step unpacking boot.img)
2. Rename zimage to 'kernel'
3. Put it in any folder u like you like (example: /prebulitkernel)
4. In BoardConfig.mk add this:
TARGET_PREBUILT_KERNEL := /prebulitkernel/kernel
and comment out these lines:
TARGET_KERNEL_SOURCE := kernel/htc/pico
TARGET_KERNEL_CONFIG := pico_defconfig
TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.4.3
Click to expand...
Click to collapse
5. Done!
--
How to remove ringtones, video editor, CM wallpapers from bulid:
1. Go to device/releasetools/extras.txt
2. Delete anything you don't want/doesn't need. So easy
--
Where are "bulid.prop tweaks"?
bulid.prop settings is located in device/system.prop
--
What is pico.mk?
In pico.mk (device/pico.mk) you can:
- define what libs (drivers) will be compiled (PRODUCT_PACKAGES)
- add prebulits (PRODUCT_COPY_FILES)
you add them in format: path-to-file-in-source: path-to file in compiled bulid (zip),
example: device/htc/pico/prebuilt/etc/media_codecs.xml:system/etc/media_codecs.xml
- change some usb settings (ADDITIONAL_DEFAULT_PROPERTIES)
- play with some "misc" settings (PRODUCT_PROPERTY_OVERRIDES)
- Set default resolution (PRODUCT_AAPT_CONFIG := ... and PRODUCT_AAPT_PREF_CONFIG := ...)
I'm not an expert, If I made some mistake, feel free to report, or tell if you have something interesting I can add!
FAQ
Frequently asked questions​
Q: What's the repository size?
A: CM9 - 4.9GB
CM10 - 9.6GB
CM10.1 - cca. 16GB
Q: Can I compile any other ROM than CyanogenMod with this tutorial?
A: Yes, you will need to, of course, repo init other repo, and maybe change few things in device tree, and probably you can skip part with adding legacy display and patching singleton.
Q: I have "_____ command not found error."
A: Make sure you done all steps, are you in right directory, and did you downloaded all packages.
Q: I have "Killed." error during compiling.
A: Check if you met have enough RAM (read 2nd post of this thread)
Q: I have any other error during compiling
A: Post your problem on this thread
Re: [TUT][REMAKE] Compile CyanogenMod from source
Nice work bro...
Sent from my Nexus 7
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
Great work bro, very helpfull! :thumbup:
Sent from my HTC Explorer A310e using xda app-developers app
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
Cm10 will complile on 32 bit system?
Sent from my HTC Explorer A310e using xda app-developers app
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
wmapt said:
Cm10 will complile on 32 bit system?
Sent from my HTC Explorer A310e using xda app-developers app
Click to expand...
Click to collapse
no rom will compile on 32 bit system... you can only compile kernels on 32 bit systems..
Sent from my Nexus 7
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
Awesome work bro. Glued to this thread. BTW ICS and higher require 64 bit right ?
Sent from my HTC Explorer A310e using xda app-developers app
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
akshat.shenoy said:
Awesome work bro. Glued to this thread. BTW ICS and higher require 64 bit right ?
Sent from my HTC Explorer A310e using xda app-developers app
Click to expand...
Click to collapse
Tnx. AFAIK Yes.
Sent from a chocolate cake.
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
+1 brooo,
How much size of the stuffs like repository and other things u mention to download in various steps....based on that I can manage to download.....
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
galaxyfreak said:
Hey guys, I know there is already a tutorial about compiling CyanogenMod by sakindia123 but it requires basic Linux knowdlegde and he missed some things. I wrote this tutorial very detailed and simple.
Before we start, I would like to thank these guys:
sakindia123, derefas, lirokoa, cute_prince - for amazing work on CM7-10.1 and Kernel 3.0
Nihar G. and bhargz16 that never refused to help me
Lets assume you are new in Linux world and you just installed a fresh Ubuntu installation.
I will use:
- Ubuntu 12.10 64bit
- CyanogenMod 10.1 (sakindia123 device tree) - because its newest, and currently WIP, so its exciting to get new bulid with something fixed before release!
- Kernel 3.0.16 for Pico (sakindia123 github tree)
Lets get it started.
1. Open the Terminal (Unity Dash Search, just type terminal and hit enter)
2. Get rid of administrator permissions ****.
Type:
3. Install a needed packages:
4. Download a Google Repo tool. Type these commands:
5. Reboot your computer.
6. Initalize the CyanogenMod 10.1 repository:
7. Start source downloading (repository syncing):
9. Get Terminal Emulator prebulit APK:
10. Setup a vendor tree:
11. Setup a device tree:
12. Setup a kernel source:
13. Add display legacy support, as it's dropped in CM10.1:
14. Start compiling bulid!
Your bulid will be located at /android/out as cm-10.1-year/month/date-UNOFFICIAL-pico.zip
If I missed something, feel free to report!
Click to expand...
Click to collapse
Plzz provide link to download Ubuntu n every single thing required to compile then it will be noon friendly
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
abhiparmar92 said:
+1 brooo,
How much size of the stuffs like repository and other things u mention to download in various steps....based on that I can manage to download.....
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
the sources all vary in size... Ics sources are generally limited anywhere upto 10gb.. Cm9 is 4. 9..
Cm10 onwards, the source sizes go upto 15 gb...
Sent from my Nexus 7
---------- Post added at 10:04 AM ---------- Previous post was at 10:03 AM ----------
maxy! said:
Plzz provide link to download Ubuntu n every single thing required to compile then it will be noon friendly
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
i dont think it was meant to be noob friendly..
But anyways, you can dowload ubuntu over ar ubuntu.com..
whichever version you download, just make sure its 64 bit..
Sent from my Nexus 7
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
Really gr8 work bro !!!
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
bhargz16 said:
the sources all vary in size... Ics sources are generally limited anywhere upto 10gb.. Cm9 is 4. 9..
Cm10 onwards, the source sizes go upto 15 gb...
Sent from my Nexus 7
---------- Post added at 10:04 AM ---------- Previous post was at 10:03 AM ----------
i dont think it was meant to be noob friendly..
But anyways, you can dowload ubuntu over ar ubuntu.com..
whichever version you download, just make sure its 64 bit..
Sent from my Nexus 7
Click to expand...
Click to collapse
Not necessarily my friend i read somewhere 32 bit can also be used but will req a little more things to do the same job
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
immortal_yash said:
Not necessarily my friend i read somewhere 32 bit can also be used but will req a little more things to do the same job
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
but thats only for upto froyo.. For gb and above, 32 bit cant handle it..
Sent from my Nexus 7
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
bhargz16 said:
but thats only for upto froyo.. For gb and above, 32 bit cant handle it..
Sent from my Nexus 7
Click to expand...
Click to collapse
Dude i was building mini cm 9 on Ubuntu 11.10 32 bit and everything worked except when there was a motherboard failure
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
immortal_yash said:
Dude i was building mini cm 9 on Ubuntu 11.10 32 bit and everything worked except when there was a motherboard failure
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
hmmmm... Thats weird..
Coz google themselves recommend 64 bit for gb n above
Sent from my Nexus 7
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
bhargz16 said:
hmmmm... Thats weird..
Coz google themselves recommend 64 bit for gb n above
Sent from my Nexus 7
Click to expand...
Click to collapse
They recommend but we can use 32 bit as well just a little more downloading will be req
Sent from my HTC Explorer A310e using xda premium
Re: [TUT][REMAKE] Compile CyanogenMod from source - Very detailed and noob friendly
immortal_yash said:
They recommend but we can use 32 bit as well just a little more downloading will be req
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
i've never tried 32 for rom compiling..
Get that info here.. So op can add it..
Sent from my Nexus 7

[wip] mtk6577 alps sources and kitkat dev

first off all i dont know where to start such thread so moderate can move it to whatever place they thought of
now i had some good news and not some good news
good news is i had found complete mtk sources and compiled rom out of it succesfully
and not so good news is
sources are of 4.1.2 and im new to this so i need developers help
i'm posting the steps that i had followed for compiling
DOWNLOAD
1. download and install ubuntu if not installed already
2. download sources http://pan.baidu.com/wap/link?uk=2869617224&shareid=4195729301&third=0
3. download jdk-6u29-linux-x64.bin (this worked for me)
SETTING UP MACHINE
1. open terminal and type
2.
Code:
sudo apt-get install flex bison gperf build-essential curl zlib1g-dev g++-multilib g++-4.4-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z1-dev wine mingw32 tofrodos libxml2-utils
3. after it finishes installation of required pakages type
Code:
cd /usr/bin
sudo mv gcc gcc.bak
sudo ln -s gcc-4.4 gcc
sudo mv g++ g++.bak
sudo ln -s g++-4.4 g++
4. now setup java change to directory where jdk-6u29-linux-x64.bin resides and extract using
Code:
./jdk-6u29-linux-x64.bin
cammand in terminal
make sure permission of jdk-6u29-linux-x64.bin is executable
5. type following in terminal
Code:
gedit ~/.bashrc
and following lines to bashrc in gedit
Code:
#java Settings
export JAVA_HOME=~/toolchain/jdk1.6.0_29
export JRE_HOME=JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
make sure to setup up path correctly in my case java is exracted in toolchain folder yours may differ
6 type follwing in terminal
Code:
sudo mv /bin/sh /bin/sh.bak
sudo ln -s /bin/bash /bin/sh
BUILDING ROM
1. extract sources( in my case in alps folder at home)
2. open mbldenv.sh in root directory of extracted folder and edit java path as done before
3. open terminal emulator
and type
Code:
./mk -h for all commands
and type
Code:
./mk -o=TARGET_BUILD_VARIANT=user mbk77_tb_jb n
(for a complete new build of mbk77_tb_jb project)
###########################################################
now i request all developers to colabrate and make kitkat possible
im trying my bit but new to all this and mtk sources are complete mess
if you got any problem or error im here to help to best of my possibilities
screenshot of out folder and generated build.prop is attached
and dont ask me to upload anything as my net speed is slow it takes 7 days to download sources
Great Initiative Buddy
All the best :good:
got all imgs compiled without any errors ??
Sent from my XOLO A700 using Tapatalk
AnoopKumar said:
got all imgs compiled without any errors ??
Sent from my XOLO A700 using Tapatalk
Click to expand...
Click to collapse
Yes buddy no error sources are complete but a big mess too
Sent from my NeXus using xda app-developers app
I don'y have the device but my neighbour has since i can't use his phone all day i can just help by making device tree for CM11 and try and add patches which were made for MT6589
I an not sure if this can work the only thing is @bindassdost you sync the sources and try we can make a organisation on Github and submit the patches
GuneetAtwal said:
I don'y have the device but my neighbour has since i can't use his phone all day i can just help by making device tree for CM11 and try and add patches which were made for MT6589
I an not sure if this can work the only thing is @bindassdost you sync the sources and try we can make a organisation on Github and submit the patches
Click to expand...
Click to collapse
brother i cant sync sources my net is slow (256kbps) only it took me 7 days to download 2.7gb compressed souorces i dont know how long it will take to sync 9gb sources to github thats why i wrote everything that i did so that someone with good speed do the task
thats the reson i cant procede further as cm sources are also huge arround 10gb but i can help if someone else do this
bindassdost said:
brother i cant sync sources my net is slow (256kbps) only it took me 7 days to download 2.7gb compressed souorces i dont know how long it will take to sync 9gb sources to github thats why i wrote everything that i did so that someone with good speed do the task
thats the reson i cant procede further as cm sources are also huge arround 10gb but i can help if someone else do this
Click to expand...
Click to collapse
GuneetAtwal said:
I don'y have the device but my neighbour has since i can't use his phone all day i can just help by making device tree for CM11 and try and add patches which were made for MT6589
I an not sure if this can work the only thing is @bindassdost you sync the sources and try we can make a organisation on Github and submit the patches
Click to expand...
Click to collapse
i can help u with that i have downloaded the synced sources..and will upload if the phone boots up...
i am just thing of how to build it as it is not supported...
just help me with that and the recovery which will reqire selinux..
,[email protected]
also i have cloned the kernal sources of your bindassboost..is it ok..i did not have any other souces of kernal..
well my cm 11 sorce downloading is complete around 13.54 gb..
plus my net speed is 2 mbps..
Avenger4droid said:
i can help u with that i have downloaded the synced sources..and will upload if the phone boots up...
i am just thing of how to build it as it is not supported...
just help me with that and the recovery which will reqire selinux..
,[email protected]
also i have cloned the kernal sources of your bindassboost..is it ok..i did not have any other souces of kernal..
well my cm 11 sorce downloading is complete around 13.54 gb..
plus my net speed is 2 mbps..
Click to expand...
Click to collapse
First try the build output coming from these sources as they will be 4.1.2 so you don't require any special Recovery for now so try that
GuneetAtwal said:
First try the build output coming from these sources as they will be 4.1.2 so you don't require any special Recovery for now so try that
Click to expand...
Click to collapse
i havent made the output file yet...
cause i dont know..
i have cloned the sources ....but i m confused how to build ???
is there a folder called "protect" in "source/mediatek/"
Sent from my XOLO A700 using Tapatalk
probably yes...cause i had one when i downloaded the sources...
also is there a vender folder in mediatek...???
So now Can WE Expect Kitkat For CAnvas2 ... Don't know When Micromax Gonna Release It .. @bindassdost
I think these are MT8377 sources :/
Can't work on it without a device to test.
Sent from my C2105 using Tapatalk
varun.chitre15 said:
Can't work on it without a device to test.
Sent from my C2105 using Tapatalk
Click to expand...
Click to collapse
Hi sir, its good to see you back.....:victory:if you are sure(i mean undertaking cm development) we shall start a fundraiser thread if you wish to have a device
varun.chitre15 said:
Can't work on it without a device to test.
Sent from my C2105 using Tapatalk
Click to expand...
Click to collapse
Nice See You varun.chitre15 Buddy........
hello sir..
varun.chitre15 said:
Can't work on it without a device to test.
Sent from my C2105 using Tapatalk
Click to expand...
Click to collapse
thank you sir for returning sir...i am very grateful to you...
i have downloaded cm 11 sources and also made the evironment for developing...
all i need is ur help to compile it as i dont have complete device trees..and kernal sources...
also i have not made cm for unsupported device..
your help is very important and gratefull to me..
regards
Avenger4droid
Avenger4droid said:
thank you sir for returning sir...i am very grateful to you...
i have downloaded cm 11 sources and also made the evironment for developing...
all i need is ur help to compile it as i dont have complete device trees..and kernal sources...
also i have not made cm for unsupported device..
your help is very important and gratefull to me..
regards
Avenger4droid
Click to expand...
Click to collapse
tHATS fANTASTIC bROTHER... =
bindassdost said:
(...)
good news is i had found complete mtk sources and compiled rom out of it succesfully
(...)
Click to expand...
Click to collapse
Hi
You do know that those sources aren't for MT6577 ?
They are for MT8377, a Tablet SoC , and there are a lot of diffs between MT6577 and MT8377 (mainly GPU; max RES; etc, etc )
So, just imagine the mess it would be, by working on some sources that aren't exaclly for your SoC.
Even with full sources for MT6589, the CM Builds required alot of work, and the build status are still WIP. And with a lot of things to be fixed...
B.Regards
Check these sources
mxrootrom.blogspot.in/2014/02/mediatek-mtk-kernel-source-code-leaked.html?m=1
Sent from my MICROMAX CANVAS 2 using XDA Premium 4 mobile app

Kernel compilation error

almost compiled but one error????
make[1]: Nothing to be done for 'dtbs'
any solution...
and
zImage is not there. only "Image" and "Image.gz" present there
is "Image" is zImage? how to check that??
Thank you..
kernel source - Xiaomi mi4i official source
toolchain- NDK version 4.9
Ubuntu 64 bit?
[email protected] said:
OP
Click to expand...
Click to collapse
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
faizauthar12 said:
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
Click to expand...
Click to collapse
Yeah what he said. Checkout these repos if you need to compile a kernel:
http://gitlab.com/webhaikal/SenseiFerrari
http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari
haikalizz said:
Yeah what he said. Checkout these repos if you need to compile a kernel:
[url]http://gitlab.com/webhaikal/SenseiFerrari[/URL]
[url]http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari[/URL]
Click to expand...
Click to collapse
yeah i gone through your sensie kernel repo and found that i have to use dtbToolCM to make boot.img so i did it and stuck here...
DTB combiner:
Input directory: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/'
Output file: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dt.img'
Searching subdir: /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/include/ ...
=> Found 0 unique DTB(s)
as i have read various threads but can not able to fix this. i have used dtbToolCm and dtbtool (version -3 and -2) also same result..
Really i should had not start making my first kernel with MI...
or it will make me learn more and more..
hahahaha:silly:
the easy steps to make a new kernel
use the entirely CM source code
then just type "make bootimage"

Categories

Resources