[Guide][Noob-Friendly]Building Kernel For Lenovo A6000/+ - Lenovo A6000/Plus Guides, News, & Discussion

Building A Kernel For A6k​
Hello Folks, Looks like A6000 Forums Are On Fire So Now I AM HErE TO POuR Oil In The FIRE
Lets Get Straight To The POint
This Guide Will Help you build a kernel for our little Precious One
Requirements:
Ubuntu[DOnt Ask How]
Required Libs like libncurses, and stuff [If you face any such error realted to libs, just google Once]
Good Internet
AT least 2GB RAM and a good processor
A bit of your time
Patience and brain
Steps:
1) Create A folder anywhere with any name you want and open it
2) Open terminal in that folder and Run This COmmand Which will install all required Libs
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
3)After It gets done now we need a toolchain so now type " mkdir kernel" and "cd kernel" without quotes
4) Now we will dload toolchain so first install GIT and GCC libs for ex
"sudo apt get-install git"
Now Run This to clone the toolchain
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
5)After toolchain gets downloaded now we need kernel sources, to simplify it clone the sources from my GIT using this command in terminal
Code:
git clone https://github.com/varunhardgamer/kernel_lenovo_a6000.git
6)After Dloading kernel sources open the kernel sources folder which may have name Semar Kernel or something like that and open BuildingKernel.txt and understand the way you need to edit Build.sh
Its not hard you just need to type the address to your kernel folder which you made
7)Now type
Code:
make ARCH=arm
and press enter
8)Then RUn
Code:
make wt86518_defconfig
9)THen Run
Code:
make menuconfig
and a popup will appear showing you all the tweaks that can be included in the kernel, select accordingly and save it
10)After you Finish tweaking it, open build.sh and edit it acordingly and then run the script by " .build.sh " in the terminal and wait till you get the zimage which is the kernel
8)Now download semar kernel r5zip and push your zimage inside it and flash your first Kernel
COmment here if you face any Errrors
Kernel Source _ https://github.com/varunhardgamer/kernel_lenovo_a6000
Credits to-
Me
Mr.AW
@3lambda
Orata
@mshoaib7
@dev_harsh1998
and XDA Forums

Reserved
Link To the original Thread
https://forum.xda-developers.com/android/software/guide-easy-kernel-building-tutorial-t3581057
Thanks To @3lambda
[Really THanks Man]

Just In Case

DualBoot Coming Soon By The WAy
The MErc With A MouTh is Back

The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998

dev_harsh1998 said:
The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998
Click to expand...
Click to collapse
Ok but the build.sh that i have mentioned will have to be edited again
Oh man
OK wait

Some Modifications To the guide will be done by tomorrow

No worries you doing good work

dev_harsh1998 said:
No worries you doing good work
Click to expand...
Click to collapse
Thanks Limit DOne
WIll thanks Tomorrow

You need to edit build.sh
Change -j64 to -j4 or it'll mess up for everyone.
---------- Post added at 05:02 PM ---------- Previous post was at 05:02 PM ----------
dev_harsh1998 said:
The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998
Click to expand...
Click to collapse
+1
Use this kernel it's updated nd better.

Has.007 said:
You need to edit build.sh
Change -j64 to -j4 or it'll mess up for everyone.
---------- Post added at 05:02 PM ---------- Previous post was at 05:02 PM ----------
+1
Use this kernel it's updated nd better.
Click to expand...
Click to collapse
Oh Thanks for pointing that 64 out:good:
Thanks

The Hard Gamer said:
Oh Thanks for pointing that 64 out:good:
Thanks
Click to expand...
Click to collapse
Welcome. Keep up the good work. :good:

Lol, just rechecked your git.
The kernel will not compile. You need to define the toolchain.

Has.007 said:
Lol, just rechecked your git.
The kernel will not compile. You need to define the toolchain.
Click to expand...
Click to collapse
I myself used this method and compiled a kernel
And for toolchain
I already mentioned
export cross_compile in .sh

The Hard Gamer said:
I myself used this method and compiled a kernel
And for toolchain
I already mentioned
export cross_compile in .sh
Click to expand...
Click to collapse
bad command practise..

