How to build an AOSP Kernel? - Samsung Galaxy Nexus

So I pretty much would like to start building my own kernels and Roms from AOSP, but not sure where to start. I have downloaded the SDK already, and started downloaded some file with git and these commands:
git clone https://android.googlesource.com/kernel/omap
cd omap
git checkout origin/android-omap-tuna-3.0-mr0
but the guides I've been reading don't offer much more help. And then there is a toolchain of some sort? I can get my way around linux fairly well and have built my own kernels about a year and a half ago for my Vibrant, but took a completely different course.
Was wondering if someone could point me in the right direction, thanks!

You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.

RogerPodacter said:
You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.
Click to expand...
Click to collapse
Thanks a lot, will try that. The link on their page is AOSP?
Sent from my Galaxy Nexus using XDA

The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250

bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Sweet will continue with these steps and look onto the merge
Sent from my Galaxy Nexus using XDA

bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Oh holy crap haha I completely thought he asked about aokp kernel, my bad I didn't read.

AOSP kernel for HTC Explorer/Pico
Can you tell me how to build aosp kernel for htc explorer?

monishvster said:
Can you tell me how to build aosp kernel for htc explorer?
Click to expand...
Click to collapse
Just do the same thing, but instead sync the htc kernel rather than the nexus. Go search and find out if source code has been released for that phone.
Then just run the make command.

Somebody call 911, we've been hijacked
Note: 'make tuna_defconfig' is for maguro, i dont know what is the name of default config file for the htc, why should we? User should refer to htc explorer subforum @xda or to kernel documentation.
Sent from my i9250

Related

[REF] Source code: Unified git repo for GT-I9000 Gingerbread kernel source

