[KERNEL][HOWTO] E4GT Community Kernel - Updated: 2/26/2012 - Samsung Epic 4G Touch

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?

Related

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

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

[SCRIPT] Kernel building script Team BlueRidge

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

[ROM][Source][Jan 11]CM7

To compile any of the KFire-Android roms please see the instructions in our build wiki.
Device History / Commit Log
This is a mostly stock cm7 build that I try to keep relatively updated for those who still want to use Gingerbread:
Changes from CM7 Stock:
Removed ROM Manager.
Removed CM Stats & Update Notifier.
Added GooManager and Goo.im compatible auto-updater script for incremental updates.
There may be some other differences I'm not remembering honestly it's been awhile since I updated the code.
Assert standard disclaimer.
Click to expand...
Click to collapse
Download the latest package from Goo.im either @ http://goo.im/devs/IngCr3at1on/Otter/cm7stockish
or
via GooManager itself under Browse Compatible Roms > IngCr3at1on.
(the md5sums are listed on the downloads page, if you are downloading via GooManager it checks the md5sums for you).
Make a backup in recovery.
If new to cm7: wipe data (factory reset) and system (found under mounts and storage) otherwise wipe cache (dalvik cache is on the cache so this is enough).
Install zip from sd card
Optional:
Download and install gapps (included optionally in GooManager).
Extra information:
It is highly recommended that you use an OpenRecoveryScript compatible recovery to make full use of GooManager (Cannibal Open Touch Recovery {see second post} or TWRP).
If you are coming from stock you will need to move all your books from /sdcard/Books/ to sdcard/kindle/ (please note some of these may need to be redownloaded).
There is some confusion regarding the entries "Phone Idle" and "Cell Standby" in the battery/usage stats. This is referring to the device idle and standby, it could just as easily say "Tablet Idle" and "Device Standby" but it wasn't considered in the original creation (this can be resolved w/ an overlay most likely but I have not researched it). Your device battery is not wasting away to some mysterious phone/cell service so sleep easy.
By default the lockscreen is disabled; to enable it simply go to 'settings' > 'cyanogenmod settings' > 'tablet tweaks' > uncheck disable lockscreen.
For some unknown reason (to me at least) the market is not properly loading after flashing gapps; to make it load go into 'settings' > 'accounts and sync' > add your google account. The market should appear after that.
You will likely want to install an app to supplement a back button; for this there are button savior and another (allows gestures) which I can't remember currently (someone post the name and I will update this lol).
I would also recommend VolumeControl for supplemented sound controls.
Credits and Thanks
JackpotClavin for origin concept build.
Whistlestop for the initial repos.
Sitic/Nind for his work on CM9 (some of which has helped me figure out how to change stuff for us).
Pkt_Lnt providing fixes.
SkimpKilla for compiling this into something people can flash (even if it is a bit modified )(no longer maintained).
Takenover83; a custom backup file is the weirdest concept ever but people seem to like it so have at it (no longer maintained).
Hashcode for awesome work on CM9/10
The CyanogenMod and AOSP teams
DooMLoRD (Team UtterChaos) for the CWM Kindle recovery beta and ramdisk reboot scripts. Original discussion thread and source can be found @ [Recovery] Custom CWM-Based Touch Recovery...
Napstar (Team UtterChaos) for his awesome, yet surprisingly simply touch screen recovery source. Original discussion thread and source can be found @ [Sources] CWM Based Recovery On-Screen Touch...
Drew Walton (Team Hydro & Project Open Cannibal) for helping me create Cannibal Open Touch Recovery and providing all around awesome support in general.
Twa_priv for helping to resolve build errors in early builds.
mughalgxt for bravely testing recent builds until I corrected what I borked.
The XDA Community
Whoever else I left out.
PayPal Donate Fund
Thanks to Joshua K. for donating (you just bought me a factory cable; luckily it booted my device).
Thanks to Alexander K. and Ivan K. for also donating.
mine
I've released the recovery under a new name; out of respect to Team Hydro and the original creator of the Dooderbutt image the release is at Cannibal Open Touch, the binary is also available directly on Goo Manager under 'dev/IngCr3at1on/Otter/CannibalOpenTouch/' or direct @ Goo.im (we will be creating a XDA thread for the next release).
-----
A word about kernels: to my extreme annoyment I have yet to get the wireless modules for the kernel to compile on my machine (currently I have given up on this effort, a single module is not worth the headaches) to that end the original JackpotClavin kernel is still included in the source (I do not have source to this and I believe it is the cause of at least some of the issues when running this rom) for the time being please flash an alternate kernel after installing the rom. I would eventually like to replace this kernel with a non-overclocked performance kernel (for OC you will have to install it separate). If someone has a kernel which they would like to see added to the source (this includes Hashcode or IntersectRaven) please fork my device repo and open a pull request with the replacement zImage and modules (include a link to source in your pull request please) I will test it and barring errors merge it.
Is there anything new?
I appreciate this. thanks.with it being source, u should leave it as is imo, kernals are out there and usually get cooked into custom roms, which is what I've been interested in learnong lately. so again, thanks
Sent from my HTC Glacier using xda premium
smirkis said:
I appreciate this. thanks.with it being source, u should leave it as is imo, kernals are out there and usually get cooked into custom roms, which is what I've been interested in learnong lately. so again, thanks
Sent from my HTC Glacier using xda premium
Click to expand...
Click to collapse
I agree that most custom roms will have custom kernels and that's part of why I don't want to include an OC kernel; as it is the stock kernel that's included has some issues though and I'd like to replace it with something more stable (ideally a slightly optimized non-OC stock) similar to Hashcodes kernel. I have tried compiling Hashcodes kernel as a replacement (intent on making some small tweaks if I did) but as previous mentioned I keep hitting walls with the wifi module, it's very annoying.
Sblood86 said:
I agree that most custom roms will have custom kernels and that's part of why I don't want to include an OC kernel; as it is the stock kernel that's included has some issues though and I'd like to replace it with something more stable (ideally a slightly optimized non-OC stock) similar to Hashcodes kernel. I have tried compiling Hashcodes kernel as a replacement (intent on making some small tweaks if I did) but as previous mentioned I keep hitting walls with the wifi module, it's very annoying.
Click to expand...
Click to collapse
hmm, I do suggest looking at intersects source maybe? before he updated with oc, his kernal was optimized nicely without oc.
Sent from my HTC Glacier using xda premium
smirkis said:
hmm, I do suggest looking at intersects source maybe? before he updated with oc, his kernal was optimized nicely without oc.
Sent from my HTC Glacier using xda premium
Click to expand...
Click to collapse
Aye same issue though sadly; wall with wifi module (I suppose I could build the kernel than pull the wifi module from someone elses but that feels like cheating lol). At this point I'm so annoyed with the wifi module though compiling a kernel is one of the last things on my list, this is why I have requested that someone else do one and add it via pull request.
On that note pull requests on any of my repos are always welcome (anything to fix my half baked swiss cheese hackings)
after I curl repo, I get the info showing it was created. I than chmod it, than attempt to repo init and I get repo not installed. but when I check my files, its there. but when I call repo init it keeps saying file doesn't exist. its my first time really building in ubuntu, sorry
Sent from my HTC Glacier using xda premium
smirkis said:
after I curl repo, I get the info showing it was created. I than chmod it, than attempt to repo init and I get repo not installed. but when I check my files, its there. but when I call repo init it keeps saying file doesn't exist. its my first time really building in ubuntu, sorry
Sent from my HTC Glacier using xda premium
Click to expand...
Click to collapse
Could try. '. repo' personally I've never had Ubuntu require this for the repo command but most Linux commands do require the dot. If it works I'll update the OP and readme that info was in the old readme but for some reason I removed it.
Sblood86 said:
Aye same issue though sadly; wall with wifi module (I suppose I could build the kernel than pull the wifi module from someone elses but that feels like cheating lol). At this point I'm so annoyed with the wifi module though compiling a kernel is one of the last things on my list, this is why I have requested that someone else do one and add it via pull request.
On that note pull requests on any of my repos are always welcome (anything to fix my half baked swiss cheese hackings)
Click to expand...
Click to collapse
when i run .repo i get .repo not found.
so i try ./repo and i repo not installed, run repo init to install it here...
so i try ./repo init and i get this error msg lol.
"[email protected]:~/cm7$ ./repo init -u git://github.com/Incr3at1on/platform_manifest.git -b gingerbread
Traceback (most recent call last):
File "./repo", line 690, in <module>
main(sys.argv[1:])
File "./repo", line 657, in main
_Init(args)
File "./repo", line 189, in _Init
_CheckGitVersion()
File "./repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory"
no matter if i delete the repo file, redo curl, re chmod it, any time i type in repo or .repo or ./repo i get errors. i don't wanna jus chop up your zip lol, thats cheating. i wanna compile from your modified source, and than add changes
smirkis said:
when i run .repo i get .repo not found.
so i try ./repo and i repo not installed, run repo init to install it here...
so i try ./repo init and i get this error msg lol.
"[email protected]:~/cm7$ ./repo init -u git://github.com/Incr3at1on/platform_manifest.git -b gingerbread
Traceback (most recent call last):
File "./repo", line 690, in <module>
main(sys.argv[1:])
File "./repo", line 657, in main
_Init(args)
File "./repo", line 189, in _Init
_CheckGitVersion()
File "./repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory"
no matter if i delete the repo file, redo curl, re chmod it, any time i type in repo or .repo or ./repo i get errors. i don't wanna jus chop up your zip lol, thats cheating. i wanna compile from your modified source, and than add changes
Click to expand...
Click to collapse
Alright; just got off work had a chance to actually look. First of all let me say sorry. Entirely my fault (sort of) it's what I get for ripping the walk through from someone elses readme without confirming it...
use this instead
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
updating the OP now
that was the second thing I tried. first u gotta mkdir ~/bin than curl ~/bin/repo than chmod ~/bin/repo than mkdir /cm7 CD /cm7 but when I repo or. repo or. /repo I still get the error.
Sent from my HTC Glacier using xda premium
smirkis said:
that was the second thing I tried. first u gotta mkdir ~/bin than curl ~/bin/repo than chmod ~/bin/repo than mkdir /cm7 CD /cm7 but when I repo or. repo or. /repo I still get the error.
Sent from my HTC Glacier using xda premium
Click to expand...
Click to collapse
Fair enough. I'm not sure but this
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory"
Click to expand...
Click to collapse
almost looks like it is pointing towards an error with python, did you go through and install all the requirements from : http://source.android.com/source/initializing.html ?
wow i feel dumb lol. so i mistyped a few of the required install packages i guess. i went back thru them and watched each one finish installing, and i am now compiling from your modified sources. time for a sandwich lol thanks
smirkis said:
wow i feel dumb lol. so i mistyped a few of the required install packages i guess. i went back thru them and watched each one finish installing, and i am now compiling from your modified sources. time for a sandwich lol thanks
Click to expand...
Click to collapse
Glad it works; I'm having to order a factory cable cause I was running CM9 and the ramdisk doesn't support offline charging...
Edit: In case that's not clear, my battery died lol
Hey,
So I flashed this rom, and is was working quite well, no problems at all and then I turned off my screen after using facebook or something and now it doesn't do anything anymore.. Nothing when I push the power button once, twice, hold it, plug in charger, connect to laptop. Nothing...
Can anyone please help me?
I only bought this thing 6 days ago.
Thanks
remmie80 said:
Hey,
So I flashed this rom, and is was working quite well, no problems at all and then I turned off my screen after using facebook or something and now it doesn't do anything anymore.. Nothing when I push the power button once, twice, hold it, plug in charger, connect to laptop. Nothing...
Can anyone please help me?
I only bought this thing 6 days ago.
Thanks
Click to expand...
Click to collapse
Hold the power button for twenty seconds. Then try turning it on again.
Sent from my Kindle Fire using XDA App
jmcoffey said:
Hold the power button for twenty seconds. Then try turning it on again.
Sent from my Kindle Fire using XDA App
Click to expand...
Click to collapse
Wow thanks a lot, I really thought I bricked it
remmie80 said:
Wow thanks a lot, I really thought I bricked it
Click to expand...
Click to collapse
Yeah sorry, SOD issues are kernel related I believe; part of why I am wanting to replace that kernel. Try an alternate like intersect ravens or hashcodes kernel to see if it doesn't happen again.
I thought this ROM would've licked that pesky Status Bar Force Close issue. Netflix works perfectly though. 1 out of 2 ain't bad.
Sent from my SPH-D700 using xda premium