is it work for any version of Android? currently I'm using RR 5.8.2

hayatnas18 said:
is it work for any version of Android? currently I'm using RR 5.8.2
Click to expand...
Click to collapse
Wait till i update the guide again

Related

[Devs only] X10 Froyo AOSP / CM6 Sources / cm6 build tutorial Released !

this is a devs only thread , i am working now on froyo aosp sources all dev can join and help ,
thes sources is almost donne but need some fixes and optimisations , you can pm me , y will responce all dev request message
or write heare , so ther is :
i taked as base the , Freex10 sources by Zdzihu
and AOSP 2.3.3 freexperia project sources structure by Jerpelea
link for release download is on 2nd post
** tutorial to make a build environement for cm6 ** check the 3rd post
any dev's willing to contribute can join on : https://github.com/Achotjan/FreeXperia
cheers
Achotjan
if you are not a developper and you like my work do not write " thanks" just put the thanks button but if you are dev you can put it to
you can also Donate : http://forum.xda-developers.com/dona....php?u=2482775
---- Releases -----
** UPDATE ** !
AOSP and CM6.2.0 Compleated sources check my github repo :
AOSP : https://github.com/Achotjan/FreeXperia/tree/master/Froyo_AOSP
CM6 : https://github.com/Achotjan/FreeXperia/tree/master/android-CM6
--- OLD ---
almost compleat and working sources AOSP / CM6.1.3 :
FreeXperia Project Achotjan_2.2.1_froyo_AOSP_sources_2nd_release : http://www.mediafire.com/?ct91eqj53em5195
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FreeXperia Project Achotjan_2.2.1_CM6.1.3_sources_release : http://www.mediafire.com/?9d365k4a95qeaix
1st release AOSP only :
FreeXperia Project Achotjan_2.2.1_froyo_AOSP_sources : http://www.mediafire.com/?hgibxu7z1ifzlzn big thanks to Jerpelea for the help !
thes source is almoste donne just need some correction
cheers
Achotjan
---- cm6 build environement tutorial ----
to start making the cm6 build environement you need
open the terminal and use this commend :
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
Click to expand...
Click to collapse
### Create the Directories ###
# You will need to set up some directories in your build environment.
# To create them:
# use the folowing commands without the :
mkdir -p ~/bin
Click to expand...
Click to collapse
# then :
mkdir -p ~/cm6
Click to expand...
Click to collapse
#after that Install the Repository , Enter this commend to download the "repo" binary:
curl http://android.git.kernel.org/repo > ~/bin/repo
Click to expand...
Click to collapse
# then:
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
# after that use this command :
cd ~/cm6
Click to expand...
Click to collapse
# then :
[QUOTE repo init -u git://github.com/CyanogenMod/android.git -b froyo-stable[/QUOTE]
# after that just use this :
repo sync -j16
Click to expand...
Click to collapse
# if sync -j16 have this error : #### error: Cannot fetch CyanogenMod/android_device_harmony ####
just edit the .repo/manifest.xml and search and remove this line :
###########################################################################################################################
<project path="device/nvidia/harmony" name="CyanogenMod/android_device_harmony" remote="github" revision="froyo-stable" />
###########################################################################################################################
Click to expand...
Click to collapse
### ( if you not see the .repo directory in your build-environement , is cause "." files are hiden if you using ubuntu then you need to make the hiddedn files visible) ###
# then again :
sync -j16
Click to expand...
Click to collapse
### if sync -j16 have another error like this: #### error: Cannot fetch CyanogenMod/android_device_advent_vega ####
just edit the .repo/manifest.xml and search and remove also this line :
#####################################################################################################################
<project path="device/advent/vega" name="CyanogenMod/android_device_advent_vega" remote="github" revision="master" />
#####################################################################################################################
Click to expand...
Click to collapse
# then again :
sync -j16
Click to expand...
Click to collapse
### if sync -j16 have another error like this: ##error: revision master in CyanogenMod/android_device_motorola_morrison not found###
just edit the .repo/manifest.xml and search and remove also this line :
###################################################################################################################################
<project path="device/motorola/morrison" name="CyanogenMod/android_device_motorola_morrison" remote="github" revision="master" />
###################################################################################################################################
Click to expand...
Click to collapse
# then finaly :
sync -j16
Click to expand...
Click to collapse
# after the sync succesfully compleat copy device and vendor folder also build folder to the build environement and merge all .
and just after use this commend :
. build/envsetup.sh
Click to expand...
Click to collapse
# then this :
lunch full_x10-eng
Click to expand...
Click to collapse
you will got thath
##################################################################################################################################
Which would you like? [generic-eng] lunch full_x10-eng
build/core/product_config.mk:190: *** _nic.PRODUCTS.[[vendor/cyanogen/products/cyanogen_harmony.mk]]: "device/nvidia/harmony/device_harmony.mk" does not exist. Arrêt.
** Don't have a product spec for: 'lunch full_x10'
** Do you have the right repo manifest?
##################################################################################################################################
Click to expand...
Click to collapse
now just remove vendor/cyanogen folder
# and again :
lunch full_x10-eng
Click to expand...
Click to collapse
and finaly build it with this
make -j5
Click to expand...
Click to collapse
all this problem heare , have one reason cyanogenmod repo are defectues so nothink bad we build for x10 so motorol devices or any device files is not an issue to compile it
cheers
Achotjan
Devs needed to compleat the work
whole source reviewd , now we need to rewrite the device and vendor folder , now
devs needed to compleat the work who want to joint pleas pm me or write heare
waiting you to start , we have one objective rewrite the whole source after make it usable
to have a stable source and after that work on camera missing functionallity and more
sources are still not added in github , waiting to have somethink usable befor put it in
cheers
Achotjan
is acer liquid sources usable!cause all x10 sources can be found in no other place than Xda by Z
KInG GaME said:
is acer liquid sources usable!cause all x10 sources can be found in no other place than Xda by Z
Click to expand...
Click to collapse
no is not usable at all we have android sources and cm6 sources but now we need to add specified files for x10 , sources by Z is usable but not compleat but i dont want to compleat it i want to rewrite a new froyo sources for x10 and taking as base the sources from Z, i still waiting dev who can join , no one ?
cheers
Achotjan
--------------------------------------------------------------------------------------------------------------------------------------------------------------
2nd post updated test it and all devs can join is almost done just some part need to be rewriten or to be fixed
link : http://www.mediafire.com/?hgibxu7z1ifzlzn
--------------------------------------------------------------------------------------------------------------------------------------------------------------
cheers
Achotjan
What still needs fixing?
achotjan said:
--------------------------------------------------------------------------------------------------------------------------------------------------------------
2nd post updated test it and all devs can join is almost done just some part need to be rewriten or to be fixed
link : http://www.mediafire.com/?hgibxu7z1ifzlzn
--------------------------------------------------------------------------------------------------------------------------------------------------------------
cheers
Achotjan
Click to expand...
Click to collapse
Sent from my X10project using XDA App
Nice work achotjan!
rdannar said:
What still needs fixing?
Sent from my X10project using XDA App
Click to expand...
Click to collapse
i will always put compilation error and files name who need to be fixed see the 3em post you will se also 2 litle error like this but is verry progressed
will also upload the full android froyo 2.2 sources on mediafire and put the link on 1st post for who havent it
cheers
Achotjan
dude why arent u setting up a GITHUB repo?
or add it to FreeXperia repo?
DooMLoRD said:
dude why arent u setting up a GITHUB repo?
or add it to FreeXperia repo?
Click to expand...
Click to collapse
already asked J for it he accepted but y never used github and can say i am like a noob , dont know how put it in
if you can help pm me this will be nice
cheers
Achotjan
achotjan said:
already asked J for it he accepted but y never used github and can say i am like a noob , dont know how put it in
if you can help pm me this will be nice
cheers
Achotjan
Click to expand...
Click to collapse
sorry buddy i too dont know who to use it properly... but i hear its great for devs to share work with each other and keep track of changes...
---- sources added on github ! -----
---- sources added on github ! -----
https://github.com/Achotjan/FreeXperia
will put all the work on github we have a working sources now , thanks Jerpelea and Zdzihu for ther help
cheers
Achotjan
2nd release of working sources released check out the 2nd post for the link , github is not updated yet
cheers
Achotjan[/QUOTE]
for all the peapole wantink to build
cm6 build environement tutorial aded on the 3rd post
cheers
Achotjan
X10 CM6.1.3 sources added on 2nd post !
almost compleat need some fixes
cheers
Achotjan
achotjan said:
X10 CM6.1.3 sources added on 2nd post !
almost compleat need some fixes
cheers
Achotjan
Click to expand...
Click to collapse
GREAT WORK!!!
btw could u get that GB screen-off animation integrated?
DooMLoRD said:
GREAT WORK!!!
btw could u get that GB screen-off animation integrated?
Click to expand...
Click to collapse
already inclueded
cheers
Achotjan

[TUTORIAL] Build 4.0.2.A.0.42 kernel with 2 way recording patch on neo

Hello everyone, I just want to share my experience about building kernel with 2 way recording patch. I hope some newbie (like me) can custom his/her phone. I've tested and it works OK on my phone with call recorder software. I hope some other custom kernels on this forum will include this feature soon.
- Dowload and install Sourcery G++ Lite 2009q1-161 https://sourcery.mentor.com/sgpp/lite/arm/portal/release1294 to build kernel like the tutorial on http://developer.sonyericsson.com/wp/2011/05/06/how-to-build-a-linux-kernel
- Download rom source 4.0.2.A.0.42.tar.bz2 from http://developer.sonyericsson.com/wportal/devworld/downloads/download/402a042tarbz2?cc=gb&lc=en
- Extract 4.0.2.A.0.42.tar.bz2: sudo tar -xvjf 4.0.2.A.0.42.tar.bz2
- Go to kernel directory: cd /../kernel
- Download sonyericsson_4_0_2_A_0_42.patch and vocpcm.c from http://code.google.com/p/2-way-call-recording/source/browse/patches/
- Copy vocpcm.c to /../kernel/arch/arm/mach-msm/qdsp5v2
- Copy sonyericsson_4_0_2_A_0_42.patch to /../kernel/
- Appy patch: sudo patch -p0 -b -r - -i sonyericsson_4_0_2_A_0_42.patch
- Configure kernel: ARCH=arm CROSS_COMPILE=/../Sourcery_G++_Lite/bin/arm-none-eabi- make semc_hallon_defconfig
- Build kernel: ARCH=arm CROSS_COMPILE=/../Sourcery_G++_Lite/bin/arm-none-eabi- make
- Getting a RAM disk, assembling the boot.img, flashing like the tutorial from http://developer.sonyericsson.com
Enjoy it!
nmdang
Cool kernel what features you added apart from 2 way record
People there is a kernel at the bottom don't think anyone noticed
Plus ad your own splash
Sent from my MT15i using Tapatalk
You do have WiFi working with your kernel ? If yes, how did you do ?
I see no compiling modules instructions in your post..
PS: My kernel has 2WCR support.
nmdang said:
Hello everyone, I just want to share my experience about building kernel with 2 way recording patch. I hope some newbie (like me) can custom his/her phone. I've tested and it works OK on my phone with call recorder software. I hope some other custom kernels on this forum will include this feature soon.
- Dowload and install Sourcery G++ Lite 2009q1-161 https://sourcery.mentor.com/sgpp/lite/arm/portal/release1294 to build kernel like the tutorial on http://developer.sonyericsson.com/wp/2011/05/06/how-to-build-a-linux-kernel
- Download rom source 4.0.2.A.0.42.tar.bz2 from http://developer.sonyericsson.com/wportal/devworld/downloads/download/402a042tarbz2?cc=gb&lc=en
- Extract 4.0.2.A.0.42.tar.bz2: sudo tar -xvjf 4.0.2.A.0.42.tar.bz2
- Go to kernel directory: cd /../kernel
- Download sonyericsson_4_0_2_A_0_42.patch and vocpcm.c from http://code.google.com/p/2-way-call-recording/source/browse/patches/
- Copy vocpcm.c to /../kernel/arch/arm/mach-msm/qdsp5v2
- Copy sonyericsson_4_0_2_A_0_42.patch to /../kernel/
- Appy patch: sudo patch -p0 -b -r - -i sonyericsson_4_0_2_A_0_42.patch
- Configure kernel: ARCH=arm CROSS_COMPILE=/../Sourcery_G++_Lite/bin/arm-none-eabi- make semc_hallon_defconfig
- Build kernel: ARCH=arm CROSS_COMPILE=/../Sourcery_G++_Lite/bin/arm-none-eabi- make
- Getting a RAM disk, assembling the boot.img, flashing like the tutorial from http://developer.sonyericsson.com\
Enjoy it!
nmdang
Click to expand...
Click to collapse
maybe you want to add oc and init.d support also swap ?
can you compile the kernel on windows environment ?
Edit : off topic , did anybody notice that the design on the new xperia phones got reduced to an 'iphone' like clones.....instead of it's usual 'sexyness'
skyboyextreme said:
maybe you want to add oc and init.d support also swap
Click to expand...
Click to collapse
All this is in my kernel plus tons of other things..
Let's hope he knows how to deal with the WiFi.
adridu59 said:
All this is in my kernel plus tons of other things..
Let's hope he knows how to deal with the WiFi.
Click to expand...
Click to collapse
yes man i'm waiting for it to get fixed too
but one important thing did you "pre"-overclock and "pre"-over volt your kernel ?
all i wish for is a stock clocked kernel that just gives the ability to overclock
Edit : why don't you ask inteks how did he make wifi function properly?
skyboyextreme said:
yes man i'm waiting for it to get fixed too
but one important thing did you "pre"-overclock and "pre"-over volt your kernel ?
all i wish for is a stock clocked kernel that just gives the ability to overclock
Edit : why don't you ask inteks how did he make wifi function properly?
Click to expand...
Click to collapse
Default max frequency is 1.0 GHz like stock, voltages are stock too if I recall
Edit: 50mV undervolt to save battery.
Inteks didnt respond.
/spam thread
WiFi working perfectly
Sent from my MT15i using Tapatalk
kormatoes said:
WiFi working perfectly
Sent from my MT15i using Tapatalk
Click to expand...
Click to collapse
great now will the op now kindly please help adridu to complete his kernel
Think has init.d also checking now' no ,huge drain from battery
Sent from my MT15i using xda premium

[TUT] Building your own Xperia Play Kernel

Since We have such a fantastic tutorial on how to build your own CM9, I thought I'd add one for building a kernel.
Edit: updated kernel sources for jellybean
First off:
You NEED Linux. DO NOT TRY THIS ON WINDOWS, IT WON'T WORK.
Sources: https://github.com/CyanogenMod/semc-kernel-msm7x30
https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
https://github.com/DooMLoRD/Xperia-2011-Kernel-2.6.32.9
http://forum.xda-developers.com/showthread.php?t=1556971
http://forum.xda-developers.com/showthread.php?t=1477845
http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/
DooMLoRD, KeiranFTW & Atarii.
Prepping:
1) Grab the toolchain I have here (Android NDK R5b), it's the only one I've been able to use that doesn't throw errors when compiling (stock based kernels): http://db.tt/hE3TmJJi Doom has provided a better toolchain https://github.com/DooMLoRD/android_prebuilt_toolchains[/QUOTE] you can get it using
Code:
git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git -b master <optional_folder_name_you_choose>
(thanks Doom!!)
Building a kernel from fxp sources
1) Terminal for any commands, file explorer for finding stuff & gedit for changes.
2) open up terminal, mkdir <name_you_want> (no spaces)
3) cd <name_you_want>
4) git clone https://github.com/freexperia/semc-kernel-msm-7x30-ics -b ics <optional_name_you_want_the_folder_to_be> (no spaces)
5) cd <optional_name_you_want_the_folder_to_be>/semc-kernel-msm-7x30-ics (if you didn't rename it)
6) (If this is after the first time, and lets say a week has past do this step, otherwise ignore) git pull (automatically updates any files)
7) First important step: Find the defconfig that fxp uses. They are located in arch/arm/config. fxp_zeus_defconfig is the name of theirs
8) copy fxp_zeus_defconfig & rename to <what_you_want_it_named>_zeus_defconfig (for example, mine will be pax_zeus_defconfig)
9) open up your defconfig & put it into another workspace, we'll mess with it later
10) Hop onto DooMLoRD's github, his we'll use for references.
11) Adding governors: https://github.com/DooMLoRD/Xperia-...mmit/bec19001ded34077d7776639834a1229b69e5f87
A1) Well, as I look into this, fxp has a ton of governors not used... (located in <name_of_kernel_folder>/drivers/cpufreq/
A2) Check the Kconfig file to see that they're all in there (they must just not be in the defconfig file)
A3) Edit the deconfig file you created in lines 467-474 removing "#" from any you want to add (and add in any you might've added by adding the line CONFIG_CPU_FREQ_GOV_<NAME_OF_GOVERNOR>=y
A4) If you want to add more governors, check out the Commits from DooMLoRD's build to add in when needed (anytime you see a "+" that means line added, "-" means line deleted)
12) Adding IO Schedulers: https://github.com/DooMLoRD/Xperia-...mmit/0ae625f7561c559d4933284f489733bf5eb66e96
B1) Navigate to <name_of_kernel>/block folder
B2) Once again, FXP has a ton of IO Schedulers added, but not used in Play kernel:
B3) Open up Kconfig.ioshced to make sure they're in there (and add any you want)
B4) Edit the defconfig file you created (lines 121-137) & fix it to your liking (same as above)
B5) If you want to add more, see Doom's commits to add 'em
13) Turning off ALS
C1) Navigate to <name_of_kernel>/arch/arm/mach-msm
C2) Open up board-semc_zeus.c
C3) Search for .als_connected (it on line 1349)
C4) Change the variable from 1 to 0
14) Overclocking
D1) open up arch/arm/mach-msm/acpuclock-7x30.c
D2) Lines 96 - 144 contain the PLL2 table, which is used to set clock speeds, note FXP can go all the way up to 2ghz, they just stop it short.
Continued in post 2 because all of this in one post 20% more awesome than XDA can handle
Pax
Cont'd from post 1
15) Building the Kernel
E1) Save your defconfig file, you'll need it now.
E2) naviage to <name_of_kernel> folder (in terminal)
E3) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_i'll_use_min e_for_example>/home/paxchristos/Android_Source/doom_ndk/arm-eabi-4.4.3//bin/arm-eabi- make <what_you_put_here>_zeus_defconfig
E4) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_from_above>/arm-eabi- make
E5) Sit back and relax (assuming it doesn't throw any errors, if it does, post here & I'll try to help you through them)
16) Getting the ramdisk
F1) Download a working copy of FXP's kernel (either through my zips or fxp zips)
F2) Goto here: http://forum.xda-developers.com/showthread.php?t=1477845, download the xperiaboottools.zip that's attached.
F3) Now what I did (you don't have to) is chmod 755 mkbootimg & split_bootimg.pl & (sudo) cp to /bin for easy calling.
F4) Navagiate in terminal to where you downloaded fxp kernel
F5) mkdir <working_folder>
F6) cp <fxp_kernel> <working_folder>
F7) cd <working folder>
F8) split_bootimg.pl <fxp_kernel>
F9) mkdir ramdisk
F10) cd ramdisk
F11) gzip -dc ../<fxp_kernel>.img-ramdisk.gz | cpio -i
F12) Now you have the ramdisk, let's futz with it.
F13) First (easiest step) is to goto default.prop & change ro.secure=1 to ro.secure=0
F14) That's mainly what we want to do with it, if you want to change the boot image, go here: http://forum.xda-developers.com/showthread.php?t=1494076 for how to do it manually, or here: http://forum.xda-developers.com/showthread.php?t=1513146 for the automatic way.
F15) now that we're done with the ramdisk, we'll go back to terminal
F16) find . | cpio -o -H newc | gzip > ../ramdisk.img
F17) cd ../
17) Putting the ramdisk & kernel together
G1) By now (hopefully) the kernel is done compiling. (time for terminal, you should still be in folder you were above)
G2) cp ~/<folder_you_put_the_kernel_source_in>/arch/arm/boot/zImage ./
G3) mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.img -o <what_you_want_to_name_your_kernel>.img
18) Flashing it for testing.
H1) Keep your copy of FXP's kernel around, just in case any issues happen
H2) fastboot boot <your_kernel>.img
H3) If it boots & works, SUCCESS!! you modified your own custom kernel!
H4) If it doesn't boot (at all, just a vibrate & blank screen for 10-20 seconds) there's a problem with the ramdisk, sometimes it's bad, sometimes is needs filler, overall, it's just a pain in the butt to figure out.
H5) If it boots & bootloops the splash screen, well, that's an issue with the ramdisk again, that possibly, your ramdisk does not match you rom. Recovery, reflash rom & try again.
Courtesy of Atarii reminding me
19) Adding your wifi modules (they get built when you build the kernel) into the ramdisk
I1) Let's pretend that you haven't gotten through step F16, we're gonna add the wifi modules in.
I2) The wifi modules are located in <name_of_kernel_source_folder>/drivers/net/wireless/
I3) Copy bcm4329.ko to ~/ramdisk/working/modules/
I4) Add in the following lines to init.semc.rc
Code:
#load bcm4329 module
insmod /modules/bcm4329.ko
I5) Now your modules will autoload on boot!
Pax
Excellent guide
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Kieran just told me to go to Sony's site. Thanks!
Sent from my R800x using XDA
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
lightningdude said:
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Click to expand...
Click to collapse
Do this in place of #4 (in the guide)
4) git clone https://github.com/freexperia/semc-kernel-msm7x30 -b master <optional_name_you_want_the_folder_to_be>
& You'll get their sources for GB instead of ics
Alternatively, if you wanna do it from SEMC kernel sources,
Download them from: http://developer.sonymobile.com/cws/devworld/technology/opensource un-tar/bzip them & work from kernel/
Phryxus said:
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
Click to expand...
Click to collapse
Here's a better explanation than I can do
bassmadrigal said:
/cut/
The kernel is kinda like the nervous system of the body. It directly interacts with the hardware (which is how it is able to adjust CPU speed) and it is what allows the ROM to function.
The ROM is the rest of the body. Every other aspect of the phone. In fact, most ROMs include custom kernels. Various ROMs give you various features/enhancements/bugfixes. You will probably notice the biggest change in your phone if you load a custom ROM. Most people load the custom kernels to help with battery life as a lot of them allow you to lower the phones minimum processing speed from 245Mhz to 128MHz.
The ROM can change so many different aspects of how the phone works. There is CyanogenMod which is based off of stock Android with a lot of tweaks, bugfixes, and new features added. There is also MIUI, which is similar to the iOS style (not the same, but much closer than stock Android), and then there are a ton others out there.
Click to expand...
Click to collapse
This is an awesome guide, definitely recommend to all, if you're interested in getting into kernel development.
The only thing maybe worth mentioning is where to copy the compiled wifi drivers and modules (governors etc) from, after the kernel has compiled
I'm having a problem at the "Building the Kernel" step. I ran the command, albeit slightly different than you wrote, and got this error:
"make: *** No rule to make target `mjolnir_zeus_defconfig'. Stop."
Do I not have my NDK installed properly, or what?
Edit: Nevermind, was hit by a confusion spell. It's cured, and all is well. At least, for now.
btw, in the future you will want to clone: https://github.com/CyanogenMod/semc-kernel-msm7x30.git
ics branch
But FXP haven't updated kernel in a while, so you could use my CM9 kernel sources if you like: https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
master branch
Difference is, mine is made from pure Sony PLAY beta sources, while FXP use arc beta sources
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
DooMLoRD said:
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
Click to expand...
Click to collapse
+1 to that, I use your arm-eabi-4.4.3 prebuilt
lightningdude said:
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
Click to expand...
Click to collapse
Apparently I was a little premature in my findings. Having a hell of a time with the fxp sources for CM7. For some reason, I just can't get my cpu frequencies to come down from Max. DooMLoRD, what am I missing?
Sent from my R800x using XDA
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
lightningdude said:
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
Click to expand...
Click to collapse
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
KeiranFTW said:
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
Click to expand...
Click to collapse
I'm at work right now, but I'll try when I get home. I plan on doing some digging for the sake of learning, but that's going to wait for the weekend.
Sent from my R800x using XDA
Edit: Thanks Keiran, that worked. Like I said, I'll be poking around some more this weekend, just to see what I can mess with. Too bad I never got this far on my older phones...
looks good! so gonna try this tomorrow to build a cifs.ko module from latest Se source
watching a movies on phone, here I come
Hi great tutorial, but I'm having a problem with the wifi I have tried taking my bcm4329.ko from drivers/net/wireless and flashing it via CWM also tried moving it to system/lib/modules manually on my phone but still can't get it to work. Any idea how to fix this, its the only thing keeping me from using my own kernel
Sent from my Xperia Play using xda premium

