[Q] Building Kernels 101 - Nexus S Q&A, Help & Troubleshooting

Anyone have any information as to where I can go to learn how to build/compile a kernel for my nexus s 4g? Id like to take a feeble stab at it. Thanks!

Here are some guides I used for getting started:
» [How-To] compile the Nexus S kernel from source
» [HOW-TO] Compile AOSP Gingerbread + [ROM] Master AOSP
» Building Kernel from source - CyanogenMod Wiki
Please note that most of the time you cannot just follow the guides verbatim. Just use it as "guidelines" and adapt it to suit your development environment.
Also you should have basic to moderate understanding in Git in order to apply patches/mods to your kernel properly.

Thanks. Almost easier to pay someone, what with being lazy and all.

Yeah, that's what I do now -- using a "tried and tested by community" kernel/ROM is much easier for life.
I think there are enough kernel threads in XDA that you should find one that suits your needs, and you can send a donation to the developer to show you appreciation in his/her work

There are quite a few, yes. Although I want a 'feature from this kernel and a tweak from that kernel'...or 'Id use this one if it didnt have that feature'...so I just sit at stock...

Lol, sounds like a "walk in the middle path" philosophy
That's a good decision though, nowadays instead of spending time compiling my own kernel, I spend as much time in checking the Development forum -- looking for new kernel(s) update everyday. It's kinda addict once you've tried flashing them

Hey Tails,
I am trying to take a stab at compiling my own kernel too. How did it go for you? I am having problems myself.
Sent from my Google Nexus S using Tapatalk

suomaf said:
Hey Tails,
I am trying to take a stab at compiling my own kernel too. How did it go for you? I am having problems myself.
Sent from my Google Nexus S using Tapatalk
Click to expand...
Click to collapse
I completely abandoned my attempts at building kernels. Sorry.
I'll leave it to the vets
Sent from my Nexus S 4G using xda premium

I would also like to give it a go, wonder if there is anyone that can give me advice. I have sync repo but can not for the life of me find where the new kernel sources are.
Sent from my A500 using Tapatalk

suomaf said:
I would sol like to give it a go, winner if there is anyone that can give me advice. I have sync repo but can not for the life of me find where the new kernel sources are.
Sent from my A500 using Tapatalk
Click to expand...
Click to collapse
May be here?

suksit said:
May be here?
Click to expand...
Click to collapse
Thanks for the quick reply, I think I have repo sync'd and also done
Code:
git clone https://android.googlesource.com/kernel/samsung.git
But I end up with an empty directory called samsung with a hidden directory .repo
Is this correct? Is the 3.0 kernel for nexus s somewhere else?

Well I haven't update the kernel sources since kernel.org was down... However, I think this may also be a good starting point.

suksit said:
Well I haven't update the kernel sources since kernel.org was down... However, I think this may also be a good starting point.
Click to expand...
Click to collapse
Thank you very much, will try to git clone https://bitbucket.org/KalimochoAz/samsung-kernel-3.git
---------- Post added at 11:15 AM ---------- Previous post was at 11:01 AM ----------
sigh.. this is hard,
Code:
git clone https://bitbucket.org/KalimochoAz/samsung-kernel-3.git
Cloning into samsung-kernel-3...
error: RPC failed; result=22, HTTP code = 502
fatal: The remote end hung up unexpectedly
I am guessing maybe the server is down or something? because git clone worked for me when testing
git clone git://github.com/git/hello-world.git

suomaf said:
Thanks for the quick reply, I think I have repo sync'd and also done
Code:
git clone https://android.googlesource.com/kernel/samsung.git
But I end up with an empty directory called samsung with a hidden directory .repo
Is this correct? Is the 3.0 kernel for nexus s somewhere else?
Click to expand...
Click to collapse
Just finished cloning samsung.git from googlesource. I suppose the directory name should be .git? If so, from within samsung directory, type the following command:
Code:
git branch -a
This will list all branches in the repository. You should see something like this:
Code:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/android-samsung-2.6.35-gingerbread
remotes/origin/android-samsung-3.0-ics-mr1
remotes/origin/master
If you want the kernel code for ICS (linux 3.0), type the following command:
Code:
git checkout android-samsung-3.0-ics-mr1
This will checkout the code from the corresponding branch name. If things go well, you should see something like this:
Code:
Checking out files: 100% (37465/37465), done.
Branch android-samsung-3.0-ics-mr1 set up to track remote branch android-samsung-3.0-ics-mr1 from origin.
Switched to a new branch 'android-samsung-3.0-ics-mr1'
Git will create a new local branch for you. To see it, just type git branch -a again.
Now it's time to play!

thanks boss,
Really appreciate you taking the time to do this, it was successful. Here I go to brick my nexus S

suomaf said:
thanks boss,
Really appreciate you taking the time to do this, it was successful. Here I go to brick my nexus S
Click to expand...
Click to collapse
lol
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

No bricks so far, but has not been able to get the phone to boot. Did what I think is a default compile then took the ram disk from the phone. The damn thing just wont boot. Does this mean that I will have to compile the whole ics and use that ram disk? or am I just doing it wrong?