[Guide] Compiling your own nightly kernels Quark/Blechd0se & Essential Git commands

[Guide] Compiling your own nightly kernels Quark/Blechd0se & Essential Git commands
Well Hello again another day, another do it yourself guide for the people like me with ORD
Search it up to see what am on about
Today there will be two guides they are very easy I promise - One on how to compile just the kernel image(zImage) and the other on how to use some common git commands.
Kernel Guide
1. Downloading the sources & packages needed :
Before we start we need to make sure you have the necessary packages required for you to compile the kernel.
If you already have an android build environment setup then we are good to go
If not then you can either use my guide and get an android build setup going just incase you want to compile your own nightly later on or you can just download the necessary packages required for compiling the kernel.
Packages needed - 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.
So for ubuntu based system it will be -
$ 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
For arch linux -
$ sudo yaourt 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
Most of the packages are found in the AUR repository so you need a frontend to AUR like yaourt.
Once you have the packages installed we are going to clone the kernel tree into our computer.
I feel it's best you make a new directory for which you will use to compile kernels.
Once you are in your directory of choice we can now download the kernel sources
For Quarx kernel - $ git clone https://github.com/Quarx2k/jordan-kernel
For Blechd0se kernel - $ git clone https://github.com/Blechd0se/jordan-kernel
One thing to note is after the git clone command you can name the folder in which the sources will be saved to.
For example git clone https://github.com/Blechd0se/jordan-kernel blechd0se. This will renamed the folder to Blechd0se which the kernel sources will be saved to instead of the default name of jordan-kernel.
2. Downloading the toolchain/s
If you have one of the rom sources (CM10, SB, CNA) synced up then you can just point the cross compile to that directory.
$ git clone https://github.com/Quarx2k/platform_prebuilt
Here you have a choice of two toolchains either the default google one (4.4.3) or the recently added linaro toolchain(4.5.4) by Quarx
3. Setting up configuration
Now cd into the kernel folder so for me -
$ cd ~/Kernel/Blech0se
Then run the follwing commands -
$ export ARCH=arm
$ export CROSS_COMPILE=~/<location of toolchain>
- For the linaro toolchain it will be export CROSS_COMPILE=~/Kernel/arm-eabi-4.5.4-linaro/bin/arm-eabi-
- For google's iw will be export CROSS_COMPILE=~/Kernel/arm-eabi-4.4.3/bin/arm-eabi-
make mapphone_defconfig
If you are compiling Blechd0se kernel then you can choose what process schedulers you want BFS or CFS the default is CFS.
To enable BFQ you need to do the following things
make menuconfig this will bring up a menu which you can use to customise the kernel if you know what you are doing this can also be used on Quarx's the difference is you don't have as much choice as in Blechd0se's.
Scroll down and select enable block layer then IO schedulers the scroll down to BFS and type "Y" a star will appear in the checkbox showing it will use BFS now.
Once that's done you can compile own kernel image using the make command
make -jx <maximum number of jobs>
Replace the x with the amount of jobs you want. I usually use -j8 but you can use higher but it can slow down you PC.
Read this post for more info on effectively using make -jx
You kernel will be finished into a couple of minutes to hours depending on the amount of jobs you used and how many cores you have in your processor.
Now we need to package the kernel into a zip to flash recovery.
I recommend you download one of Blechd0se's zips and modify it.
You need to delete the config folder if you don't want your overclock settings getting overwritten and also you can modify the updater script found in META-INF/com/google/android.
Then replace the zImage in the folder system/2ndboot/ with your new one.
You can find your zImage into the arch/arm/boot folder in your kernel source folder.
4. Updating and rebuilding -
To update your sources with the latest changes you can use the git pull origin command from the kernel source folder.
So for me it will be -
$ cd ~/Kernel/Blechd0se
$ git pull origin
Once it's being updated we need to first use
$ make clean
$ export ARCH=arm
$ export CROSS_COMPILE=~/<location of toolchain>
$ make mapphone_defconfig
$ make -j8
Credits & Thanks-
To XDA as always for being an awesome resource and playground
To Google for all they awesomeness
To Blechd0se for being an awesome kernel dev
To Quarx for his amazing work on the kernel so far
To thewadegeek for his guide which I have adapted this from Thank him here ​
Git Commands​
The following git commands are the essential ones are feel that are needed to be able to use git effectively allowing you to help contribute back to the community...... With these commands you can help with things such as rom translation, bug fixes etc......
Commands -
1. git clone
This is used to clone a remote repository like here onto your local drive allowing you to edit/add files.
e.g
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common
This will clone the repository android_device_moto_jordan-common into a new folder called android_device_moto_jordan-common but if you want the folder to be called something else just add the name after the url like so....
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common Defy-common
Additionally, you can also specify downloading one branch by using the -b command you can also still has a custom name for the folder by putting the name at the end of the branch name. E.g
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common -b jb_2ndboot Defy-common
2. git
HAHA again
Last one for a party
I just finished syncing CM10 sources, I'll do this one too now
Thanks, you rock!
mark,thanks
Sent from my MB526 using xda premium
Thank you Kayant for this nice guide Hope to see some additional dev's soon
Maybe you can add how to push a commit
And if you only want to rebuild modified modules you can simply run the "mmm" command, safes time
Btw: BFQ and CFQ are I/O-Scheulders, CFS and BFS are process schedulers
When I used to have defy (good old days) this was something I want to share with everyone but I couldn't because I lost my defy when I have doing some progress in custom kernel. Then I lost track of this great community and stop to make things for defy. It's great to see this kind of tutorials for help other users as well. As always, very thanks kayant!!!
Enviado desde mi MT27i usando Tapatalk 2
Thought I might add. on that make -jx command, x should be your max threads + 1 -- eg, I have a quad core w\o hyper threading so I use 5.
use the "nproc" command to find out how many threads you have
the make jx is different than sync jx, where sync jx is how many files you'll concurrently download. I figure most of us know that, but I figured I'd make the distinction.
number of cores + 1 is recommended on a lot of faqs; your results may vary, but using j5 (my recommend setting) versus not setting it (j4 by default, i think -- needs fact checking) speeds up compile time by 20-30 minutes (Quarx CM 10). using too many threads will slow you down and using too little is inefficient and thus slower.
Thank you very much for your informative guides Kayant always learn something from it and really appreciate it:thumbup:
Sent from my MB526 using xda premium
skeevy420 said:
Thought I might add. on that make -jx command, x should be your max threads + 1 -- eg, I have a quad core w\o hyper threading so I use 5.
use the "nproc" command to find out how many threads you have
the make jx is different than sync jx, where sync jx is how many files you'll concurrently download. I figure most of us know that, but I figured I'd make the distinction.
number of cores + 1 is recommended on a lot of faqs; your results may vary, but using j5 (my recommend setting) versus not setting it (j4 by default, i think -- needs fact checking) speeds up compile time by 20-30 minutes (Quarx CM 10). using too many threads will slow you down and using too little is inefficient and thus slower.
Click to expand...
Click to collapse
Thanks for the infromative post as always
In this situation I feel it doesn't matter too much since it takes minutes to compile just the kernel even on my core 2 duo but I will add your hint your post to the OP. Thanks again ^_^
Kayant said:
Thanks for the infromative post as always
In this situation I feel it doesn't matter too much since it takes minutes to compile just the kernel even on my core 2 duo but I will add your hint your post to the OP. Thanks again ^_^
Click to expand...
Click to collapse
You're completely right about the kernel and time -- but for full rom builds and a Funtoo "emerge -uDNav world" it helps. I just saw that j8 and thought "My dual core Athlon 64 would hate me if I did that".
Great guide as always
That does it.
I'm studying Linux in earnest. Enough of this dabbling around the edges... :cyclops:
renoob said:
That does it.
I'm studying Linux in earnest. Enough of this dabbling around the edges... :cyclops:
Click to expand...
Click to collapse
That's the best thing I ever did. I hated XP, wish it was more like Win2k -- I'd gladly pay for Win8 if it had a 2kPro interface. Win2k was awesome, and the only Windows OS I'll give praise to.
I recommend starting out with Ubuntu or Mint (Mint based on Ubuntu, not Debian). There's better support for Ubuntu and distros based on Ubuntu. After about 4-6 months, once you start learning apt, the command line (bash), and some Linux basics; switch to Pure Debian or Mint Debian -- much better than Ubuntu, but not as user friendly (or AptoSid\Sidux -- they're based on Debian Unstable (Sid) -- which is actually pretty stable, ya just gotta be able to fix it if it breaks). I've found that the easiest way to learn it is to just do it. Reading up on it only goes so far without putting it to practice.
After a year or so, try out Gentoo\Funtoo and you'll learn a lot about Linux -- but those distros are not for the faint hearted and require time and dedication to get a GOOD working environment. Once you have it how you like it, it WILL be the fastest desktop you can use with the fastest compile time -- well, WILL should be shall or can. I'm about to turn my old compile PC into a generic x64 Funtoo box (one of my 64's is AMD, the other Intel). A generic build will allow me to use the same base system on both PC's and allow me to rebuild them to they're specific architecture after its all set up. It took me 3 tries to get a good Gentoo box running -- miss one step in that install guide and you can be up that creek.
11 years on Linux now, 9 years with only maybe 25 boots into Windows -- past 10-15 were to flash an sbf and to reboot back to Linux -- so glad I stumbled across the sbf_flash Linux tool. Last time I booted Windows was after installing Win7 and its drivers....seriously, all I've done is installed it and the drivers and haven't booted it up since. I've used Red Had, Fedora, Ubuntu, Arch, Mint, Debian, Suse, Mandrake, Gentoo, Funtoo, Sabiyon, Aptosid, Sidux -- after using all of them, I find that I prefer Debian\based systems (not Ubuntu\based systems -- I actually don't like Ubuntu, well, since 0910 -- it was a good distro up until then imho). And I like Funtoo for the source based distros -- I've messed around with other source based ones (Sorcerer, Arch) and like Futnoo over Gentoo and the rest in the end.
//You might already know enough Linux, I'm just posting what I think is the easiest way to start using and, therefore, leaning Linux.
///I'm also surprised that there isn't an XDA based Linux distro -- designed by XDA members to make it easier to get into Linux\rom hacking
rom compiling with all the tools we all need an apt-get away.
EDIT
I've been meaning to ask, Do any of you programmers have any good books to recommend? I'm finding myself of the border of power user and programmer and need to start learning some code skills to cross over. I'd like to learn something C, Python3, and Java; but there are a ton of books on them and I'd like a recommendation from someone HERE who knows a bit of programming and what they'd use to learn nowadays. I'm sure I'm not the only one with that question either. Something C and Java for Android, Python3 for Linux (maybe Android if that project has gained some ground). Thanks.
/Bolded that so it sticks out.
@skeevy
I use Arch Linux ATM and a love it but yh I have read about gentoo and how you can build it to your system.... Once I get a new PC in the near future hopefully very soon am going to try that and freebsd... Thanks for the advice
Let's Go ^_^
Kayant said:
@skeevy
I use Arch Linux ATM and a love it but yh I have read about gentoo and how you can build it to your system.... Once I get a new PC in the near future hopefully very soon am going to try that and freebsd... Thanks for the advice
Let's Go ^_^
Click to expand...
Click to collapse
Never tried BSD. Arch was OK, but I started on Debian, jumped around different ones for a few years, stuck with Ubuntu 7.10 for 6 months, hated their update, and been on Debian or Mint Debian ever since; testing or Sid usually -- I transcode my DVD's and stable has older codecs . Arch was a year ago for a month -- if I gave it more of a chance I'd probably like it as much as I do Debian. I've used almost all major distros, desktop environments, window managers, etc; but I always find myself back with Debian\XFCE -- it just works for me.
If you didn't know, Debian has a freeBSD based distro as well. That'll make it easy to try out BSD in an Debian style environment.
Hoped I could say the same. School is a real Linux killer.
Even for software that has a linux port, they only give us the installer/license for the Windows version. :/
PLC and robotics software tend to only run on Windows anyhow. As 3D drawing.
Always have the need to change my partition setup Linux-Windows after installing such an application on my laptop.
I am now using Ubuntu for 3 years. I like the look and don't want to spend time on my PC installation so it's good for me . I can imagine that it's different if you really want to get to know Linux or Unix.
What I hear most for learning to program (me not so much) is just try to do what you plan to do with it(an android application, ...) and searching how to get there. Don't know many that read books. Except for guidelines for memory management and security for example later on.
I've been programming for nearly 20 years. Only had a few classes in the basics. The rest has been trial by fire. Use Google a lot to figure out how to do stuff, but I can't really TALK about code as I don't know what to call some of the things I do. I highly recommend taking formal classes and reading books.
Sent from my SPH-L900 using xda premium
I compiled my own kernels on my phone and it's running
ps:My english is not so good:crying:
labsin said:
Hoped I could say the same. School is a real Linux killer.
Even for software that has a linux port, they only give us the installer/license for the Windows version. :/
PLC and robotics software tend to only run on Windows anyhow. As 3D drawing.
Always have the need to change my partition setup Linux-Windows after installing such an application on my laptop.
I am now using Ubuntu for 3 years. I like the look and don't want to spend time on my PC installation so it's good for me . I can imagine that it's different if you really want to get to know Linux or Unix.
What I hear most for learning to program (me not so much) is just try to do what you plan to do with it(an android application, ...) and searching how to get there. Don't know many that read books. Except for guidelines for memory management and security for example later on.
Click to expand...
Click to collapse
That's what I've been doing up until now, but Google only helps so much -- I can do a search on learning Java and come up with 1000's of faqs, guides, ect -- weather its worth reading or full of it is unknown too me since. A good book can be worth its weight in gold. With a bad internet faq, ya might as well change the faq's a to a u and bend over, cause that's what you're doing to yourself by learning from bad sources.
While I don't know what apps you're using, I know that some apps have a license isn't limited to the platform -- the Win License works on Linux\Mac\Unix as well. Or just use the Lin version and not feel guilty since you have the Win license .
Ubuntu was great until it started getting too bloated for my tastes -- and they're XFCE editions usually use much more resources than doing the same thing with Pure Debian installed from the command line up. On compile\dev boxes you want as little running as possible for obvious reasons. Not to mention the UI can greatly change from release to release with Ubuntu. Buntu was my 2nd Linux to run; Debian first -- Learned more on Ubuntu then went back to Debian. Pure Debian can be daunting if its your first distro.
Malcont3nt said:
I've been programming for nearly 20 years. Only had a few classes in the basics. The rest has been trial by fire. Use Google a lot to figure out how to do stuff, but I can't really TALK about code as I don't know what to call some of the things I do. I highly recommend taking formal classes and reading books.
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
Thanks. I'd be taking classes if I could. I don't qualify for any grants and I don't want to go for a loan because of the uncertainty of being able to pay it off.
Something I'm seriously thinking about doing is this -- free online classes from MIT. That has to be good information.
@All
I'm thinking of starting a generic x64 Funtoo box and get it to where XFCE is working, Nvidia graphics (all I buy is Nvidia Cards ), Android SDK is up and running, and all the required scripts, apps, udev rules, etc are already installed set up (repo, sbf_flash, apktool, etc). Then upload that as a zip so all you'd have to do is extract the zip to a blank partition, edit its fstab, update grub, set the build environment variables to your own, reboot, set users\passwords, and recompile the system.
I'm already going to do all of that except for the upload as a zip part -- I have 2 64 bit pc's -- one amd, one intel -- so I have to build it as a generic 64 in order to use the same system on both boxes. I was just wondering if anyone else would be interested in something like that once its all done.
---------- Post added at 09:22 AM ---------- Previous post was at 08:25 AM ----------
I normally don't post my PM's, but the last half on this one I sent out might be useful to some of you looking for the essential git commands
I have a couple of good sites I use for github reference. Here & here
Typing "man git" in the command line has helped me a lot as well. I've learned most of my Linux knowledge by typing "man name_of_program" and Googling what it said that I didn't fully understand -- especially with video encoding, ffmpeg and mplayer are some long reads, so is git. Git also has a "git help name_of_git_command" program that's helpful as well.
There's also a few threads on the Defy forums dedicated to helping out people trying to do exactly what you're wanting to do. The nightly builds link is a really good place to start with -- contains pretty much all you need to know to be able to compile roms. Kayant's an awesome dude and really helpful. His threads are great for users wanting to learn and\or contribute back.
[Guide] Compile your own nightly builds - AOKP, CM10, CM9, CNA, Slim Bean, P.A.C
[Guide] Compiling your own nightly kernels Quark/Blechd0se & Essential Git commands
I learned git from forums like the ones above, those reference sites and man pages\help program. Took about a week of trial and error before I got the hang of it. I still have a hard time remembering to start a branch before editing crap after the initial sync .
Honestly, the hardest thing to do, in regards to PA, is adding in FM. Almost everything else Defy\Bravo related just cherry picks right in with no\ very little and easy to fix conflicts. The FM commits are old and those files have changed a lot from when Quarx & Maniac did the patches -- especially between Quarx's and PA's current.
Cherry picking is pretty easy, navigate to the base directory -- like frameworks/base -- then its "git cherry-pick a_ton_of_hex" and it'll either pick right in or you have conflicts. If I get conflicts, I use the app "git-cola" ran from command line in the /frameworks/base directory; and its a gui app that'll list what files have conflicts (and a lot more) -- I then open up the conflicting file with tkdiff (or whatever diff you like) and fix the conflicts, "git commit -a" (saves changes), and push to github. If you don't get conflicts, just commit and push. Btw, the ton of hex is all the hex code next to the commit on github.com, review.cyanogen-mod.com.
Making changes on your own is done simply be navigaitng to the base directory -- frameworks/base for the android_frameworks_base repo, device/moto/mb520 for the Bravo repo -- and opening a terminal, starting or pointing to a branch (git checkout -b name_of_new_branch is a good command to run before you do anything -- checkout -b n_o_b creates a new branch and places you on it), then do what ever changes you need to do, then do "git commit -a", enter a description, and push. Once you have different brances going, you can use "git checkout name_of_branch" to switch between them. Read up on branching, cause theres a lot to it.
There's a lot of different ways to do git, and my way might not work for you.
Good luck and have fun reading -- you'll be doing a lot of it :silly:

Categories

Resources