[Problem] AOSP Compile Failed - makefile not found.

Hello. I Try Compile AOSP froyo-relase compile but Make doesn't work. :S
I Downloaded All Zip from github/android/ where is froyo-relase and unpack to once folder (screen) and i give it chmod to 777 but after make i see
"Make file not fount. Stop."
What I Doing wrong?
Screen in Attach
cheqolada said:
Hello. I Try Compile AOSP froyo-relase compile but Make doesn't work. :S
I Downloaded All Zip from github/android/ where is froyo-relase and unpack to once folder (screen) and i give it chmod to 777 but after make i see
"Make file not fount. Stop."
What I Doing wrong?
Screen in Attach
Click to expand...
Click to collapse
There should be a Makefile in the root of your source tree, If it's missing , run this command in the source tree root
Code:
echo "include build/core/main.mk" > Makefile
That will probably get you started!
Thanks
Thanks
now i Have problem with compile Android 2.2.3 - I have Java 1.6 but i need 1.5 so i Cant Start Compile . What Now? I Try to install Java 1.5
cheqolada said:
Thanks
now i Have problem with compile Android 2.2.3 - I have Java 1.6 but i need 1.5 so i Cant Start Compile . What Now? I Try to install Java 1.5
Click to expand...
Click to collapse
Looks like it's your lucky day then
This post covers all things Java - http://forum.xda-developers.com/showpost.php?p=26957072&postcount=4
Doesn't hurt to use the search feature either, It's works really well

