[SCRIPT] Kernel building script Team BlueRidge - HTC Wildfire S

I have written a script that should allow anyone with basic knowledge to build a kernel.
This script will walk you threw everything neccessary, and is centered toward the wildfire s. It is universal however.
This is the first release and there are improvements on the way, if there are any features you need or wannt let me know and i willl look into them.
PLEASE DO NOT COPY
V1
Down updated now
V2
https://github.com/simonsimons34/kernel-building-script
This is where it will be updated
if you find issues, go ahead and report it on the issue tracker. If it gets annoying i will just ignore it though so use wisely...
If you find this useful please hit thanks
for now follow please follow the cm wiki.
you need the proper packages
then the ndk
then you need to link the gcc files and /bin content files in the toolchain of ndk to /bin symbolically (sudo ln -s (drag in files))
then you should chmod the entire contents
then go to the kernel source directory
then run make mrproper
now pull a config from your phone (adb pull proc/config.gz ~/config.gz)
then take that gz and extract the config move to the kernel source and rename with a . in front.
Now, do make menuconfig in a terminal that is cd'd to that kernel source
now do this make ARCH=arm CROSS_COMPILE=/path/to/ndk/toolchain/bin/arm-androideabi-

Reserved for changelog

link is dead

CMDA or GSM or both?

Dead link
Sent from my HTC_A510c using Tapatalk

well ill get to it when i can but right now im doing a upload of everything i have to github. then im going to work on cm more. School makes working on these things hard. sorry i just dont have time right now. I added what i do though
check op

disregard last post i decided to rewrite
https://github.com/simonsimons34/kernel-building-script
Thats the location, you know what to do

Related

Flashing Galaxy S kernel from update.zip : template update.zip