Here we go
Common gingerbread-samsung git branch for all of us
This branch contains the fixed Gingerbread source (compiling and working) everyone of us may use as reference git repository.
Fixed in this source:
- all cleaned up gitignores
- missing FSR in Makefile
Take also a look at the updated README.txt that will explain you how to compile and get it working with modules
Also: makes sure you disable, in .config:
[*] Automatically append version information to the version string in menuconfig or CONFIG_LOCALVERSION_AUTO in .config
It will help each developer to exchange patches easily because of the common starting point.
bilboa1 said:
What supercurio means, is that he's offering to have a common GIT repository for the official Samsung kernel of the GT-I9000 (and similar phones).
The GIT tree would contain only Samsung drops and possible other upstream fixes/changes (the kernel being loosely based on the Nexus S kernel, there's at least Samsung and Google as different upstream), as well as bug fixes. No new features etc except maybe Voodoo.
The advantage of that is that the ones not using GIT yet could fork it and make their own kernel variation on a STABLE base. They could also issue pull requests for fixes they made, which would profit everyone. That's the open-source spirit and way of doing things efficiently by the way.
Note that the current GIT already contains fixes for compiling and using Samsung's GB sources with Samsung's firmwares (and binary modules).
I certainly support this idea.
Click to expand...
Click to collapse
How you can fork this repository:
- clone it via github directly
or, if you prefer keeping only this gingerbread branch directly, on your dev computer:
Code:
git clone git://github.com/project-voodoo/linux_gt-i9000.git -b gingerbread-samsung
cd linux_gt-i9000
git remote rm origin
git remote add origin git://your-new-remote-repository.git
git remote add common git://github.com/project-voodoo/linux_gt-i9000.git
This way, for people re-using Vodooo sound for example, it will be as easy as:
Code:
git fetch common
git merge gingerbread-voodoo-sound
If you have more idea of collaboration like that, express yourself
FAQ:
Q: Bleh! I hate this Kernel/ directory.
A: Yes, this was the case for the original commits but now it's a standard Linux repository with everything on its root.
But it didn't worked as expected, so I had to make the change, sorry for the inconvenience to the early adopters.
Q: What happens when Samsung update their source code tarballs
A: I'll update the common git repository accordingly (hopefully fast enough for you)
On your side, all you'll need to do will is.
Code:
git fetch common
− or git fetch git://github.com/project-voodoo/linux_gt-i9000.git
git merge gingerbread-samsung
Say good bye to messy tarballs!
PS: if you're looking to initramfs, take a shot at https://github.com/project-voodoo/samsung_initramfs − contribution welcome.
Good idea, I second that, it will be easier
wrong link
Github reads http://project-voodo.org/
What supercurio means, is that he's offering to have a common GIT repository for the official Samsung kernel of the GT-I9000 (and similar phones).
The GIT tree would contain only Samsung drops and possible other upstream fixes/changes (the kernel being loosely based on the Nexus S kernel, there's at least Samsung and Google as different upstream), as well as bug fixes. No new features etc except maybe Voodoo.
The advantage of that is that the ones not using GIT yet could fork it and make their own kernel variation on a STABLE base. They could also issue pull requests for fixes they made, which would profit everyone. That's the open-source spirit and way of doing things efficiently by the way.
Note that the current GIT already contains fixes for compiling and using Samsung's GB sources with Samsung's firmwares (and binary modules).
Forking in git hub is VERY VERY easy btw.
I certainly support this idea.
Awesome! - I also support this idea
United Galaxy S Developers
Nice idea! Perfect spirit of open source
I hope good things come out og this.
Great move Supercurio - once again !
Simply awesome men
Will the github include the multitouch fix(SGS only using two fingers rather than multiple fingers) that affects Google Maps rotation?
pikachu01 said:
Will the github include the multitouch fix(SGS only using two fingers rather than multiple fingers) that affects Google Maps rotation?
Click to expand...
Click to collapse
The gingerbread-samsung branch promoted here will only contain Samsung kernel sources and won't interfere with other developers modifications.
Only exception is if this source is broken and needs something to work, like nikademus's patch: https://github.com/project-voodoo/linux_gt-i9000/commit/6c8f989f58999770d23236bb172c3a4e1c80586b
It seems that JVK and JVB was pulled from Kies because of an update problem. Looks like we're going to have new ROMs to play with in a week or two (maybe less)
Edit: What about the SSL fix (http://forum.xda-developers.com/showthread.php?t=1040005)
Great, good idea. That's how community development should work!
zorxd said:
Great, good idea. That's how community development should work!
Click to expand...
Click to collapse
Agreed! Thanks for getting things started Supercurio! Now I have to start making a Vibrant branch.
Any chance this code will boot with preempt enabled? Does the MTD driver work with the OneNAND partitions like the NS code does? I'd kind of like to get away from FSR/RFS and such....
Still cloning...
ttabbal said:
Any chance this code will boot with preempt enabled? Does the MTD driver work with the OneNAND partitions like the NS code does? I'd kind of like to get away from FSR/RFS and such....
Still cloning...
Click to expand...
Click to collapse
The code has many similarities with Nexus S one (build from it IMO) and is preempt too
Just a note, I had to edit the Makefile to set the crosscompile variable to the right path
Question: is the generated zImage flashable through ODIN? Don't we need to add the initramfs?
supercurio said:
The code has many similarities with Nexus S one (build from it IMO) and is preempt too
Click to expand...
Click to collapse
Excellent! I just did a defconfig to check it out and saw the preempt in there.. Nice to see Samsung fixing things up a little. Now I need to get a GB ROM to install so I can try to boot.
Thanks again. I'll send a pull request when I have a Vibrant branch ready. Going for minimal modifications, fix touch button mapping and such. People can add whatever they want after that. Now I need to learn the new code tree... wheee! Hopefully the basics are the same, getting the changes into an i9k froyo kernel is pretty easy.
zorxd said:
Just a note, I had to edit the Makefile to set the crosscompile variable to the right path
Question: is the generated zImage flashable through ODIN? Don't we need to add the initramfs?
Click to expand...
Click to collapse
You will need an initramfs... anyone have a default one we can start with for 2.3?
zImage will have to be in a TAR file to flash with Odin. Heimdall can flash a bare zImage, as can the SGS Kernel Flasher tool for Android.
Oh... think I saw a setting in "make menuconfig" for the cross-compiler prefix. Might be able to avoid Makefile mods....
Sorry for the newb question, but how do we generate the initramfs? I guess we could take the one from stock JVB. But how do we extract it and how do we combine our compiled kernel with it?
On a side note, I noticed that CFQ is the default scheduler. Isn't it better to use No-op for flash memory?

[KERNEL][HOWTO] E4GT Community Kernel - Updated: 2/26/2012

See second post for changes.
My phone has a nicely corrupted bit of memory right where my data partition is supposed to be so I can't really test any changes on kernels at the moment. Once my replacement gets here, I have quite a few changes to test and then push. Hopefully others are haveing some good luck with there own kernels.
This first post is going to look a little rough until I take the time to pretty it up, but I figured I would get at least this up and let it evolve from there. I know I gloss over some stuff(what the hell is a defconfig, you ask?) but I will flesh this out over the next few days (Years, really. Damn contracts)
Project Goals:
Provide a standard base and scripts for building kernels for the E4GT.
Attempt to provide reasonable documentation of the build/debug/pray-for-success process so that those that wish to learn, can.
What is included in the current base:
Completely Stock EL29 Kernel
initramfs for Samsung based ROMs with ClockworkMod and root
Codesourcery 2009q3-68 toolchain
Base for creating a ClockworkMod flashable kernel
Build script to tie it all together
Getting started:
Install Ubuntu or Linux distro of your choice. This guide is written for Ubuntu as that seems to be the most common choice for Android Development.
Install required packages
Install Oracle Java JDK, setup the Android SDK, and install other required packages from terminal.
For 32-bit installs:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
and 64-bit:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Download base
In terminal emulator, go to the directory you'd like to download to and type:
Code:
git clone git://github.com/SweetwaterBurns/xda-base.git
Pick a branch. Currently available are powersave, performance and master(all identical until things start moving forward a bit, I intend to keep master updated with the latest stock kernal) and select it with
Code:
git checkout powersaveorwhateverbranchnameyouactuallywantipromisetonotactuallymakeabranchthatisquitethisridiculousmaybe
Profit!
In a terminal emulator, change to the xda-base directory and type
Code:
./build.sh
and wait... congratulations you've just compiled your own kernel.
But wait there's more The build script will let you build with more then just the included source and toolchains. The basic format is ./build.sh kernel initramfs defconfig toolchain. All you have to do is copy the files into the appropriate directories and you're good to go.
So, if for example you wanted to build an EK02 kernel using Team Rogue's initramfs, the Linaro 11.12 toolchain and your perfect_defconfig, you would copy the source to xda-base/kernels/EK02, place the initramfs in xda-base/initramfs/rogue, and the toolchain to xda-base/toolchain/linaro. Place perfect_defconfig into EK02/arch/arm/configs/ and type the following command from the xda-base directory:
Code:
./build.sh EK02 rogue perfect linaro
The flashable zip is saved in xda-base using the defconfig, date and time in order to keep your files somewhat organized. I'm going to add kernel version to that in my next update, as well.
The base is essentially a snapshot of where we are at this stage of development and hopefully the community can help us improve it. Everything seems to be working, but if you come across any bugs/fixes, please share.
If you'd like you propose any changes, submit a request via git and I'll add them to the repo if it makes sense.
I'm typing a lot of this up from memory so please forgive any mistakes or omissions. If you find any let me know and I will update ASAP. If it seems confusing, let me know where clarification is needed. My goal is to figure this stuff out and help others while doing it. Any criticism will be taken constructively and I hope this helps spawn few more talented devs for the E4GT.
Known Issues:
Don't choose reboot to recovery after flashing Blazer 3.9(possibly others) I was able to reproduce this on Team Rogue's el29 repack as well.
I didn't realize that git doesn't push empty directories which caused issues with modules not being copied in to the initramfs. I'm going to fix by adding a check to create the files if necessary into the build script. in the meantime, just create initramfs/initramfsroot/lib/modules and remember to make sure that the directories are in any alternate recoveries you use.
Changelog:
2/26/2012
Added a quick howto on working with git and submitting pull requests to post #4. As soon as new phone gets here, I'll be uploading some new changes to performance.
2/13/2012
All right.
There are now branches for powersave, performance, and stock. Once you have cloned the repo you can select which one to use by typing
Code:
git checkout powersave
or whatever. The only difference between the repos at the moment is that I renamed the kernel source directory to match the branch name and edited the build.sh to build the respective variants by default. If anyone has any requests for other branches, let me know.
I also added a check to the build.sh to ensure that there is a lib/module directory in the initramfs that modules can be copied into.
Proposals:
I'm thinking about setting up a few different branches for the kernels. One for the latest clean stock kernel, one for those who would like to focus on performance, one for those that are more worried about battery, and possibly a bleeding edge kitchen sink kernel. More than I can handle myself, honestly, but if those of you that are already making modifications start pushing it should be doable.
Done
How to use git and submit pull requests on github.
If you haven't already, create an account on github Navigate to the xda-base repo and click fork in the upper right.
In a terminal emulator, go to the directory you would like to store your source in and clone your new fork with
Code:
git clone [email protected]:USERNAME/xda-base.git
git remote add upstream git://github.com/SweetwaterBurns/xda-base.git
The second part adds the original repository as an upstream source so that you can keep your code base updated with any changes.
Probably one of the most useful tools available is branches, essentially if you would like to add or change a feature, you would create a branch for working on it. Having it contained with in it's own branch is good for several reasons. It makes it easier to find any changes that you made without pulling in any extra cruft from other things you might be working on and helps prevent any conflicts that might arrise from working on too many things at once with in the same source tree.
Branches can be created locally with
git branch BRANCHNAME
For example, if you wanted to branch the performance kernel you would
Code:
git checkout performance
git branch performance-FEATURE
git checkout performance-FEATURE
This creates a local branch that you can work with, if you would like to push it to github for others to work on or to use it to submit a pull request:
Code:
git push origin BRANCHNAME
Branches can be deleted locally and remotely with
Code:
git branch -d BRANCHNAME
git push origin :BRANCHNAME
Make any changes you'd like and tell git which files you've changed with
Code:
git add CHANGED FILES HERE
Then commit those changes with
Code:
git commit -m 'Description of changes here'
If you would like to submit a pull request upstream, first fetch upstream and merge it with your work to make sure that any changes that have already been pulled don't conflict with your changes and that it can be merged cleanly. Use whatever branch you used as your base for the merge, i.e. for changes you'd like to submit to the performance branch
Code:
git fetch upstream
git merge upstream/performance
This will spit out any conflicts that need fixed and you can repeat the process until it merges clean.
Push your branch to github and navigate to it's page. Github has a pretty good write-up on sending pull requests and the process is really pretty simple.
Any questions, ask away.Any errors, let me know.
To Do:
Show how to add a remote repository and use it to port features using 'git cherry-pick' or whatever.
and one more for whatever else we might need.
Good job! Looking forward to see what comes from this. Good to see a forum to learn from.
Sent from the future
thatdudepoops said:
Good job! Looking forward to see what comes from this. Good to see a forum to learn from.
Sent from the future
Click to expand...
Click to collapse
Couldn't agree more! Thanks. I am eager to step things up myself. I am glad that this thread was started. Thanks OP.
Sent from my SPH-D710 using xda premium
This looks very interesting. Definitely will be watching this thread. Thanks.
Sent via EM waves.
nice work sir! Can't wait to see where this goes from here.
Sent from my SPH-D710 using Tapatalk
Well, I guess my first request is how to add boot animation support to a kernel? Is it as simple as adding the lines to the init.rc?
dtm_stretch said:
Well, I guess my first request is how to add boot animation support to a kernel? Is it as simple as adding the lines to the init.rc?
Click to expand...
Click to collapse
I think the init.rc file I uploaded has it in it.
Give it a try.
agat63 said:
I think the init.rc file I uploaded has it in it.
Give it a try.
Click to expand...
Click to collapse
Oh yeah, duh! I got it, I just didn't name the bootanimation.zip to sanim.zip
dtm_stretch said:
Oh yeah, duh! I got it, I just didn't name the bootanimation.zip to sanim.zip
Click to expand...
Click to collapse
I can either add a line to the init.rc to soft link bootanimation.zip to sanim.zip or put it in the CWM update script. I'm leaning towards the update script as it really should only need to be done once.
Also, be prepared for issues flashing Blazer 3.9 the flash didn't quite take when I tried it this morning.
SweetwaterBurns said:
links to outside resources or maybe a picture of a unicorn that my daughter drew
Click to expand...
Click to collapse
I can't wait.... to see that unicorn
njudell said:
SO, there's a great thread in the developer's section: [KERNEL][HOWTO] E4GT Community Kernel - 2/12/2012
Really nice job. I've built & flashed the kernel. BUT, the WIFI won't turn on, and 3G data won't flow, even though it shows 3G connectivity (Sprint Epic 4G Touch, rooted to L29 with CWM earlier...). Anybody have a clue what I may have messed up? Just ran the straight defaults, figuring that would get me into the least amount of trouble. One diagnostic: there was a number of segment mismatch warnings - I've had those in embedded kernels in the past, and they're usually not meaningful. Maybe this time is different?
Click to expand...
Click to collapse
Sent from my SPH-D710 using xda premium
This guy could not post in Dev
Sent from my SPH-D710 using xda premium
He can PM me and we can try to go over his settings to see what's wrong.
his reply
"Okay, found the problem, and I feel very slightly less stupid. Watching the build go by, I noticed diagnostics that the script was unable to copy the driver modules to the temporary initramfs lib/modules directory. In reading the script, I saw that the build.sh was wiping the temporary initramfs lib directory. SO I added a couple of lines to the build.sh script (the middle two lines are mine):
#Find all compiled modules and copy them for the final build
mkdir $INITRAMFS_TMP/lib
mkdir $INITRAMFS_TMP/lib/modules
find -name '*.ko' -exec cp -av {} $INITRAMFS_TMP/lib/modules/ \;
Which allows the script to copy the loadable modules, and POOF! Now I've got WIFI and such...
The script in the git repository should either get modified, or some additional tests on running the script implemented. One of my thoughts was that having dash as the shell script might be causing problems (I've had that before) - but that wasn't the problem.
-neil
A) Yes, this should be posted in the thread, but I can't because I'm a newbie
B) Therefore, this should heavily count as one of my 10 required posts to get there."
"he doesnt have 10 post so i posted here for him " his thread is in q & a if you want to reply to him
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
xlGmanlx said:
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
Click to expand...
Click to collapse
Its all about the desire to learn. Some start with theming. Then there are those that make ROMs but don't necessarily know how to make a kernel. There's a lot to learn. Its all about having the will and time to do it. The more development the better imo
Sent from my SPH-D710 using xda premium
xlGmanlx said:
Just built a custom PC, might check this out and see how little I know about the linux world. But you gots to start somewhere right?
Click to expand...
Click to collapse
Yup, just compiled my first fully working kernel yesterday.
Already overclocked it to 1.6 with extra added cpu steps for lower clock speeds...
Just tried adding and defaulting bfq scheduler but the jf4s module wouldn't compile after wards for some reason..
Ill figure it out eventually.. Right now im adding smartass / v2 see if it works...
EDIT: That didn't work either hmmmmm... Anyone know why when you edit the c1_rev5 config file the j4fs module doesn't compile?

how to create a kernel for JB ???

Hello guys, I want to compile a kernel, but I've never done before ... Who could help me??. thanks!
./build_kernel. sh
Sent From My Sprint Galaxy Nexus
Sync the repo, run the make command. Gotta do that on Linux OE a Mac.
Can you be more specific??
Uh...
http://source.android.com/source/building-kernels.html
The info is out there friend. The only thing missing from the above url is after you clone, you must checkout the repo:
Code:
git checkout origin/android-omap-tuna-3.0-jb-pre1

[Guide] Building from sources [Kernel only for now]

Hello everyone.
This guide will help you in building a kernel from source for your Nexus 10
Later, when 4.2 hits AOSP, i'll add a guide for building that too
You will need a computer running Linux / OSX to build the kernel, natively, or via a VM.
This guide assumes you’re running any Linux distro.
Getting a toolchain:
You need a toolchain to build the kernel.
The preferred one is Google’s toolchain, the same they use to build AOSP.
In a terminal, type:
Code:
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/[/url]
export PATH=$PATH:$(pwd)/arm-linux-androideabi-4.6/bin
export CROSS_COMPILE=arm-linux-androideabi-
TIp: paste the export statements in your ~/.bashrc to have them exported each login.
Getting the kernel source:
The kernel source for Nexus devices is available from Google’s servers.
Source : https://android.googlesource.com/kernel/exynos
Github Mirror: https://github.com/chirayudesai/android_kernel_exynos
Open the terminal, and type the below commands to get the kernel source on your computer.
Code:
mkdir -p android/kernel
cd android/kernel
For Nexus 10, we get the exynos kernel sources.
Code:
git clone [url]https://android.googlesource.com/kernel/exynos[/url]
Next, we change our directory to the newly fetched source.
Type
Code:
cd exynos
Figuring out what to build:
Now, we need to figure out which revision to build.
You need to be exactly sure about this, otherwise there are chances that the compiled kernel won’t work.
The commit to build upon can be found by a few ways.
To get the kernel sources matching the device tree, type the below in the device tree.
Code:
git log kernel
Then type the below in the kernel tree
Code:
git checkout <commit>
The commit of the version running on the current review units is 52f6ab1 (probably), which is same as branch android-exynos-manta-3.4-jb-mr1-fr .
Compiling:
Name of defconfig: manta_defconfig
cd to the directory of the kernel source, then type the below in a terminal.
Code:
export ARCH=arm
export SUBARCH=arm
Code:
make <name_of_defconfig>
make
The kernel image will be ready at arch/arm/boot/zImage
To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Nice work, it's been nice to see some instructions on building additional kernel modules too.
Sent from my GT-I9300 using Tapatalk 2
Great guide! I look forward to seeing your tutorial on compiling 4.2 from source .
Sent from my SCH-I535 using xda premium
Super awesome! I'm currently thoroughly:good: learning the rom building process with my nexus... ill get to this!
looking forward towards the development
Great! This is very helpful and useful
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
matt95 said:
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
Click to expand...
Click to collapse
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
cdesai said:
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
Click to expand...
Click to collapse
oh, now i get this :good:
i was able to make a build tonight from aosp, waiting for my device to arrive & then ill be able to test. but as far as i could tell the output sizes were pretty on compared to the factory image files i extracted http://renzy.me/aoi
...just realized i didnt extract proprietary binaries.
Hello, Cdesai.
Thanks for your guide!
I will do my best to learn it.
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
jrod091 said:
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
Click to expand...
Click to collapse
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
renzyyy said:
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
Click to expand...
Click to collapse
yeah that's true, but for instance with HTC S-OFFed devices you don't even need to flash the boot.img....
cdesai said:
... To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Click to expand...
Click to collapse
you can extract the contents from the factory image & use getramdisk.py to get the ramdisk.img out of the current boot.img (or use this ramdisk.img)
then once youve compiled the kernel successfully, use mkbootimg from android_bootimg_tools.tar.gz to repack your boot.img.
if you want to just test...
fastboot boot [new-boot.img]
and flash if satisfied...
fastboot flash boot [new-boot.img]
just tested out if anyone wants some verification... screenshot
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Is there any chance of this becoming an OC kernel in the future?
craigacgomez said:
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Click to expand...
Click to collapse
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
sam3000 said:
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
Click to expand...
Click to collapse
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
craigacgomez said:
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
Click to expand...
Click to collapse
I had actually just got to the point of realising I could make it work by explicitly setting the unc path in mount command options. The missing patch would explain it.

[Q] RIL Development sgh-t999

Hi everyone,
recently I have built and flashed on my sgh-t999 (galaxy S3 US tmobile version) CM11 Nightly. For my pro0ject however I need to modify two libraries of the Radio Interface Layer (RIL), libril.so and libreference-ril.so. I tried to modify the ones in the forlder /hardware/ril/ and build everything again with no results. Any change that I made to those files (such as ril.cpp in the folder libril) would not affect the functionality of the phone.
Finally yesterday I understood that when I build those libraries for the target cm-d2tmo-eng, those files that I have modified are not considered at all! When the libraries are built indeed, the system automatically takes the libril.so and libreference.so present in the vendor folder!
The problem is that those libraries in the vendor folder and already compiled and I cannot modify them. The question is:
Is there any way that I compile those libraries from the source code that I have modified?
Thanks,
brok85
Given that there is a unified D2LTE Build on CM, can you elaborate on what changes you wish to make to these libraries ?
To answer your question, You can do one of two things.
Grab the CM Source Code from the Device Tree of D2LTE. Make your relevant changes and check in the changes if they boot ok on your device. That way those changes will be included in future builds of CM and other Roms that use it.
If you do not wish to do so, then you will have to compile those libraries using C++ Compiler on a *NIX box and replace them in the Vendor folder.
Perseus71 said:
Given that there is a unified D2LTE Build on CM, can you elaborate on what changes you wish to make to these libraries ?
Click to expand...
Click to collapse
Well, as fisrt I just wanted to insert some log to be able to follow the code execution from the logcat or do something similar.
Perseus71 said:
To answer your question, You can do one of two things.
Grab the CM Source Code from the Device Tree of D2LTE. Make your relevant changes and check in the changes if they boot ok on your device. That way those changes will be included in future builds of CM and other Roms that use it.
Click to expand...
Click to collapse
Sorry but I am kind of new on this things. I have already downloaded the source code from the device tree and made my modifications in the files ril.cpp contained in [path-to-android-source]/hardware/ril/libril/ril.cpp. What I did was commenting the whole code within the function RIL_onUnsolicitedResponse() and listenCallback() such that in theory, the phone is not able to display incoming calls for example. However after flashing the re-built android I am still able to receve calls. How can I "check in the changes if they boot ok on my device"?
Perseus71 said:
If you do not wish to do so, then you will have to compile those libraries using C++ Compiler on a *NIX box and replace them in the Vendor folder.
Click to expand...
Click to collapse
I tried to remove the libril.so in the vendor folder and compile again using
# . build/envsetup.sh
# lunch (and select d2tmo)
# mmm [path-to-android-source]/hardware/ril/libril".
The problem is that when I indicate the target after lunch, the compiler looks for the vendor libraries and stop the build. What I am doing wrong?
Sounds like Compiler Dependacy path is set different from the code base. I will look further before commenting.
For when your changes are for the benefit of the community of users, you check in the changed code back to the Device Tree with detailed comments within the code and while checking in.
Perseus71 said:
Given that there is a unified D2LTE Build on CM, can you elaborate on what changes you wish to make to these libraries ?
To answer your question, You can do one of two things.
Grab the CM Source Code from the Device Tree of D2LTE. Make your relevant changes and check in the changes if they boot ok on your device. That way those changes will be included in future builds of CM and other Roms that use it.
If you do not wish to do so, then you will have to compile those libraries using C++ Compiler on a *NIX box and replace them in the Vendor folder.
Click to expand...
Click to collapse
Perseus71 said:
Sounds like Compiler Dependacy path is set different from the code base. I will look further before commenting.
For when your changes are for the benefit of the community of users, you check in the changed code back to the Device Tree with detailed comments within the code and while checking in.
Click to expand...
Click to collapse
Actually this is what I get after deleting
libril.so in vendor/samsung/d2tmo/proprietary/lib/
and after executing mmm /hardware/ril/libril :
No private recovery resources for TARGET_DEVICE d2tmo
make: *** No rule to make target `vendor/samsung/d2tmo/proprietary/lib/libril.so', needed by `/home/brok85/Documents/android/system/out/target/product/d2tmo/system/lib/libril.so'. Stop.
make: Leaving directory `/home/brok85/Documents/android/system'
If u want to build from source, delete the line that copies in vendor-blobs.mk
If u want to copy the blob instead of building it from source, keep the line
It'll be better if u provide us the device and vendor trees links
blackbeard said:
If u want to build from source, delete the line that copies in vendor-blobs.mk
If u want to copy the blob instead of building it from source, keep the line
It'll be better if u provide us the device and vendor trees links
Click to expand...
Click to collapse
I am not sure to understand what should I provide Sorry, as I said I'm kind of new here...
Also, I can not find vendor-blobs.mk...Where it should be?
brok85 said:
I am not sure to understand what should I provide Sorry, as I said I'm kind of new here...
Also, I can not find vendor-blobs.mk...Where it should be?
Click to expand...
Click to collapse
You said you built a cm11 for ur device. So for that you needed the device and the vendor trees. Give the link of those, if they are on the git
And vendor-blobs.mk would be present in the vendor folder under your device folder
blackbeard said:
You said you built a cm11 for ur device. So for that you needed the device and the vendor trees. Give the link of those, if they are on the git
Click to expand...
Click to collapse
Well I have followed the guide in the following page
http://wiki.cyanogenmod.org/w/Build_for_d2tmo
The link from where I have obtained the repository is
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
and then
$ breakfast d2tmo
blackbeard said:
And vendor-blobs.mk would be present in the vendor folder under your device folder
Click to expand...
Click to collapse
Actually now I think I was able to compile the library following your instructions. Unfortunatly, when I have built and flashed everything in the galaxy S3, I was not able to use the network. Probably some compatibility issue?
When I compiled libril.so, I have obtained it from the folder /hardware/ril/libril which should contain google source code, maybe not compatibale with my device...is it right?
thanks a lot for the help guys
brok85 said:
Actually now I think I was able to compile the library following your instructions. Unfortunatly, when I have built and flashed everything in the galaxy S3, I was not able to use the network. Probably some compatibility issue?
When I compiled libril.so, I have obtained it from the folder /hardware/ril/libril which should contain google source code, maybe not compatibale with my device...is it right?
Click to expand...
Click to collapse
You know, silly question. But just so we can rule out. Did you at any point compiled the CM11 code as is and flashed to the phone ? How did Network behave ? Was everything ok ?
Galaxy S3 is a very open platform with standard hardware and chipsets. So the Default google code should work out of box with it. If you have network issues, then just for kicks you can flash a custom Kernel on top of your compiled CM 11. See how that goes.
Perseus71 said:
You know, silly question. But just so we can rule out. Did you at any point compiled the CM11 code as is and flashed to the phone ? How did Network behave ? Was everything ok ?
Click to expand...
Click to collapse
No silly question at all
I have compiled CM11 as it is and worked perfectly. I could use the network.
Perseus71 said:
Galaxy S3 is a very open platform with standard hardware and chipsets. So the Default google code should work out of box with it. If you have network issues, then just for kicks you can flash a custom Kernel on top of your compiled CM 11. See how that goes.
Click to expand...
Click to collapse
The procedure I have followed is the following one:
1) Delete the llibril.so and libreference-ril.so from the vendor library. These are the pre-compiled vendor libraries that I need to modify.
2) commented the lines from the vendor-blobs.mk that were including those two precompiled libraries.
3) go to android/system/ and run "mmm /hardware/ril/libril" and "mmm /hardware/ril/reference-ril" to obtain the modified libril.so and libreference-ril.so respectively.
4) copied the new libraries just obtained in the vendor folder where the pre-compiled libraries were
5) re-include the lines commented in point 2).
6) run brunch d2tmo
7) flash the .zip obtained
Any mistake?
Perseus71 said:
You know, silly question. But just so we can rule out. Did you at any point compiled the CM11 code as is and flashed to the phone ? How did Network behave ? Was everything ok ?
Click to expand...
Click to collapse
No silly question at all. Yes I have built everything out of the box and worked perfectly. I could use the network.
Perseus71 said:
Galaxy S3 is a very open platform with standard hardware and chipsets. So the Default google code should work out of box with it. If you have network issues, then just for kicks you can flash a custom Kernel on top of your compiled CM 11. See how that goes.
Click to expand...
Click to collapse
I followed the following procedure to include my modified libraries:
1) Eliminate precompiled vendor libraries: libril.so and libreference-ril.so from the vendor folder
2) comment lines in the vendor-blobs.mk that included those two precompiled libraries
3) from /android/system/ executed command "mmm /hardware/ril/librail" and "mmm /hardware/ril/reference-ril" to obtain the modified libril.so and libreference-ril.so
4) copied the new libraries in the vendor folder in the same places were the precompiled libraries were positioned
5) re-include the two lines that were commented in point 2)
6) build everything again with brunch d2tmo
7) flash the .zip obtained
Any mistake?
Unless I am having a brain fart that process seems about right. I wonder if your RIL changes are related to the network
What kind of issues do you see ?
Perseus71 said:
Unless I am having a brain fart that process seems about right. I wonder if your RIL changes are related to the network
What kind of issues do you see ?
Click to expand...
Click to collapse
It cannot even find the network operators. It says that it is impossible to connect and to try later...
mine is the Tmobile version of S3. May this influence?
That would depend on the changes you made. But otherwise not really. The underlying Device tree is unified for all US S3 devices.

Categories

Resources