Z2 cm / kernel compilation - help needed

Hello,
I need the cifs.ko module. As I could not find it and had to read some threads of other users, waiting for help, I decided to compile the module myself.
I followed this instruction: wiki.cyanogenmod.org/w/Build_for_sirius
Unfortunately the command 'breakfast sirius' results in an error - the same with 'lunch'
I hope for your help, as I don't know what to do.
Kind regards,
Tom
Have you added the correct/required repos in your local manifests file? ☺
Sent from my Xperia Z2 using Tapatalk
Mr.R™ said:
Have you added the correct/required repos in your local manifests file? ☺
Sent from my Xperia Z2 using Tapatalk
Click to expand...
Click to collapse
I added the one repo mentioned in the instruction...
-----------------------------
$ cd ~/android/system/
$ repo init -u ...github.com/CyanogenMod/android.git -b cm-11.0
$ repo sync
----------------------------
Is there another repo?
I thought that the command includes the whole cm-11 source.
It does but you need a few more for the kernel n such, I'm not at home so can't provide them but will Monday if you need me too
Sent from my Xperia Z2 using Tapatalk
Mr.R™ said:
It does but you need a few more for the kernel n such, I'm not at home so can't provide them but will Monday if you need me too
Sent from my Xperia Z2 using Tapatalk
Click to expand...
Click to collapse
I read that every build has the manifest - so I extracted it from the last nightly and copied it to .repo/local_manifest/sirius-manifest.xml.
Isn't doing the job... see attachment.
repo also cannot see the .xml file and is telling me that there is a duplicate path - now with the default.xml also?
Any hint why this is happening is appreciated!
If you could give me a working manifest that would be great! :angel:

Categories

Resources