NEWS :
Koush's bmlunlock (a simple IOCTL send to the bml device) is just out and can replace redbend_ua !
http://github.com/CyanogenMod/android_device_samsung_bmlunlock
Hey
Is Flashing from update.zip the new trend ?
'Don't know but here is how you can do it quite easily using this template.
If you target a GT-I9000 on Eclair, you'll need to customize one thing :
In build-update-zip.sh, set DROID_HOME to the source code path for your local Android repository.
If you target another Galaxy S phone or another version of Android, you'll need to adjust ro.hardware and ro.build.id properties accordingly.
This template is done for Linux/Unixes/OSX.
If Linux cost too much for you or your employer, please contribute by sending a .bat equivalent to the .sh
Of course, you also need to put a valid zImage to replace the template's empty zImage
Feel free to adjust to your needs. License is WTFPL
Note : requirement are Java and Android source repo, already build.
Looks awesome!
I have a question though... why do you need to flash the kernel in an update.zip at boot?
As far as I know, the system will read the kernel at boot up time and load it into ram. It won't access the on-disk file again until the next boot. If that is true, then flashing while running should be 100% safe, right?
RyanZA it's an update.zip, not a ramdisk.
The point is getting an easy flashing method, requiring no computer.
And you don't even need to root your phone !
curio, as i see this script is quite simple, so dont u think this all could actually be done on the phone directly? i mean if people cant afford a linux machine...
edit:
sorry for major dumbness, but do you think this could also somehow be used to reflash a nandroid backup?
FadeFx said:
curio, as i see this script is quite simple, so dont u think this all could actually be done on the phone directly? i mean if people cant afford a linux machine...
Click to expand...
Click to collapse
I don't think the signing tool works on android -- maybe it does? Anyway editing scripts on a phone seems a bit silly!
FadeFx said:
curio, as i see this script is quite simple, so dont u think this all could actually be done on the phone directly? i mean if people cant afford a linux machine...
edit:
sorry for major dumbness, but do you think this could also somehow be used to reflash a nandroid backup?
Click to expand...
Click to collapse
Nope actually this is not dumb at all
Yes the flashing part run in updater-script can be started manually.
In the script :
Code:
"redbend_ua", "restore", "zImage", "/dev/block/bml7"
The update.zip presented here mainly targets custom kernel creators in order to give them another way to distribute their work.
This is a working example of how to use redbend_ua programmatically, hopefully it may help new ideas coming. redbend_ua usage is not limited at all to kernel flashing.
PS : you can use this template with windows as well, you'll just need to translate the ulta-basic .sh to a .bat script, or do the signing part manually.
supercurio said:
Hey
If you target a GT-I9000 on Eclair, you'll need to customize one thing :
In build-update-zip.sh, set DROID_HOME to the source code path for your local Android repository.
Click to expand...
Click to collapse
quick question, the build-update-zip.sh is not a must if i only want to flash zImage, rite?
looks like that, I need to modify updater-script (if needed), as well as putting a zImage into ur zip file, and finally remove the build-update-zip.sh from ur zip attached
then, ur zip file can be used for flashing
is it correct?
thx
So this will let people flash any rom from an update.zip (once the ROM makers take this into account) via RomManager without ever having to use Odin to get off stock?
Awesome!
Thanks for the update script curio! this looks great.
One quick question - ive noticed several update.zip scripts for the galaxy S
have update-binary included.
Does anyone know what that does?? where did you get yours?
ive had success in using update.zips without that file at all.
Could anyone post information on what that binary is/does?
supercurio said:
Hey
Is Flashing from update.zip the new trend ?
'Don't know but here is how you can do it quite easily using this template.
If you target a GT-I9000 on Eclair, you'll need to customize one thing :
In build-update-zip.sh, set DROID_HOME to the source code path for your local Android repository.
If you target another Galaxy S phone or another version of Android, you'll need to adjust ro.hardware and ro.build.id properties accordingly.
This template is done for Linux/Unixes/OSX.
If Linux cost too much for you or your employer, please contribute by sending a .bat equivalent to the .sh
Of course, you also need to put a valid zImage to replace the template's empty zImage
Feel free to adjust to your needs. License is BSD anyway.
Note : requirement are Java and Android source repo, already build.
I'll add some documentation later.
Click to expand...
Click to collapse
dseo80 said:
Thanks for the update script curio! this looks great.
One quick question - ive noticed several update.zip scripts for the galaxy S
have update-binary included.
Does anyone know what that does?? where did you get yours?
ive had success in using update.zips without that file at all.
Could anyone post information on what that binary is/does?
Click to expand...
Click to collapse
Thats for the updater-script i believe. In most cases, theres a update-script in the zip's as well and the recovery picks that up in which case it doesn't need the binary and hence works.
Okay !
Answers hour
ykk_five said:
quick question, the build-update-zip.sh is not a must if i only want to flash zImage, rite?
looks like that, I need to modify updater-script (if needed), as well as putting a zImage into ur zip file, and finally remove the build-update-zip.sh from ur zip attached
then, ur zip file can be used for flashing
Click to expand...
Click to collapse
When you run ./build-update-zip.sh,
- it produce a temp zip file containing appropriate files in it.
- then there'is the signature part, building another .zip, ready to be used.
- this "final" update.zip is put in the same current directory and you can use it as it is.
No further complication
Brantyr said:
So this will let people flash any rom from an update.zip (once the ROM makers take this into account) via RomManager without ever having to use Odin to get off stock?
Awesome!
Click to expand...
Click to collapse
Yes, to flash a complete ROM (several partitions) one more thing is needed.
On command line, redbend_ua accept only one command.
In order to run several commands successively (ie flash multiple partition like Odin does), you'll need to write them in a file.
The file /cache/ota/command should do the trick, but it's untested right now.
There may be other method to prevent rebooting after flashing (hacking the redbend_ua binary, finding the appropriate command line option or removing the reboot command temporary)
dseo80 said:
Thanks for the update script curio! this looks great.
One quick question - ive noticed several update.zip scripts for the galaxy S
have update-binary included.
Does anyone know what that does?? where did you get yours?
ive had success in using update.zips without that file at all.
Could anyone post information on what that binary is/does?
Click to expand...
Click to collapse
Right, many update.zip done today are made without knowing anything about how it really works
I studied a bit before creating mine, here is a walk-through this fairly undocumented process :
- recovery mounts /sdcard/
- recovery search for a default file named : META-INF/com/google/android/update-binary in the zip and runs it : see the source in bootable/recovery/install.c
- update-binary is actually updater in sources
- updater looks into the zip file to the script file named updater-script, update-script is obsolete
- updater then runs the commands listed in updater-script : here is the list of commands.
- then reboot
The only documentation I know for this command is the recovery/updater/install.c file itself
supercurio said:
When you run ./build-update-zip.sh,
- it produce a temp zip file containing appropriate files in it.
- then there'is the signature part, building another .zip, ready to be used.
- this "final" update.zip is put in the same current directory and you can use it as it is.
Click to expand...
Click to collapse
ok,thx
but one more thing i want to know is, u said the path must be changed to the android repo, so do u mean the source code for the kernel like linux-xxx-2.xxx dir?
Thx
@ykk_five
Content of build-update-zip.sh v1 :
Code:
#!/bin/sh
DROID_HOME="/home/curio/dev/mydroid"
zip -r /tmp/update.zip META-INF/ redbend_ua zImage
java -jar \
$DROID_HOME/out/host/linux-x86/framework/signapk.jar \
$DROID_HOME/build/target/product/security/testkey.x509.pem \
$DROID_HOME/build/target/product/security/testkey.pk8 \
/tmp/update.zip update.zip
rm /tmp/update.zip
adb push update.zip /sdcard/
DROID_HOME="/home/curio/dev/mydroid" : you set here the directory of your Android AOSP directory.
See : http://source.android.com/source/download.html
Create an empty directory to hold your working files:
$ mkdir mydroid
$ cd mydroid
Run "repo init" to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
* If you would like to check out a branch other than "master", specify it with -b, like:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
Click to expand...
Click to collapse
This is this mydroid directory
The one that contains Android git source home directory, and compiled files in the out/ subdir
many thx for ur detailed explanation, supercurio!
Thanks curio,
very helpful explanation!
Thanks supercurio for the template!
However, there is no need to spend many hours (depending on hardware and bandwidth) pulling down 100s of megabytes of source and compiling it all if all you want is to sign an update.zip with test keys (if you already have the zImage)!
Just google around for "signapk.jar test keys" and you will get there.
BTW: I know that koush, leshak and wesgamer have Samsung Galaxy S trees up at Github but are they fully merged with AOSP yet?
I'm planning to go build my own kernel for this beast to try to solve the mono FM radio mystery, but last time I checked around it was said that the SGS tree required the use of a custom toolchain to get it to work at all.
Any comments on this?
Hey miki4242 !
Good to know that signapk.jar doesn't require hundred of megs of dependencies
About toolchain, you can use the one indicated by Samsung (CodeSourcery) but you'll face the big and ugly WakeLag.
I recommend you crosstool-ng or buildroot to build toolchains, with gcc 4.3.x march=arm mcpu=cortex-a8 mtune=cortex-a8 (no 4.4.x with march=armv7-v)
The building tutorial will be a part of the documentation I'll publish with my lagfix opensource release
Right now these info are too hard to find.
PS : I send you a mail with attached .config for ct-ng !
supercurio said:
Hey miki4242 !
Good to know that signapk.jar doesn't require hundred of megs of dependencies
Click to expand...
Click to collapse
supercurio said:
PS : I send you a mail with attached .config for ct-ng !
Click to expand...
Click to collapse
Thanks for the info !
Sorry for my ignorance, but does this mean someone can package Froyo in an update.zip and we could update it directly on our phone without needing Samsung Kies or Odin?
@supercurio:
Thanks for this well working template.
In updater-script:
Code:
line 17: package_extract_dir("zImage", "zImage");
should be
Code:
package_extract_file("zImage", "zImage");
But it did work with package_extract_dir, for some reason, too.
Btw, could you send me the config for ct-ng ?
I'm also struggling with this wakelag.

[KITCHEN] Minimal kernel building VM with scripts