suomaf said:
No bricks so far, but has not been able to get the phone to boot. Did what I think is a default compile then took the ram disk from the phone. The damn thing just wont boot. Does this mean that I will have to compile the whole ics and use that ram disk? or am I just doing it wrong?
Click to expand...
Click to collapse
That sounds correct to me. However, I haven't done this for almost a year so I'll just try to recall from my memory =.= Usually the steps should be:
get the boot partition from the phone using dd?
use extract-bootimg.pl to extract the ramdisk
use mkbootimg to create a new boot image from the extracted ramdisk and your zImage
try it with fastboot boot newbootimage.img
Sorry that I couldn't be of more help

You have been great help. Thanks.
Sent from my Google Nexus S using Tapatalk

Just think about another way to do it: AnyKernel
BTW, it's my pleasure helping ppl to brick their phone lol

Related

Ace ICS camera solution (more photos and source)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
First of all, I am from China, my English is poor.
Camera solution:
1.Revert the commit about offset in MemoryHeapBase, make MemoryHeapPmem binary compatible.(commit: f24c4cd0f204068a17f61f1c195ccf140c6c1d67)
2.Add Overlay stub to libui, make libcamera.so symbol compatible
3.Implement a adapter CameraHardwareInterface.h to camera.h
sample implement, this a snapshot of local git repo
all source based on aosp ics-mr1 branch
libcamera.so liboemcamera.so libmmipl.so libmmjpeg.so from 2.36.405.8
I code patch and hal last weekend, but I do not have time to do it better, but it can work.
my git repo github.com/zbwu, but don't include libcamera now.
enjoy~
hello everyone
Now is office hour
I will post the source and detail tonight(GMT +8:00)
Could this work on other devices also? Like the desire s or z?
Sent from my HTC Vision using XDA App
johrie said:
Could this work on other devices also? Like the desire s or z?
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
You can found several libcamera wrapper, for example TwistedUmbrella is working on it, but this problems are HTC specific. I think it can be used in most of HTC devices.
Here's some examples:
E/HAL ( 1207): Cannot load library: link_image[2048]: 1207 could not load needed library 'libcamera.so' for 'camera.default.so' (reloc_library[1384]: 1207 cannot locate '_ZN8SkMatrix10setRotateZEf'...
It's the first test, you can easily pass it with some smart google search
Here's my step:
E/HAL ( 1203): Cannot load library: link_image[1965]: 1203 could not load needed library 'libcamera.so' for 'camera.default.so' (reloc_library[1314]: 1203 cannot locate '_ZN7android7Overlay5setFdEi'...
Here am I, I tried to make a wrapper to overlay::Overlay::* to android::Overlay::*
But i'll w8 for source... It will be faster
frits666 said:
Something like Ndiswrapper used on some Linux distro's???
Click to expand...
Click to collapse
Like gpsshim (https://github.com/CyanogenMod/android_hardware_gpsshim)
I have posted more photos and source
I scale photos in gimp, not edit
zbwu86 said:
I scale photos in gimp, not edit
Click to expand...
Click to collapse
You alone have cured the threads of CQP (Camera questioning plague).
And for that, I commend you.
Someone give this man an OBE.
Regards
Please stop writing Chinese. Thank you!
Errrrrr I just had a quick glimpse of his github, this guy knows what he's doing and is pretty far ahead, everyones better off pulling his git compiling the whole thing and providing it as a rom, reason? youll most likely have wifi teathering aswell, I havent look at everything, but @OP well done!
It's promising, but it's not working me on CM9-KANG, i think, because of overlay (dummy) implementation... Or, I just need a full recompile... Dunno... Tomorrow, i'll try to implement liboverlay, maybe it's working... Anyway, it's a good start...
THANKS!
dh.harald said:
It's promising, but it's not working me on CM9-KANG, i think, because of overlay (dummy) implementation... Or, I just need a full recompile... Dunno... Tomorrow, i'll try to implement liboverlay, maybe it's working... Anyway, it's a good start...
THANKS!
Click to expand...
Click to collapse
You need to pull the whole source code off him
dh.harald said:
It's promising, but it's not working me on CM9-KANG, i think, because of overlay (dummy) implementation... Or, I just need a full recompile... Dunno... Tomorrow, i'll try to implement liboverlay, maybe it's working... Anyway, it's a good start...
THANKS!
Click to expand...
Click to collapse
in english
don't depend liboverlay.so
the overlay in the Overlay.patch.txt, patch it to framework/base
need full recompile,
in chinese
不依赖liboverlay.so
overlay 在 Overlay.patch.txt里面,在framework/base里使用这个补丁
需要重新编译所有东西
shaky156 said:
You need to pull the whole source code off him
Click to expand...
Click to collapse
Are you set up to do it?
wildchild048 said:
Are you set up to do it?
Click to expand...
Click to collapse
I would if I had a quad core or something that can compile fast, 2 core pc wont do it, I'm sure LC is already pulling from his git or something he has an i7
EDIT: just realized he doesnt have the whole thing up, only kernel/hal lol
zbwu86 said:
in english
don't depend liboverlay.so
the overlay in the Overlay.patch.txt, patch it to framework/base
need full recompile,
in chinese
不依赖liboverlay.so
overlay 在 Overlay.patch.txt里面,在framework/base里使用这个补丁
需要重新编译所有东西
Click to expand...
Click to collapse
I've recompiled libbinder and libui.so but not worked... full recompile is started, i'll see tomorrow... If it's not working, i'll try liboverlay
well my build won't load camera HAL, it saiy that it can't connect to libcamera.so
where can I find libs from htc sense rom base 2.36.405.8??
LorD ClockaN said:
well my build won't load camera HAL, it saiy that it can't connect to libcamera.so
where can I find libs from htc sense rom base 2.36.405.8??
Click to expand...
Click to collapse
I found this, http://forum.xda-developers.com/showthread.php?t=1042986 , but not sure if its the exact same thing hes talking about or not...But says Based on RUU Ace Gingerbread S 2.36.405.8 ...so probably could pull libs from it?
Yelp... !
I am not entirely familiar with the process to get the Camera working. Ca someone please help ?!
apocalypse.v said:
I am not entirely familiar with the process to get the Camera working. Ca someone please help ?!
Click to expand...
Click to collapse
You will have to wait till someone puts out a working rom with it.., this is for getting it to work building from source

[GT-P6210 WIFI][WIP] CyanogenMod 9 (developer preview 2)

SO HERE WE GO MY GT-6210 FRIENDS.
I sold my tab because I got an iPad 2 for work and used the money to get a Galaxy Nexus I will probably keep building this ROM once the kernel is worked out and everything is working. Most likely Build AOKP
Just like the GT-6200 Developer Release this is a very basic preview build of CM9. That being said, if you choose to flash this build, YOU DO SO AT YOUR OWN RISK.
I am not a Dev or claim to be one, I just spent a lot of time the last few monthes learning how to build from AOSP and CM9, and figured I'd share my success with the community. I am not resposible for any one bricking their devices by not reading all the information that is all hear on XDA.
Please atleast read through this if you are a n00b: http://forum.xda-developers.com/showthread.php?t=1452716
And this if you are not Rooted yet: http://forum.xda-developers.com/showthread.php?t=1379532
ONCE AGAIN
FLASH AT YOUR OWN RISK
All credit and thanks goes out to:
-Google
-The whole Cyanogen team
-aorth (for getting this moving on out TABs)
-locerra (for his quick work on the p6210 device tree & framework tweaks)
-garyd9 (for all his work on the p6210 and this forum)
-Anyone else that made this possible THANK YOU
I will try to maintain this thread as much as I can, but I have a full time job, school, family and a life
I will at the least be folowing any changes in the source code or on github and post any builds I compile.
I WILL NOT BE:
-Responding to any questions that can be found by simply searching
-Spending a lot of time helping people to get this up and running
This is what I did to get it up and running:
-Put the ZIP file on the TABs internal sd partition (NOT THE SD CARD YOU PUT IN TO THE TAB)
-Reboot into Recovery
-Wipe data/factory reset
-Wipe cache partition
-wipe Dalvik Cache
-format /cache
-format /system
-format /data
-Install update-cm-9.0.0-RC0-p6210-UNOFFICIAL-signed.zip
-Reboot and enjoy!!! Not much is working though.
What's working:
Accelerometer
Hardware-accelerated launcher
Touch input
Vibration
Physical buttons (volume + power)
Audio
What's not working:
Bluetooth
Wifi
Camera
GPS
Hardware-accelerated video
Ambient light sensor(working for the most part in new build 2)
Here is the link: http://www.mediafire.com/?jrcehwgewyxi6kb
Any Mirrors for downloads are welcome, not sure how for the free mediafire account will go.
New Build with working Audio
Thanks to locerra!!!
DP2: http://goo.gl/6mXTQ
md5: 79bdbb1e44d8e4421221525c00947688
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Reserved
Sent from my GT-P6210 using xda premium
Hey! This is awesome, i'm glad you were able to get this running. I was gonna try to get it running, but I ran outta space on my ubuntu partition lol.
I was wondering if we could get wifi working by porting this..
https://github.com/psyke83/AR6kSDK.3.1
fyi, locerra = ohanar
locerra said:
fyi, locerra = ohanar
Click to expand...
Click to collapse
Good to know lolz
Sent from my GT-P6210 using xda premium
Woooo yes bring it on! Great to see people chipping in and getting this off the ground! Really looking forward to seeing this finished.
Would be abysmally funny if they finish before Samsung gets their ICS out even though that circumstance is not likely to happen.
bdds13 said:
Hey! This is awesome, i'm glad you were able to get this running. I was gonna try to get it running, but I ran outta space on my ubuntu partition lol.
I was wondering if we could get wifi working by porting this..
https://github.com/psyke83/AR6kSDK.3.1
Click to expand...
Click to collapse
Not sure if I could get this worked into a build. Do you have more info on what and where this code comes from?
Sent from my GT-P6210 using xda premium
This is great and really inspiring. I really wish I knew where to begin to help out on moving this forward. Thanks for all the work guys
kmmxracer said:
Not sure if I could get this worked into a build. Do you have more info on what and where this code comes from?
Sent from my GT-P6210 using xda premium
Click to expand...
Click to collapse
Yeah, I got it from this old post here on the general forum.
http://forum.xda-developers.com/showpost.php?p=23262686&postcount=18
It's supposed to be from one of sony's e-book reader devices.
Good to see you up and running. Congrats! Now you guys get to work on wifi and I'll start working on telephony .
kmmxracer said:
Not sure if I could get this worked into a build. Do you have more info on what and where this code comes from?
Sent from my GT-P6210 using xda premium
Click to expand...
Click to collapse
i found something similar quite some time ago.
https://github.com/DerArtem/AR6kSDK.3.1
it's from derartem, he and nopy is working on ICS for Folio 100 too currently.
http://forum.xda-developers.com/showthread.php?t=1470823
it is the same thing with some modification from DerArtem.
Progress on wireless... sorta.
P6200/P6210 use an Atheros 6003 wireless chip (also for bluetooth?). The open-source atk6kl driver from compat-wireless supports this chip. I found some interesting information about building this module on the HP Touchpad forum over at RootzWiki. I can compile the module, but I just can't load it.
Here's how:
1. Compile kernel:
Code:
cd ~/src/git/kernel_samsung_c210
LOCALVERSION="" ARCH=arm CROSS_COMPILE="/home/aorth/src/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" make -j8 zImage
2. Compile compat-wireless
Code:
cd ~/src/compat-wireless-3.3-2-n
./scripts/driver-select ath6kl
ARCH=arm CROSS_COMPILE="/home/aorth/src/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" KLIB=~/src/git/kernel_samsung_c210 KLIB_BUILD=~/src/git/kernel_samsung_c210 make -j4
But attempting to insert the resulting modules spits out errors like:
Code:
# insmod compat.ko
insmod: can't insert 'compat.ko': invalid module format
# dmesg | tail -n3
<4>[ 365.244149] load_module: umod=4015c000, len=1311485, uargs=01a1f008
<3>[ 365.266659] compat: unknown relocation: 96
<6>[ 382.490328] BAT : soc(100), vcell(4152mV), curr(0mA), temp(26.7), chg(0), full(1), rechg(0), cable(1)
@ohanar... help!
Nice start!
aorth said:
P6200/P6210 use an Atheros 6003 wireless chip (also for bluetooth?). The open-source atk6kl driver from compat-wireless supports this chip. I found some interesting information about building this module on the HP Touchpad forum over at RootzWiki. I can compile the module, but I just can't load it.
Here's how:
1. Compile kernel:
Code:
cd ~/src/git/kernel_samsung_c210
LOCALVERSION="" ARCH=arm CROSS_COMPILE="/home/aorth/src/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" make -j8 zImage
2. Compile compat-wireless
Code:
cd ~/src/compat-wireless-3.3-2-n
./scripts/driver-select ath6kl
ARCH=arm CROSS_COMPILE="/home/aorth/src/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" KLIB=~/src/git/kernel_samsung_c210 KLIB_BUILD=~/src/git/kernel_samsung_c210 make -j4
But attempting to insert the resulting modules spits out errors like:
Code:
# insmod compat.ko
insmod: can't insert 'compat.ko': invalid module format
# dmesg | tail -n3
<4>[ 365.244149] load_module: umod=4015c000, len=1311485, uargs=01a1f008
<3>[ 365.266659] compat: unknown relocation: 96
<6>[ 382.490328] BAT : soc(100), vcell(4152mV), curr(0mA), temp(26.7), chg(0), full(1), rechg(0), cable(1)
@ohanar... help!
Click to expand...
Click to collapse
I need to learn to compile a kernel. Where did you get the kernel from and where did you get the toolchain/cross compiler from? Is it the one inside the cyanogen repo or codesourcery or what?
Sorry if the dumb questions, but I'm just getting started/interested in kernels
kmmxracer said:
I need to learn to compile a kernel. Where did you get the kernel from and where did you get the toolchain/cross compiler from? Is it the one inside the cyanogen repo or codesourcery or what?
Click to expand...
Click to collapse
The kernel we are currently using is the one at https://github.com/ohanar/kernel_samsung_c210, however, in the long run we should move over to https://github.com/teamhacksung/android_kernel_samsung_smdk4210, although this is currently broken for our devices (so we need to fix it ).
I am using the latest ndk toolchain that comes with in cm repo.
---------- Post added at 02:35 AM ---------- Previous post was at 02:33 AM ----------
aorth said:
@ohanar... help!
Click to expand...
Click to collapse
Haven't really looked into this too much. I'm more interested in getting the smdk4210 kernel working (and that already includes the atheros drivers).
Thanks, I just found some good reading on compiling kernels. I allways find what I need right after asking in a thread
I'll start with the teamhacksung git. Thanks!!!!
locerra said:
Haven't really looked into this too much. I'm more interested in getting the smdk4210 kernel working (and that already includes the atheros drivers).
Click to expand...
Click to collapse
Yeah, you're right. It's likely the same ath6kl driver, though, as compat-wireless is where the mainline kernel gets linux-wireless-next (and smdk4210 kernel is based on mainline, or at least will be soon... it might be based on origen board kernel right now, see OpenGalaxy).
btw, this module loading issue isn't strictly a wireless issue. I can't load j4fs or scsi_wait_scan either. I swear I loaded these once before, recently...
btw, this module loading issue isn't strictly a wireless issue. I can't load j4fs or scsi_wait_scan either. I swear I loaded these once before, recently...
Click to expand...
Click to collapse
Yeah, I'm having that issue too...
locerra said:
Yeah, I'm having that issue too...
Click to expand...
Click to collapse
Question... when you were still using kernels compiled with Samsung's LOCALVERSION string, did you ever get the ar6000.ko to load?

[WIP][DEV][4.1] Jelly Bean 4.1 Source ROM - SIMPLIFIED (7/13/12)

I wanted to get the ball rolling on getting a working AOSP 4.1 ROM built. So far i was able to get it to compile but i cannot get it to boot or get adb working. I need help on this one so lets all work together and get this working! :laugh:
The majority of the compile errors were gps related so i have disabled the building of gps in the device tree for now as that is not important to get a booting build. If you follow these instructions you will be able to build without any errors. But the end product still will not boot. but its close.
Here is how to download the 4.1 AOSP repo (straight from the android source website):
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
$ repo sync -j16 (this will take about and hour and a half depending on your interwebs speed)
then download the device trees and proprietary files from here:
Code:
$ cd WORKING_DIRECTORY
$ git clone https://github.com/sk8erwitskil/aosp-android_device_samsung_skyrocket.git device/samsung/skyrocket/
$ git clone https://github.com/sk8erwitskil/aosp-android_device_samsung_msm8660-common.git device/samsung/msm8660-common/
$ git clone https://github.com/sk8erwitskil/android_vendor_samsung_skyrocket.git vendor/samsung/skyrocket/
then:
Code:
$ . build/envsetup.sh (notice the period)
$ lunch full_skyrocket-userdebug
$ make -j(number of CPUs/threads +1) otapackage
i have 2 cpus with 2 cores and multi threaded so i do -j9
2(cpus) x 2(cores each) x2(threads per core) + 1 = 9 (so i do make -j9 otapackage)
i got one to completely compile but i cannot get it to boot. i had to edit the updater-script to get it to even install. if you do get one compiled make sure to delete all the lines that have to do with installing recovery from the updater-script. you dont want to overwrite your recovery. and delete the folder "recovery" from inside the finished zip file. i already did that in this one:
JELLYBEAN 4.1 AOSP (NOT BOOTING YET)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
not booting rom is still uploading. should be done in about 5 mins
edit: finished uploading
cant wait to see the progress on this very excited thanks
Getting the ball rolling my friend? Good luck
Get hold of Seanzscreams. His Alpha was not booting yet, but he had adb working. We were doing logcats and dmesg's on it. A bit of advice from him on getting adb going might help you along a bit quicker.
rebel1699 said:
Get hold of Seanzscreams. His Alpha was not booting yet, but he had adb working. We were doing logcats and dmesg's on it. A bit of advice from him on getting adb going might help you along a bit quicker.
Click to expand...
Click to collapse
I am in NO way trying to disrespect anyone, and have no idea how to development process works. But why does it seem like there are small groups of people trying to get their own versions to boot. Why not collaborate until there's at least a solid base, then branch off?
I am going to start playing with it too, maybe I will figure something out but probably not
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
doood amazing
editing the cm.mk
and vendor.sh
was my hinderence
thanks compiling a build now as well
sk8erwitskil said:
not booting rom is still uploading. should be done in about 5 mins
Click to expand...
Click to collapse
also have you tried bringing over the android runtime lib
and also in egl.conf changing it to 0 1android and 0 0 adreno
seanzscreams said:
also have you tried bringing over the android runtime lib
and also in egl.conf changing it to 0 1android and 0 0 adreno
Click to expand...
Click to collapse
i have not edited any of the libs yet. i have only had time to get the compile done and edited the updater-script to get it to install. i will try this tho and see how much further into the boot process i can get. thanks
oh btw, how did you get adb to start. were there changes to init.rc that you had to make?
Compiled and adb is running
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I brought over only a few specific lines. Not replacing any. When I compared them side by side
And included init.trace
Thanks for like 5 tips in the op that got me going I was up all damn night. But. Changing full skyrocket user debug. Worked. Ahhh
So close now
Using my own compile. But. Will def give props for this guide
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Good to see there's a few people working on a jb port. More people=sooner releases and more roms. Thanks.
Sent from my SGH-I727 using XDA
Great news... CAF (code aurora forums) just updated their github with new Jellybean sources, and our own msm8660 processor is among them. Same stuff I used for my port of ICS. https://www.codeaurora.org/xwiki/bin/QAEP/jb
This is what we need to compile and build from; as it's actually designed for our processor it will be much easier in getting a stable jellybean build up and running.
jomeister15 said:
Great news... CAF (code aurora forums) just updated their github with new Jellybean sources, and our own msm8660 processor is among them. Same stuff I used for my port of ICS. https://www.codeaurora.org/xwiki/bin/QAEP/jb
This is what we need to compile and build from; as it's actually designed for our processor it will be much easier in getting a stable jellybean build up and running.
Click to expand...
Click to collapse
Thanks limited, but <3
jomeister15 said:
Great news... CAF (code aurora forums) just updated their github with new Jellybean sources, and our own msm8660 processor is among them. Same stuff I used for my port of ICS. https://www.codeaurora.org/xwiki/bin/QAEP/jb
This is what we need to compile and build from; as it's actually designed for our processor it will be much easier in getting a stable jellybean build up and running.
Click to expand...
Click to collapse
thanks. dl'ing now
edit: looks like codeaurora has kernel in it as well??
sk8erwitskil said:
thanks. dl'ing now
edit: looks like codeaurora has kernel in it as well??
Click to expand...
Click to collapse
I think it's safe to say that you guys will have a working ROM fairly soon. Keep this up and you'll have something up and running in week
"error: Cannot fetch platform/external/webkit"
thats from the codeaurora repo. ugh. it hangs
Glorious work y'all
Sent from my SGH-T989 using xda app-developers app
Just wanted to personally say thank you, Sk8er for reaching out, if more devs did that then there probably wouldn't be so many questions killing these forums for everyone.
Keep up the awesome work and i will do anything i can to help. you guys rock!
Sent from my i727 DÅÅTH machine
sk8erwitskil said:
thanks. dl'ing now
edit: looks like codeaurora has kernel in it as well??
Click to expand...
Click to collapse
The kernel will need to be replaced by a modified ICS one. I'd get downloading on the source but I currently don't have access to my linux machine.

[AOSC] Android Open Source Compiler

Android Open Source Compiler
Build Android with a gui.
This project will be a continuous battle. Which is why I decided to not "package" this in terms of distro. I have written a make file and instructions on how to build this very easily. This way, you can't always get the latest code from either they master (unstable) branch or the Stable (stable) branch. Plus no harm in teaching you little bit of git.
Use the poll to gauge project priority, also mention more projects so I can add them to the polls.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Known issues:
- When using the options dropdown, you can't choose the same option twice in a row. I am aware and working on it.
- Apparently there are some issues with the adb options. Please let me know if this is the case.
Please read:
I have thought maybe times different ways I was going to go about this. Ads, donate version, paid app, etc. I choose to keep the project open, as that's how I roll. I do ask that if you enjoy the application that you try to donate something. This was my first gui project and took a lot of time and effort to even get it to where it is right now. I hope everyone enjoys the app as much as I enjoy working on it.
Install/Info | Source code | Bugs
You can follow me on google+ I tend to talk about it a bit on there as well.
1st
Lithid, thanks for your hard work man. I'll definitely be checking this out when I feel a little more comfortable doing things manually. I think this is an awesome project and just want you to know that I appreciate your help and involvement with android.
id love to try both CMC and AOSC, but i use a yum based system. is there a way to get this to work on a yum based system, specifically fedora?
here is my friends repos https://github.com/sakindia123/cm10_htc_pico ..how to set up custom device please tell how to set up device tree and device branch using this link
is it me or is it just impossible to build AOKP for TMO S3??? can't build no matter what tutorial i try
Awesome work
tapatalked² from cowsquadGnex®
I like this project. And with your permission sir I would like to add AoCP to the modified aosp list.
Perhaps fork it to my Git and get it set up to Work with our source?
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
tr82691 said:
is it me or is it just impossible to build AOKP for TMO S3??? can't build no matter what tutorial i try
Click to expand...
Click to collapse
Same here on the S2 for TMO. AOKP doesn't seem to be too friendly to noobs, at least in my case.
OT: Love the idea of this "tool". Going to give it a whirl.
Oh yeah great
Superb GUI, Am going to Compile......
As always lithid, great work you're doing!
Nice job!
Sent from my Galaxy Nexus using Tapatalk 2
It doesn't seem like it is possible to integrate own drivers (eg for porting to other devices). Or am I missing something?
PalmerCurling said:
id love to try both CMC and AOSC, but i use a yum based system. is there a way to get this to work on a yum based system, specifically fedora?
Click to expand...
Click to collapse
I am working on rpm support. I don't use rpm distros, currently installing fedora on a vm to get it working.
Johnsondr80 said:
I like this project. And with your permission sir I would like to add AoCP to the modified aosp list.
Perhaps fork it to my Git and get it set up to Work with our source?
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
Click to expand...
Click to collapse
Hell yea, the whole point is to add in as many projects as possible. This way, users are able to download this software and check out available projects very easily. Look forward to working with you on getting it implemented.
forceu said:
It doesn't seem like it is possible to integrate own drivers (eg for porting to other devices). Or am I missing something?
Click to expand...
Click to collapse
Not yet, I think.
Sent from my Galaxy Nexus using Tapatalk 2
forceu said:
It doesn't seem like it is possible to integrate own drivers (eg for porting to other devices). Or am I missing something?
Click to expand...
Click to collapse
Not quite yet. Apologies. In time my friend.
Even when compiling for CM it doesnt build for D2TMO... what gives??
Sent from my SGH-T999 using xda premium
tr82691 said:
Even when compiling for CM it doesnt build for D2TMO... what gives??
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
Mind being a little more descriptive?
If your specific device is having issues compiling, then you either need to figure out the issue and commit it to cm, find out what is wrong with specific steps like if ./extract-files.sh isn't working. Overtime this might be able to overcome every possible mishap, but doubtful. It is a work in progress and if issues do arise, I need a little more information so I can try and find a solution.
A couple of times building for the TMO S3 I got two different errors. One is the kernel not being built. Second is it asks me if I have the correct manifest. Happens on both CM and AOKP. I have created a local_manifest file and inputed the kernel info for my device from CM but still no luck.
Sent from my SGH-T999 using xda premium
Pleas help!!!!!
When I wannt to compile, they sad
SETU CUSTOM DEVICE???
Iam galaxi s i 9000?
PLEAS HELP!!!!!
What KIND of PC's spec. do we need to compile ICS.
I have a dual core 1.2 laptop with 4gb of ram. But my computer freezes in the middle of the building process.
t
tapatalked² from cowsquadGnex®

How to build the kernel for your Huawei P9

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Huawei have helpfully released the kernel source for the Huawei P9 on their download site. Impressively, the version posted there (3.10.90) actually matches the current release build (B136). However, the download itself is only part of the puzzle - it's important to then know how to compile it and use it. Hence this guide.
Some points to note first of all...
This guide refers to building on Linux. You can probably build on OSX or whatever too but seriously, it's less pain in the long run to spin up an Ubuntu VM.
In the download linked above, as well as the kernel, there are some other bits and pieces (some of which are quite bizarre). I've mirrored the kernel to Bitbucket, so you don't need to grab the whole download.
Got that? OK, so here's a step by step on how to build the kernel! I strongly recommend building stock first and testing that works for you, then you can start adding your tweaks in. I'm interested to hear what you add / change!
Open a terminal window on your Linux machine / in your Linux VM. No GUIs here. Change to the directory where you want the kernel / toolchain to live.
First of all, we're going to clone the toolchain from AOSP.
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
Next we're going to clone the kernel source itself from my git repo on bitbucket.
Code:
git clone https://gitlab.com/paulobrien/android_kernel_huawei_p9.git kernel
We need to add the toolchain location to the path.
Code:
export PATH=$(pwd)/aarch64-linux-android-4.9/bin:$PATH
We need to specify that we are cross compiling for arm64.
Code:
export CROSS_COMPILE=$(pwd)/aarch64-linux-android-4.9/bin/aarch64-linux-android-
Let's create a directory for our output to go in to.
Code:
mkdir out
We've got the kernel downloaded, so let's change to that directory so we're ready to go.
Code:
cd kernel
A bit of cleaning up before we get started...
Code:
make ARCH=arm64 O=../out mrproper
Specify that we're building for the P9 (hisi3650 chipset)...
Code:
make ARCH=arm64 O=../out p9_extracted_defconfig
And build it!
Code:
make ARCH=arm64 O=../out -j8
When this process completes, we can check the '../out' directory and you should find the file arch/arm64/boot/Image. This is the kernel that you've just built! You can't flash it as is though, you need to put it into a boot image first.
Here's how you do it...
Change out of the kernel directory back to its parent.
Code:
cd ..
Download tools for manipulating the boot image.
Code:
git clone https://github.com/xiaolu/mkbootimg_tools.git
Download the stock boot image (actually we're using the root ready version for convenience).
Code:
wget -O boot.img http://nigella.modaco.com/files/boot.stock.huaweip9.b136.img
Extract the boot image.
Code:
mkbootimg_tools/mkboot boot.img boot.extracted
Copy the new kernel into the extracted boot folder.
Code:
cp out/arch/arm64/boot/Image.gz boot.extracted/kernel
Build a new boot image.
Code:
mkbootimg_tools/mkboot boot.extracted boot.newkernel.img
You now have a new boot image (boot.newkernel.img). All that's left is to flash it to your device! Reboot to bootloader (either using 'adb reboot bootloader' or by powering on with volume down held), flash using 'fastboot flash boot boot.newkernel.img' and then reboot using 'fastboot reboot'. Job done! In the About screen of settings you should see the date of the new kernel and details of your build machine.
And I've just discovered the stock kernel compile isn't seeing my SIM card. Helpful.
P
SIM issue fixed, instructions updated.
P
A good start for this device. I hope we will see more devs soon in this section.
@paulobrien
What's your take on the Kernel sources. The Kernel sources from Huawei have been always a great mess for me.
So...does this actually mean custom ROMs on the P9 after all?? Hot damn I cross my fingers (having just received the phone, which is amazing)
hackslash said:
@paulobrien
What's your take on the Kernel sources. The Kernel sources from Huawei have been always a great mess for me.
Click to expand...
Click to collapse
Well, they compile nowadays which is a bonus, and they're the right version which is even better. ?
P
Sent from my Robin using Tapatalk
emilrune said:
So...does this actually mean custom ROMs on the P9 after all?? Hot damn I cross my fingers (having just received the phone, which is amazing)
Click to expand...
Click to collapse
Honestly, a full stock ROM like CyanogenMod is still a long way off and by no means guaranteed, it'll need someone dedicated and skilled to pick it up.
Every little helps though!
P
Sent from my Robin using Tapatalk
paulobrien said:
Honestly, a full stock ROM like CyanogenMod is still a long way off and by no means guaranteed, it'll need someone dedicated and skilled to pick it up.
Every little helps though!
P
Sent from my Robin using Tapatalk
Click to expand...
Click to collapse
It certainly does! This stuff just got even more interesting I could definitely be satisfied with "just" a custom stock kernel ROM. Coming off an old Z3, I had great fun with SLiM ROMs, Existenz etc.:good:
I think we'll definitely see custom stock based ROMs, with bloat stripped and kernel updated amongst other optimisations.
P
Sent from my Robin using Tapatalk
Can it use with mate8?
Sent from my NEXT using Tapatalk
somboons said:
Can it use with mate8?
Sent from my NEXT using Tapatalk
Click to expand...
Click to collapse
No, but I will be doing a Mate 8 version.
P
Sent from my Robin using Tapatalk
paulobrien said:
No, but I will be doing a Mate 8 version.
P
Sent from my Robin using Tapatalk
Click to expand...
Click to collapse
Great. I'm waiting your guide.I downloaded kernel source for mate 8 , ready to follow your guide.
Please try to build a Kernel for p8 Marshmallow too. [emoji3]
paulobrien said:
Well, they compile nowadays which is a bonus, and they're the right version which is even better.
P
Sent from my Robin using Tapatalk
Click to expand...
Click to collapse
SO TRUE! I remember when I purchased my first Huawei device (Honor 6) and I downloaded it's kernel sources. The sources didn't even compiled. And I just stared at the screen printing loads of C errors (unsigned variables, Wunused variable, etc.). At that time, the sources weren't even complete. They had some files missing. So, I couldn't even fix them. Today, the sources are better. I downloaded P8 Lite's and 4C / 4X Marshmallow sources, compiled them and flashed the kernel. The kernel worked out of the box with eveything working (no SIM, WiFi, related issues).
About Custom ROMs, Cyanogenmod isn't possible but AOSP is. (Do you know currently 5 Huawei Kirin devices have AOSP builds which boot successfully, P8, P8 Lite, 4C, 4X and P8 Lite; the ROM boots but obviously many things don't work especially the RIL). Also, many people don't know that HiSilicon Kirin 620 has official AOSP support (the reason why 4 out of the above 5 mentioned devices have AOSP). The problem is that immense hardwork and loads of patches are needed to make them stable which unfortunately no developer wants to put in. But have faith, the future might be bright for Huawei devices.
emilrune said:
So...does this actually mean custom ROMs on the P9 after all?? Hot damn I cross my fingers (having just received the phone, which is amazing)
Click to expand...
Click to collapse
Kernel Source != Custom ROM. In fact, sometimes you can build a ROM around a stock boot.img and not have to use a custom kernel at all. But having sources for the Kirin chipset always helps.
paulobrien said:
Honestly, a full stock ROM like CyanogenMod is still a long way off and by no means guaranteed, it'll need someone dedicated and skilled to pick it up.
Every little helps though!
P
Sent from my Robin using Tapatalk
Click to expand...
Click to collapse
Honestly I don't actually care all that much for Cyanogen and the like. I just need me some slimmed down no-bloat ROM, and of course the benefits/apps that root bring:good:
---------- Post added at 08:36 AM ---------- Previous post was at 08:31 AM ----------
zowpow said:
Kernel Source != Custom ROM. In fact, sometimes you can build a ROM around a stock boot.img and not have to use a custom kernel at all. But having sources for the Kirin chipset always helps.
Click to expand...
Click to collapse
That's what I gather; some insight into the Kirin chipset can only be helpful to the smart devs around here:good:
@paulobrien i see in your you have 2 huawei p9 related repos; android_kernel_huawei_p9 and android_kernel_huawei_p9_mck which one can be used?
umair9001 said:
@paulobrien i see in your you have 2 huawei p9 related repos; android_kernel_huawei_p9 and android_kernel_huawei_p9_mck which one can be used?
Click to expand...
Click to collapse
More details on mck coming soon. ?
P
Sent from my HUAWEI NXT-L29 using Tapatalk
So double tap to wake?
I see donations in your future.
Honestly though, it would be amazing to have this feature. Maybe it's possible to enable it without kernel mod though, all the entries in build.prop and hw_easywakeupmotion_config.xml are there and you can get the option in the motion control menu, but when you enable it, it doesn't actually work

Categories

Resources