• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DEV][SCRIPT][HOW-TO] Build MR GB 2.6.35 without thinking? WAHTS!?

Search This thread

lithid-cm

Inactive Recognized Developer
Jul 1, 2010
3,189
2,956
Cleveland
Hey guys lithid here again with another helper script, and how-to. As some of you may know I have recently decided to start building kernels. While I still work on roms, I found kernels to be strange, and sometimes difficult. So instead of taking that knowledge and holding it to myself, I figured I would release it here and hopefully it could open the doors for more people working on kernels.

Basically I created a script, that would do the entire build process for a kernel, it would copy the config you want from arch/arm/configs, assigned the compiler, then compile the kernel. Now after the first time I compiled this I did a copy and paste to Koush's AnyKernel updater, while that was fine and only took a min or two, I found it really annoying to do it everytime, specially when I am testing changes to the compiled kernel. So I added in a any-kernel folder to my built environment. I also added the tool-chain compiler I would be using as well into my repo.
AnyKernel folder
Cross Compiler

Now this was great. I didn't have to build anything manually, all's I needed to do was sign the zip and then push it to my phone.

Then I thought (being so lazy) why not just have this script auto-sign the zips for me and place them in my home folder? So I did. I also added in my own keys so the signature is mine! =P
Auto-Sign

Now for the fun stuff, recently there have been some roms out there that use a slightly different flashing method. Well I solved that as well. Now the script not only builds one update.zip for the compiled kernel. It creates 3 one for each rom type.

Synergy Nightly
Synergy Godmode
Universal (All other sense roms)
So everything is basically done. Devs would be able to implement my script into their kernel environment to build kernels for all roms that are supported here on XDA.

How to:
NOTE: You will need to get a list of applications installed and be running linux for this to work. I used Ubuntu 11.04 for all my building needs. If you want a quick list of packages you will need to install first click here there you can install corresponding packages to compile this.

Code:
git clone https://[email protected]/lithid/Htc-Sense-Freedom-Kernel.git
cd Htc-Sense-Freedom-Kernel
./build-it.sh {version #}
That's it!

Here is an example:
Error:
Code:
[email protected]:~/Development/Htc-Sense-Freedom-Kernel$ ./build-it.sh
Written by Lithid
[Error]: Expected 1 parameter, got 0.
Usage: bash build-it.sh v# [BUILD VERSION]
Good:
Code:
[email protected]:~/Development/Htc-Sense-Freedom-Kernel$ ./build-it.sh v0.3


Here is a link to the script
if you are interested in seeing what I wrote. Of course it will be updated over and over again. Just figured this would be something Devs and/or users who are inspired to be devs to build a kernel without no knowledge really.
 
Last edited:

KingRedHot

Senior Member
Oct 31, 2010
1,421
806
Baton Rouge
This is nice, very nice. I think I would start with building the AOSP source first. But by the time I've done that, this'll probably be finished! So thanks for the information!
 

lovethyEVO

Senior Member
Sep 1, 2010
773
111
Schofield Barracks
This is a noble effort but what happens when a user wants to add/subtract to/from a kernel and they are not familiar with c/c++? Copy/paste will go so far especially if they can't tell the difference between a newer version of source code on someones git and the original.

Actually understanding the source is a better way of learning to build kernels instead of having an auto script do everything.

I just finally got a stable gingersense evo kernel built because certain edits (which worked on froyo kernels) would cause the kernel to lag and wifi to throw errors. If the user doesn't know how to troubleshoot, this script becomes almost moot.

I only use two scripts when I compile kernels; one to set the cc, clean the build dir, and open the dir in nautilus and the other to boot my phone into recovery to push the modules then boot into fastboot and flash the zImage.

Again it's a noble effort but things like this (and dsixdas kitchen) make it too easy for novice users to make/build these items and we end up with dozens of threads of base build items that either don't present anything marginally better than the last or unstable items due to the lack of knowledge needed to provide extended support. Dsixdas kitchen is a great tool for saving time (I use it too but learned how to root a rom by hand) but it makes it too easy for novices to build roms.

Sorry for the longwinded post and I'm not bashing the effort...just trying to point out that some things should not be made so easy for specific reasons.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Hey guys lithid here again with another helper script, and how-to. As some of you may know I have recently decided to start building kernels. While I still work on roms, I found kernels to be strange, and sometimes difficult. So instead of taking that knowledge and holding it to myself, I figured I would release it here and hopefully it could open the doors for more people working on kernels.

    Basically I created a script, that would do the entire build process for a kernel, it would copy the config you want from arch/arm/configs, assigned the compiler, then compile the kernel. Now after the first time I compiled this I did a copy and paste to Koush's AnyKernel updater, while that was fine and only took a min or two, I found it really annoying to do it everytime, specially when I am testing changes to the compiled kernel. So I added in a any-kernel folder to my built environment. I also added the tool-chain compiler I would be using as well into my repo.
    AnyKernel folder
    Cross Compiler

    Now this was great. I didn't have to build anything manually, all's I needed to do was sign the zip and then push it to my phone.

    Then I thought (being so lazy) why not just have this script auto-sign the zips for me and place them in my home folder? So I did. I also added in my own keys so the signature is mine! =P
    Auto-Sign

    Now for the fun stuff, recently there have been some roms out there that use a slightly different flashing method. Well I solved that as well. Now the script not only builds one update.zip for the compiled kernel. It creates 3 one for each rom type.

    Synergy Nightly
    Synergy Godmode
    Universal (All other sense roms)
    So everything is basically done. Devs would be able to implement my script into their kernel environment to build kernels for all roms that are supported here on XDA.

    How to:
    NOTE: You will need to get a list of applications installed and be running linux for this to work. I used Ubuntu 11.04 for all my building needs. If you want a quick list of packages you will need to install first click here there you can install corresponding packages to compile this.

    Code:
    git clone https://[email protected]/lithid/Htc-Sense-Freedom-Kernel.git
    cd Htc-Sense-Freedom-Kernel
    ./build-it.sh {version #}
    That's it!

    Here is an example:
    Error:
    Code:
    [email protected]:~/Development/Htc-Sense-Freedom-Kernel$ ./build-it.sh
    Written by Lithid
    [Error]: Expected 1 parameter, got 0.
    Usage: bash build-it.sh v# [BUILD VERSION]
    Good:
    Code:
    [email protected]:~/Development/Htc-Sense-Freedom-Kernel$ ./build-it.sh v0.3


    Here is a link to the script
    if you are interested in seeing what I wrote. Of course it will be updated over and over again. Just figured this would be something Devs and/or users who are inspired to be devs to build a kernel without no knowledge really.
    2
    Lol'ed so hard at this line in the script.

    "function just_sign_the_fucking_zip()"
    Gotta have some fun sometimes huh? It gets lonely writing scripts sometimes, I like to add a little bit of personality to my stuff. lol