I added some convenience scripts to the config. Read the new tutorial here
The old one still works:
I put together a small virtualbox vm with a very minimal debian config with which I was able to compile a working kernel. This is for all the people who are running Windows, and want to try modifying kernels/initramfs's. As this is a minimal config there are some drawbacks (like it doesn't have a graphical interface), but you can always install additional packages, if you want to.
The VM includes: debian, build essentials, git, vb guest additions, mc, vim and codesourcery 2010q1 gnu-eabi. (it's larger than the simple eabi version, but can be used to compile non-kernel applications too)
First of all I hate both SunOracle VirtualBox and debian, but VB is free, and debian is lean, so they'll do the job.
To get the image running do the following:
First download and install VirtualBox
Next download the VM image: http://android.sztupy.hu/dl/KernelCompilerVM-1.1.7z and extract it. (it's a large download. If you can please put it up a mirror)
Mirrors: (thanks to the people mirroring it)
- http://www.multiupload.com/THJV19BJ9X
- http://bote.ro/sztupy/KernelCompilerVM-1.1.7z
After this run virtualbox, and import this VM.
Run the VM. The username/passwords are: root/root and kernel/kernel. Login with kernel. (you can always switch to root using sudo)
Next choose what kernel/initramfs you want to compile.
Here are some links to kernels:
The original sources can be found at supercurio's git:
Code:
git://github.com/project-voodoo/linux_gt-i9000.git
froyo-samsung branch
The kernel of the voodoo project can be found at the same place:
Code:
git://github.com/project-voodoo/linux_gt-i9000.git
froyo-voodoo branch
The ULTK kernel can be found at my account:
Code:
git://github.com/sztupy/universal_lagfix_kernel.git
Here are some links to initramfs files:
The original froyo initramfs can be found at supercurio's git page:
Code:
http://github.com/project-voodoo/samsung_ramdisks.git
afaik the voodoo initramfs is build using scripts from these images, so you have to apply them.
The ULTK initramfs can be found here:
Code:
git://github.com/sztupy/universal_lagfix_kernel_initramfs.git
For the rest of the tutorial I'll be showing how to compile ULTK:
First get the kernel sources using git:
Code:
git clone git://github.com/sztupy/universal_lagfix_kernel.git kernel
Unfortunately no copy-paste function is available, so you have to write this manually...
Next get the initramfs using git:
Code:
git clone git://github.com/sztupy/universal_lagfix_kernel_initramfs.git initramfs
If everything goes well you'll have two directoryes, called kernel and initramfs. Next we have to modify some values in the kernel configs.
Nano, mcedit and vim are installed, use the one that suits you best. (mcedit is the most user friendly)
Switch to the kernel directory and edit the Makefile there:
Code:
cd kernel
nano Makefile
Find the row that says
Code:
CROSS_COMPILE ?= some value
Replace it to
Code:
CROSS_COMPILE ?= /home/kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
(if using nano make sure it won't add a line break into the row)
Next load the default config:
Code:
make aries_eur_defconfig
And edit it:
Code:
nano .config
We have to supply the directory of the initramfs. Search for the line:
Code:
CONFIG_INITRAMFS_SOURCE=some value
and replace it to
Code:
CONFIG_INITRAMFS_SOURCE=/home/kernel/initramfs/out
(this is for the ULTK. For voodoo the initramfs locations are "froyo-xxjp6" and "froyo-xxjpm" instead of "out")
if you've managed to do that too, let's compile the kernel:
Code:
make
If everything goes fine after a while you will have your shiny new kernel. Now let's get it to your computer, so it can be flashed:
First, you have to create a shared folder in VirtualBox. Simply create a directory somewhere on your computer, and add it as a shared folder in virtualbox. The name of the shared folder should be simple, for example "shr".
Next, you have to mount that directory inside the VM. To do this enter:
Code:
sudo mount -t vboxsf shr ~/share
After it has been mounted you can copy the fresh kernel to your host OS:
Code:
cp arch/arm/boot/zImage ~/share
If everything goes well you have a zImage ready at the folder you've just shared. TAR it, fire up odin, and flash.
---------------------------------
Now that you've succesfully compiled a working kernel try to modify it. You can use "make menuconfig" in the kernel directory to switch some kernel functions (like filesystem supports) on and off. You can edit .config by hand to add or remove some configuration values. And you can edit the files in the initramfs directory. After modifications you only have to enter "make" in the kernel directory to get your kernel inside the "arch/arm/boot/zImage" dir ready.
You can also copy files from your host OS, to the guest OS, by putting the file inside the shared folder and copying it:
Code:
cp ~/share/thefile ~/initramfs/copyithere
Hope this guide was useful.
Impressive, thanks. Even a noob like me can try this.
Oh god, not only a talented developer, but a community helper!
STICKY!!
Gonna try it laters <3
oh yea, nice!
DocRambone said:
Impressive, thanks. Even a noob like me can try this.
Click to expand...
Click to collapse
If you're a noob, then I'm a baby
Darkyy said:
If you're a noob, then I'm a baby
Click to expand...
Click to collapse
high time you start compiling kernels
tnx
its very usefull
Magnificent!
I just came to take a quick look, but the thread deserves a closer one.
Thank you for sharing knowledge.
Worthy of a sticky.
Hopefully this will solve all those "I want this in a kernel but not that" scenarios.
This is VERY nice for the devs.. but.. i think this will make this forum spammed with 69 diff kernels with just minor changes.. as with the roms
Its better to let other people brick their phone than you brick your own
Just kidding! I for one will try and compile different versions with different lag-schemes to find the fastest combination. Including /system with fastest reading. I think I will add a benchmark to the recovery menu directly. Benchmarking each mount for read and for write speeds. Maybe I can use backup/restore code and just time it without writing (cp to null). Lets get to work
Thanks sztupy!
Sent from my GT-I9000 using XDA App
_JKay_ said:
Its better to let other people brick their phone than you brick your own
Just kidding! I for one will try and compile different versions with different lag-schemes to find the fastest combination. Including /system with fastest reading. I think I will add a benchmark to the recovery menu directly. Benchmarking each mount for read and for write speeds. Maybe I can use backup/restore code and just time it without writing (cp to null). Lets get to work
Thanks sztupy!
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
You cannot brick your phone with a bad kernel
@sztupy
I am impressed how productive master mind and kind person you are sharing all your knowledge and developments with us.
Congratulation, with you contributions you push Android Development forward.
Thank you
this is really cool, if i need minimal GUI, what would you suggest? xfce ? or there is something smaller and lighter? thx again.
avary said:
this is really cool, if i need minimal GUI, what would you suggest? xfce ? or there is something smaller and lighter? thx again.
Click to expand...
Click to collapse
Fluxbox/Openbox. However I don't see the need for one, if you're running the machine just for compiling.
Also, shouldn't gpm+guest additions solve the copy-paste problem?
E: Apparently not. Meh, stupid virtualbox.. sshd+putty then!
Awesome! Thanks for this sztupy! The more people we can get involved in this stuff, the better the end result will be. Always!
aziztcf said:
Fluxbox/Openbox. However I don't see the need for one, if you're running the machine just for compiling.
Also, shouldn't gpm+guest additions solve the copy-paste problem?
E: Apparently not. Meh, stupid virtualbox.. sshd+putty then!
Click to expand...
Click to collapse
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
avary said:
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
Click to expand...
Click to collapse
I'd use a shared folder+IDE/editor/whatever on windows. But that's just because I have so awful experiences about X in VMs, things might be better nowadays
Thanks a lot sztupy, will try it now. Sunday is enough time for testing
Each morning i have a look at XDA and you have brought out a new very helpfully posting, kernel, rom or else!
So let me ask you one question: when do YOU sleep?
avary said:
actullay i was looking for something light and minimal (with GUI, or at least something like PCman FM and gedit or kedit, im not good with emac, vi ) to play and compile AOSP, for now i do this with Kubuntu dual boot on my laptop. if i put a litghweight desktop on top of szytup's image and use it with VB, that would be great.
thank you !
Click to expand...
Click to collapse
The advantage of using X is that afaik guest additions has copy-paste support, that would make modifying easier.
I also plan on making some simple scripts inside the default home directory one can run to communicate with the shared folder. After that we could provide simple scripts that you only have to put inside the shared folder, which will download, modify and run the compilation.

5/6 <DEV> [WIP] {ROM} 'AOSEP' Community Development "Build your own cm7/cm9/?"

5/6 <DEV> [WIP] {ROM} 'AOSEP' Community Development "Build your own cm7/cm9/?"
AOSEP V2.5​
Android Open Source Education Project​See post #191 for updated scripts
By following these instructions and/or using this set of files, you
proceed at your own risk. Under no circumstances would you hold
dizgustipated or anyone, except yourself, responsible for any negative consequences.[/COLOR][/I][/B]
################
***********************
################
I came across a "new" way of thinking over on a different thread, and have decided to adopt it.
I will still be developing and releasing roms,
but
Basically, I want to get you more involved in developing.
Allow you the chance to learn, contribute, and take pride in your accomplishments.
Possibly further the development of android, and see a whole new world open up to you.
That's why and how I got into developing. In was very curious, and unhappy with current rooms and update frequency. Or just with features available.
see post 2 for more info on the philosophy
I'd like to share a little script I found, and modified (with permission, and is still a work in progress) to automate the sync/build/package cycle, and to push the XDA community to get involved on a deeper level.
This whole process is designed for the latest stable Ubuntu (10.04/11.10), though it might work with Debian as well (or even other distros, if you have all the prerequisites already installed).
Alternatively, on tbe last post, you will find a handy script that gives a good shot at automating the whole prerequisites ordeal.
Place it in your root directory, navigate to it in terminal and type
Code:
Code:
sudo ~/installer.sh
Any brave souls willing to try?
I know you're impatient to get started, this script also contains a little guide, so check it out. I haven't had much opportunity to test this script because it takes so much time to start from scratch, so please help me out!
As of now, I have made many full builds this way, as well as a few incremental updates. Feel free to modify the MIT-licensed script. There are two time-consuming steps (4 and 6), so I'd recommend planning accordingly. Also make sure you have plenty of space on your disk; my working directory currently contains about 23GB.
0. I prefer you to start from scratch, (we want a clean start) as follows:
1. Make a folder for all your Android-building needs.
In your home directory, make a folder called "android"
Code:
Code:
mkdir android
and drop the text file in there, (in the new "android" directory, named Makefile (with no extension).
(Alternatively, you can open the make file, and edit the repo init to your preferred sgt7 repo sourcecode. Also, if you change repo address, you will need to make Bacon, instead of make package.)
Then open your favorite terminal app and navigate to that folder.
Code:
Code:
cd android
2. If you don't have any of the tools installed yet, and you're on Ubuntu, do this:
Code:
Code:
sudo apt-get install build-essential
sudo make apt
3. Initialize your working directory:
Code:
Code:
make init
4. Fetch the source code:
Code:
Code:
make sync
nb: It might take a while to fetch ~5.7GB of code off the Internet, depending on your connection. It might also hang, in which case you gotta stop the process, and retry (make sync) until you have everything. When you retry, you might want to do `make sync J=4` to reduce the concurrency. If it then complains about corrupt repositories ("not a repository"), you must delete the corrupt repositories and retry. You'd know it's frozen if "Fetching projects" does not progress for a minute or so.
(after a sync, seeing:
if ! grep -q "<stddef.h>" /home/diz/android/system/external/mesa3d/src/glsl/linker.cpp; then \
sed -i '1i #include <stddef.h>' /home/diz/android/system/external/mesa3d/src/glsl/linker.cpp; \
fi
is normal, it is patching so you can build)
5. (This step is done for you in the sync)
Alternatively, if you are looking to get deeper into dev-ing, you can back up the files, boot into CM7 and do the following to start making your own device files.
Plug in your SGT7 via USB, boot into CM7/BOCA RC1, and make sure debugging is enabled... to get some vendor-specific files (proprietary bits from Samsung and prebuilt bits from CyanogenMod):
Code:*
Code:
make vendor
*This will overwrite my device files, if you do not wish to do so, move on to the next step.
6
Build that stuff:
Code:
Code:
make build
This takes a while, depending on your hardware... perhaps a few hours. It's best to do this step overnight.
*if you error out in the build on: android_reboot.c, download THIS and replace the file already in android/system/system/core/licutils(android_reboot.c)
7. Save a snapshot for later:
Code:
Code:
make snapshot
This is actually required for the next step. But don't worry: snapshots are incremental, so they don't use too much space; and it's safe to remove any snapshot except "current".
8a. Package it up:
Code:
Code:
make package CLEAN=1
Check the snapshots directory for your shiny new update.zip
8b.Or simply make Bacon.
Code:
make bacon
9. It's even easier to keep your source up-to-date:
Code:
Code:
make sync
make build
make snapshot
make package CLEAN=1
(unsigned)
or
Code:
make package CLEAN=1 SIGN=1
(signed)
Or
Code:
make bacon
This makes a GSM P-1000 flashable zip, you can easily exchange the zImage for a L or N kernel, in the zip, & then flash in recovery after clearing user data, dalvic cache and cache then flash ICS gapps
10.
Be joy full and post a screen shot or a build.
11.
Continue developing/contributing to the android community
... and don't forget to thank FatTire and inportb for allowing me to alter and post this script, which made this possible
5/6
Reserved for instructions on how to use different sourcecodes
And things of that nature.
What works if you start building here:
The beginnings of the stuff that makes it BOCA, which include:
auto beagleboard patch
auto cherry pick of cyanogen vold that allows the use of the 4th vold partition (this has been merged)
A bit more HW accel
better video playback in YouTube and your movie files.
better quadrant score
better linpack score
address space layout randomization, as part of the install
WIFI (but takes a long time for the first connection)
Bluetooth
GPS
Accelerometer
Gyroscope
Light
Magnetic field
Orientation
Battery stats
Sound and sound recording
root
a bit of HW acceloration
better video playback (encode/decode)
recent apps button
Auto rotation (for launcher rotation, enable it in CM launcher)
Gallery
Flash
DSP Manager!!!
USB pc trickle charge
Market
Voodoo Sound
sdcard mounts are: internal (sdcard) and emmc (external sd)
USB PC mounting
NOT WORKING SO FAR:
Phone?
Things may/may not be added at some point in the future. You should have no expectations that they will. Anyone who asks for an ETA for something or other gets collectively stoned by the crowd.
Hopefully this project will push some to help fix a few things, as all that is on the NOT WORKING list is NOT WORKING in all and any SGT7 CM9 ports
DO NOT POST BUGS!!!!
ONLY POST "FIXES, OR THINGS THAT HELP FURTHER DEVELOPMENT
THANKS:
JT1134
Fattire
inportb
Spacemoose1
Teknomancer
Github
AOSP
Google (both its search engine and os)
Especially all the sgt7 tab developers
& all android Developers
This list could go on forever!​
Diz, you did it again. Cheers.
Sent from my GT-P1000 using xda premium
massive thread update
REMEMBER, this is still a WIP
We are so lucky to have you here diz. I will send my fourth donation to you at the end of this month! Thank you for educating us so we can learn how to contribute. I would not be surprised if this will be adopted by the whole XDA-community.
EDIT: Happy birthday!
EDIT 2: Is this related to the repo problem at the top of post #1? http://pastebin.com/Hb5rAUFr
Sent from my GT-P1000 using xda premium
stekarson said:
EDIT 2: Is this related to the repo problem at the top of post #1? http://pastebin.com/Hb5rAUFr
Sent from my GT-P1000 using xda premium
Click to expand...
Click to collapse
EDIT
open the makefile
look for these lines:
Code:
else
cd ${SYSTEM}; repo init -u git://github.com/CyanogenMod/android.git -b ics
endif
curl http://pastebin.com/raw.php?i=AGP6wn42 > ${SYSTEM}/.repo/local_manifest.xml
## removes old files and allows init to start from scratch
change it to:
Code:
cd ${SYSTEM}; repo init -u git://github.com/CyanogenMod/android.git -b ics
endif
## removes old files and allows init to start from scratch
then go to android folder, press Ctrl H (to see all the files) and delete everything except the make file.
Then:
in your terminal, in the android directory:
Code:
make init
make sync
Now get the needed files, from the location on the top of the OP.
Place them.
THEN:
Code:
make build
make snapshot
make package CLEAN=1
As soon as its second party verified, I'll update op
From http://review.cyanogenmod.com/p/CyanogenMod/android_system_vold
* branch refs/changes/77/11277/1 -> FETCH_HEAD
# Not currently on any branch.
nothing to commit (working directory clean)
make: *** [sync] Error 1
That just means it has been merged, there is no longer a need to cherry pick it.
Ill take the code out.
This does not ruin your sync.
simple proceed to make build
http://
www.teamovercome.net/common/xDA-Badge-ProudUser.png[/
IMG][/URL]
[B][url]www.teamovercome.net[/
url][/B]: [I][COLOR="Red"]Home of The Overcome ROM
Overcome Kernel ![/COLOR][/I][/LEFT]​
op updated with new directions and a new makefile.
this way we can sync pure cm9 source, and add the vendor and device files of our choice.
And we also don't ever have to worry about "make sync" conflicting with any of the device specific files and causing a sync error.
Although, at this time, I do recommend the files listed in the instructions to get the results implied in post #3
update 1/9
uploaded new makefile:
removed cherry pick vold, it was merged, so no need to clutter the script and get empty repo errors.
First of all thanks for your great work. Im trying to use your guide but got stuck at the "make init" command. If I use this command I get the following error:
Code:
rm /home/lesley/android/sign.tgz /home/lesley/android/update-lite.tgz
if ! grep -q "0x2080" /home/lesley/android/.android/adb_usb.ini; then echo 0x2080 >> /home/lesley/android/.android/adb_usb.ini; fi
cd /home/lesley/android/system; repo init -u git://github.com/CyanogenMod/android.git -b ics
/bin/sh: repo: Permission denied
make: *** [init] Error 126
Nevermind deleted all the folders in the android folder except the make file. After that I did "make init" and it run great.
The make file chmods the bin folder,
Sometimes a reboot is needed for it to take effect.
But sometimes you will still get an issue with bin permissions or paths
Then try this in terminal in the same directory you use the make init command.
Code:
PATH="$HOME/bin:$PATH"
Then
Make build as usual
dizgustipated said:
The make file chmods the bin folder,
Sometimes a reboot is needed for it to take effect.
But sometimes you will still get an issue with bin permissions or paths
Try his in terminal in the same directory you use the make init command.
Code:
PATH="$HOME/bin:$PATH"
Click to expand...
Click to collapse
Thanks, I deleted the folders/files in the android directory except the make file. After that it worked great it's now syncing.
Thank you so much diz !
Making my own CM9 is so damn exciting !!
looking at the instructions , looks easy
Thanks again .
To do list on 15th Jan ( after exam )
Make my own CM9
Diz you are the best !!
Oh btw sorry for this useless post !
I'm stuck at step 5.. how can I download these files....
And what files should be in these folders
Sent from my LG-P999 using Tapatalk
---------- Post added at 05:44 PM ---------- Previous post was at 05:29 PM ----------
tried to follow from step 5 and got this....
http://pastebin.com/vRw7U0Zq
Edit: downloaded whole commit from your git. Included is android folder, device_Samsung_galaxytab folder and Samsung/galaxytab folder
Using cdesi cm9 folder as reference, copied contents in device_Samsung_galaxytab folder. Into Samsung/galaxytab folder then.put that into device folder under android/system then ran step 6b and now it seems to be building since.I have a out folder atm
Edit 2: got same error again. Can you be more specific in your instructions?
Just for p1000 tabs, right? Or for p1010 too?
samcortez said:
Just for p1000 tabs, right? Or for p1010 too?
Click to expand...
Click to collapse
There wont.be support for wifi only.tab......
Sent from my LG-P999 using Tapatalk
samcortez said:
Just for p1000 tabs, right? Or for p1010 too?
Click to expand...
Click to collapse
as the title states, GSM/CDMA?
your device is basically a different device, altogether.
Does your device have cm7 yet?
ayysir said:
tried to follow from step 5 and got this....
http://pastebin.com/vRw7U0Zq
Click to expand...
Click to collapse
yeah thats all part of the original repo error, that i will be fixing today.
But in the mean-time,
navigate to android/system/vendor/cm
open: vendorsetup.sh
add:
add_lunch_combo cm_galaxytab-userdebug
close and save
now make build again
dizgustipated said:
as the title states, GSM/CDMA?
your device is basically a different device, altogether.
Does your device have cm7 yet?
yeah thats all part of the original repo error, that i will be fixing today.
But in the mean-time,
navigate to android/system/vendor/cm
open: vendorsetup.sh
add:
add_lunch_combo cm_galaxytab-userdebug
close and save
now make build again
Click to expand...
Click to collapse
What about galaxytab folder
Sent from my LG-P999 using Tapatalk
The links at step 5 is 404.

[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?

[GUIDE] How to build kernel from source

Overview
Here are the steps to build your own kernel from source. This example does nothing special. It just shows you how to build the stock kernel. It is a good starting point to making your own stuff. Experts, please correct me where I am wrong. This stuff is still new to me also.
These instructions work for both T989 (T-Mobile) and I727 (AT&T) variants of the Samsung Galaxy S2 phones.
Special Thanks
Special thanks to "interloper" and "dtm_stretch" for helping me learn all of this. Couldn't have done it without them.
Requirements
I am using Ubuntu 10.10 32-bit to do all my builds
Instructions
1) Get Samsung Source Code
First you need to get a copy of the kernel source code from Samsung. You can download it from the link below.
For T-Mobile users download the one that says T989:
https://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=SGH-T989
For AT&T users download the one that says SGH-I727:
https://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=SGH-I727
2) Unzip Samsung Source Code
Unzip the source code you just download with this command:
For T989:
Code:
unzip SGH-T989_GB_Opensource.zip
For I727:
Code:
unzip SGH-I727_ATT_Opensource.zip
There will be 4 files extracted. The one we are interested in for this exercise is SGH-T989_Kernel.tar.gz for T989 devicees or SGH-I727_ATT_Kernel.tar.gz for I727 devices.
3) Extract Kernel
Next we need to extract the kernel into a directory.
For T989:
Code:
mkdir kernel
tar xzf SGH-T989_Kernel.tar.gz -C kernel
or
For I727:
Code:
mkdir kernel
tar xzf SGH-I727_ATT_Kernel.tar.gz -C kernel
4) Get a Copy of initramfs
Next you need to get a copy of the initramfs for your phone. For T989 users you can get the stock initramfs from bubby323's github here: https://github.com/bubby323/anomaly_kernel_platform_SGH-T989
For I727 users you must use the alternate method below to get the initramfs. T989 users can choose to use the link above or go with the alternate method below.
Alternate method:
You can extract it yourself from an existing boot.img file. I got mine off of my phone using clockworkmod backup (boot.img file) and using the extractboot tool to extract the initramfs. The tool can be downloaded here: http://www.mediafire.com/?lc12eceeh617b97
Extract extractboot.tar.gz
Code:
tar xzf extractboot.tar.gz
Call this to extract your boot.img to get the initramfs folder
Code:
extractboot boot.img
If you get any errors with calling extractboot, make sure "extractboot" and "split_bootimg.pl" are executable first. If not, use "chmod a+x extractboot" (do the same for split_bootimg.pl).
Once extracted, the "out/ramdisk" folder is your extracted initramfs folder.
reference: http://www.freeyourandroid.com/guide/extract-edit-repack-boot-img-windows
5) Download Arm Toolchain
This toolchain will allow you to cross compile for your phone. There are several versions to choose. I currently use the 2010q1 version here: https://sourcery.mentor.com/sgpp/li...1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
Or choose another version if you like (version 2009q3 seems to be popular): https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription3053
6) Extract Toolchain
Code:
tar xjf arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
7) Download mkbootimg Tools
Download mkbootimg tools from here: http://www.mediafire.com/?w06d1m6n1dgo4op
Extract the file with
Code:
tar xzf mkboottools.tar.gz
There will be three files
Code:
mkbootfs
mkbootimg
mkbootimg-sg2x
"mkbootimg" is the original program to make the boot image but is not used for our phone. Our phone requires an edit to the ramdisk address which is why I also included "mkbootimg-sg2x" which we will use instead.
*Extra Info: the default ramdisk offset is 0x01000000 while our phone needs 0x01400000.
Move the three files to somewhere in your system PATH.
8) Compile Script
Now we are ready to compile the kernel. I have provided a script below to automate the process. You will need to change the paths to work with your environment.
*For I727 users only: change "msm8660_celox_usa_tmo_defconfig" to "msm8660_celox_usa_att_defconfig" in the script below.
*Update: Thanks to InstigatorX for his comment:
Also, for ATT the celox make command should be "make msm8660_celox_usa_att_rev02_defconfig" to make the latest 2.3.6 kernel.
Click to expand...
Click to collapse
Code:
INITRAMFSDIR=~/t989/initramfs
export ARCH=arm
export CROSS_COMPILE=~/arm-2010q1/bin/arm-none-eabi-
cd kernel
make clean
make mrproper
make msm8660_celox_usa_tmo_defconfig
make -j4
# copy the freshly compiled modules to the initramfs.
cp crypto/ansi_cprng.ko $INITRAMFSDIR/lib/modules/
cp drivers/bluetooth/bthid/bthid.ko $INITRAMFSDIR/lib/modules/
cp arch/arm/common/cpaccess.ko $INITRAMFSDIR/lib/modules/
cp arch/arm/mach-msm/dal_remotetest.ko $INITRAMFSDIR/lib/modules/
cp drivers/net/wireless/bcm4330/dhd.ko $INITRAMFSDIR/lib/modules/
cp arch/arm/mach-msm/dma_test.ko $INITRAMFSDIR/lib/modules/
cp drivers/input/evbug.ko $INITRAMFSDIR/lib/modules/
cp drivers/media/video/gspca/gspca_main.ko $INITRAMFSDIR/lib/modules/
cp arch/arm/perfmon/ksapi.ko $INITRAMFSDIR/lib/modules/
cp drivers/video/backlight/lcd.ko $INITRAMFSDIR/lib/modules/
cp drivers/net/wireless/libra/librasdioif.ko $INITRAMFSDIR/lib/modules/
cp drivers/misc/msm_tsif.ko $INITRAMFSDIR/lib/modules/
cp arch/arm/oprofile/oprofile.ko $INITRAMFSDIR/lib/modules/
cp drivers/crypto/msm/qcedev.ko $INITRAMFSDIR/lib/modules/
cp drivers/crypto/msm/qce.ko $INITRAMFSDIR/lib/modules/
cp drivers/crypto/msm/qcrypto.ko $INITRAMFSDIR/lib/modules/
cp drivers/scsi/scsi_wait_scan.ko $INITRAMFSDIR/lib/modules/
cp drivers/spi/spidev.ko $INITRAMFSDIR/lib/modules/
cp drivers/misc/tsif_chrdev.ko $INITRAMFSDIR/lib/modules/
cp drivers/misc/vibetonz/vibrator.ko $INITRAMFSDIR/lib/modules/
9) Get Compiled Kernel
The compiled kernel image is in the kernel source folder under "arch/arm/boot/zImage"
Copy the zImage file to a working area, preferably where you keep your initramfs folder.
Here is an example folder structure:
Code:
work
- zImage
- initramfs
10) Make boot.img File
Next we need to merge the kernel and initramfs directory into a boot.img file.
zip up ramdisk
Code:
mkbootfs initramfs | gzip > ramdisk.gz
make boot image
Code:
mkbootimg-sg2x --kernel zImage --ramdisk ramdisk.gz --cmdline "androidboot.hardware=qcom msm_watchdog.appsbark=0 msm_watchdog.enable=1 loglevel=4" -o boot.img --base 0x40400000 --pagesize 2048
11) tar boot.img
Tar your boot.img file so it can be flashed with Odin.
Code:
tar cvf MyKernel.tar boot.img
md5sum -t MyKernel.tar >> MyKernel.tar
mv MyKernel.tar MyKernel.tar.md5
12) Flash with Odin
Flash MyKernel.tar.md5 with odin under PDA. Please follow the flashing guides found in other posts. They do a better job at explaining.
13) Experiment *
Now try to customize your kernel to add in new features and experiment. I am going to learn how to compile the stock platform also. Once I know how I will post up a guide for that also. If someone already has a guide to build the platform please post. Also it would be great if you can post sources for me to read so I can learn how to build the platform. Thanks.
Optional
You might notice that the modules you compiled are significantly bigger than the original stock modules that came with the phone. That is because the stock modules were stripped of all debug info. To do this you need to run the below command at the end to get the "stripped" modules. Change INSTALL_MOD_PATH to point to any folder you like to hold the modules. You then need to copy these modules instead of the ones in the build script above.
Code:
make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=~/stripped/modules modules_install
What's Next?
Go here to learn how to start making changes to your ROM: http://forum.xda-developers.com/showthread.php?p=23343879
Good heads up. Thanks for putting this out there.
Once edited this needs to get stuckod
Sent from my SGH-T989 using xda premium
Thanks so much for this! I've been trying to figure this out for months. (Learned alot in that time).
Kernel Built!
Daunting....ill stick to this side of the fence
Thanks though. Must be tough explaining all of that...
Sent from my Phablet. The Purple Phone Tablet.
Great info !! Super !
Some questions: 1. How does one allow for SELECTION of custom boot animation? Is that a kernel thing or some thing else?
2. What about adding things like Voodoo Sound or some mod like that?
Thanks for any info !!
chappatti said:
Great info !! Super !
Some questions: 1. How does one allow for SELECTION of custom boot animation? Is that a kernel thing or some thing else?
2. What about adding things like Voodoo Sound or some mod like that?
Thanks for any info !!
Click to expand...
Click to collapse
I am glad you like it. I wanted to post this guide up so that noobs like me have a good starting point to learn this stuff.
I can take a crack at answering your questions, but do note that I am also a noob:
1) I would think a custom boot animation would be part of the ROM but not sure
2) I do not know what Voodoo Sound is but if it is an application then it would be modifying the ROM. If it is an enhancement to the audio drivers then it is kernel. Either way I would not know what to change. Sorrry.
I know I wasn't much help. But I tried
By the way, I am currently trying to learn how to make my own custom ROM. If you know of any guides that would be great if you can post them here. I will definitely post what I find. Currently I am downloading ROMs from this forum and seeing what they did to learn. One thing I am still confused about is if these guys built these ROM from source or used the binaries from the Stock ROM as base.
Thanks.
Nice Guide man...
datzstr8 said:
I am glad you like it. I wanted to post this guide up so that noobs like me have a good starting point to learn this stuff.
I can take a crack at answering your questions, but do note that I am also a noob:
1) I would think a custom boot animation would be part of the ROM but not sure
2) I do not know what Voodoo Sound is but if it is an application then it would be modifying the ROM. If it is an enhancement to the audio drivers then it is kernel. Either way I would not know what to change. Sorrry.
I know I wasn't much help. But I tried
By the way, I am currently trying to learn how to make my own custom ROM. If you know of any guides that would be great if you can post them here. I will definitely post what I find. Currently I am downloading ROMs from this forum and seeing what they did to learn. One thing I am still confused about is if these guys built these ROM from source or used the binaries from the Stock ROM as base.
Thanks.
Click to expand...
Click to collapse
Roms such as AOKP or CM are compiled from source, otherwise known as AOSP. However, the majority of the roms you'll find here are not. To build a non-source rom a good starting point would be a system dump from your own phone, or find a pre-deodexed, stock base rom. From there, the tool of the trade is 7zip. View all the file via 7zip, pull files and modify. Now obviously, this is only a starting point, couldn't possibly go into advanced development with you. It takes time to learn and it's a lot of trial and error. Another helpful tool to learn is ADB commands and functionality. If you know this, it will save you a lot of time. Good luck!
This guide is a life-saver. I have compiled my own kernel for my desktop literally dozens of times, and have built distributions entirely from scratch two or three times (using Linux From Scratch), but was unable to figure this out myself due to the lack of a guide and things being scattered everywhere and people unwilling to help.
THANK YOU!!!!
I am really looking forward to your guide on how to build an Android system from scratch. I have also been trying to do this as well (Cyanogen), but am running into the same lack of information.
sombionix said:
Roms such as AOKP or CM are compiled from source, otherwise known as AOSP. However, the majority of the roms you'll find here are not. To build a non-source rom a good starting point would be a system dump from your own phone, or find a pre-deodexed, stock base rom. From there, the tool of the trade is 7zip. View all the file via 7zip, pull files and modify. Now obviously, this is only a starting point, couldn't possibly go into advanced development with you. It takes time to learn and it's a lot of trial and error. Another helpful tool to learn is ADB commands and functionality. If you know this, it will save you a lot of time. Good luck!
Click to expand...
Click to collapse
So Som,
When are we going to see another nice Bionix build from you. anything in plan or not really.
An automation script would be a juicy treat and i may have just the thing...will need to be modified for this and tested but tomorrow (today, oh look at the time) i can put it together. Also, try building using make gconfig. Load your default config with the gui and you can see what bits of the kernel can be changed.
Sent from my SPH-D710 using xda premium
Very nice guide! Thanks a lot!
I wondering about what is the difference between Hercules and Skyrocket sources? Is it only this "*For I727 users only: change "msm8660_celox_usa_tmo_defconfig" to "msm8660_celox_usa_att_defconfig" in the script below." ?
erickwill said:
Very nice guide! Thanks a lot!
I wondering about what is the difference between Hercules and Skyrocket sources? Is it only this "*For I727 users only: change "msm8660_celox_usa_tmo_defconfig" to "msm8660_celox_usa_att_defconfig" in the script below." ?
Click to expand...
Click to collapse
You will still need the proper source for i727. Config file just tells the compiler what to build.
:: LOVE MY HATERS :: DARKSIDE ::
These instructions assume the user already has the boot.img tools, bubby's initramfs and source code from the OP
1. Create a directory called t989-kernel
2. Download this package of tool chains and unzip it, making sure it is named "toolchains" toolchains
NOTE: There are many toolchains included in this pack and I have used them all to make kernel for the E4GT and they are all
sufficient for this task. However, should you move on to 3.X kernel I suggest using the Mjolnar or Linaro tools as they
are more suitable for that version.
3. Inside the "t989" directory deposit bubby's initramfs, the kernel source (extracted directory), toolchains and boot.img tools.
4. The names of the directories must be "ramdisk", "kernel" (kernel source), "toolchain", and "bin". Change them accordingly.
5. Put the attached "tmo-build.sh" into the "kernel" directory
6. Edit line 9 to reflect you version number and name. It will be what you see when you look at the phone properties
7. Change line 20 of the script to reflect your machine's name
8. cd into "kernel"
9. Type "./tmo-build.sh" and watch the magic as your kernel is made right before your eyes!
10. Go to "kernel_tmp/out" and get your shiny new homemade kernel complete with custom recovery and all the fixins'
NOTE: You can change line 41 to say "make gconfig" if you have GTK2 installed on your system. This will allow you to launch a GUI
through the script to make changes in a visual manner. If you get any "file not found" or "no such file" etc, make sure the
permissions are set to executable for all directories/files.
I'm still working on the error logging output so I will post an updated script as soon as it's ready. For the i727 users I will post a script for you too, but to make this work for you all you need to do is choose the make gconfig route and load your def_config from /arch/arm/configs/
Enjoy the silence!
interloper, thanks for the great script!!! This will help a lot of people.
afawzi said:
So Som,
When are we going to see another nice Bionix build from you. anything in plan or not really.
Click to expand...
Click to collapse
+1
From a galaxy better than yours.
I am starting another GUIDE post on how to modify your ROM here: http://forum.xda-developers.com/showthread.php?p=23343879
Sweet guide. Worked great. Only thing I had issue with was Haptic feedback and WiFi wouldn't work. Any ideas? I'm on the SkyRocket.
Also, for ATT the celox make command should be "make msm8660_celox_usa_att_rev02_defconfig" to make the latest 2.3.6 kernel.
how do you make it cwm flashable?

Categories

Resources