Related
Compiling Pershoot's Vision Kernel for CyanogenMod 7
Why would I do this?
1. You must enjoy punishment
2. You want to know how a kernel gets compiled for Android.
3. You want to modify your kernel somehow, such as adding the Interactive Scheduler to the default Pershoot config or switching between CFS and BFS.
4. You want to modify the overclocking frequencies or voltages.
I don't teach how to do anything but #1 and 2, the rest I might get into later, but this guide is the gateway to all that.
You will need a working Ubuntu system. 10.04, 10.10, or 11.04 should all be fine. I did it with 11.04, so bleeding edge is working 100%.
On Ubuntu 10.04 and 10.10, get the following packages:
Code:
sudo apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
On Ubuntu 11.04 get:
Code:
sudo apt-get install git-core gnupg openjdk-6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Let's create our compilation area:
Code:
cd ~
mkdir kernel-compilation
mkdir kernel-compilation/toolchain
mkdir kernel-compilation/finals
mkdir kernel-compilation/staging
Download the following files:
http://www.mediafire.com/file/5aqhkl69fq75253/arm-eabi-4.3.1.zip - Unzip to ~/kernel-compilation/toolchain
http://www.mediafire.com/file/7lo2ctg7r56urky/staging.zip - Unzip to ~/kernel-compilation/staging
And lastly, grab the source from Pershoot's GIT, which will end up in kernel-compilation/vision-2632:
Code:
cd ~/kernel-compilation/
git clone https://github.com/pershoot/vision-2632.git -b gingerbread
Next we'll set up the compiler to use the ARM toolchain through an environment variable to make it easier later:
Code:
export CCOMPILER=~/kernel-compilation/toolchain/arm-eabi-4.3.1/bin/arm-eabi-
Next we'll use Pershoot's default configuration file as a starting point:
Code:
cd ~/kernel-compilation/vision-2632
cp arch/arm/configs/pershoot_vision_defconfig .config
If you wish to modify his configuration:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
Next we'll compile the newly configured kernel:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4 (replace 4 with the number of physical processor cores on your system, or leave the -j option off altogether if you don't know)
And the modules:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER modules
Now we'll start installing the kernel into our staging area.
Copy the kernel image from the source area into staging:
Code:
cp arch/arm/boot/zImage ~/kernel-compilation/staging/kernel/zImage
and install the modules (and fix where it puts them):
Code:
make ARCH=arm INSTALL_MOD_PATH=~/kernel-compilation/staging/system modules_install
cp ~/kernel-compilation/staging/system/lib/modules/2.6.32.38-cyanogenmod/kernel/drivers/net/wireless/bcm4329/bcm4329.ko ~/kernel-compilation/staging/system/lib/modules/bcm4329.ko
rm -rf ~/kernel-compilation/staging/system/lib/modules/2.6.32.38-cyanogenmod
Now let's finish up by zipping it all into the finals area:
Code:
cd ~/kernel-compilation/staging
zip -r ~/kernel-compilation/finals/mykernel.zip *
Now go to your finals directory and get to flashing!
References:
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
http://forum.xda-developers.com/showthread.php?t=916198#
Thanks to Pershoot, CyanogenMod Team, and everybody on #cyanogenmod on Freenode IRC.
you da man.
jbdubbs said:
Compiling Pershoot's Vision Kernel for CyanogenMod 7
Thanks to Pershoot, CyanogenMod Team, and everybody on #cyanogenmod on Freenode IRC.
Click to expand...
Click to collapse
dude, this is one amazingly simple tutorial I have almost zero ubuntu experience, and i have literally NEVER created my own anything for my phone, much less something as seemingly complex as the base kernel, but your easy walkthrough made it one of the easiest things Ive ever done, and now I have a working kernel with all the features i was looking for but never knew how to make myself
EDIT: may have spoken too soon. The kernel compiled fine and booted fine, but when i look for my added governors (interactive and conservative) in the listings, they dont appear there. any thoughts on what I need to do?
Am I right in assuming that the CPU frequencies/voltages are in /arch/arm/mach-msm/acpuclock-7x30.c , and that modifying those values in gedit (default program that opened when I doubleclicked it) would stick once I compile the kernel?
jmwils3 said:
dude, this is one amazingly simple tutorial I have almost zero ubuntu experience, and i have literally NEVER created my own anything for my phone, much less something as seemingly complex as the base kernel, but your easy walkthrough made it one of the easiest things Ive ever done, and now I have a working kernel with all the features i was looking for but never knew how to make myself
EDIT: may have spoken too soon. The kernel compiled fine and booted fine, but when i look for my added governors (interactive and conservative) in the listings, they dont appear there. any thoughts on what I need to do?
Click to expand...
Click to collapse
I'm assuming that you did the 'make ARCH=arm menuconfig' step and didn't properly save your changes. When you exit the menu it'll ask if you'd like to save, obviously select 'yes'. Don't choose the option to save an alternate config at the bottom of the main menu, just keep hitting exit until it asks to explicitly.
Sent from my HTC Vision using XDA App
qzfive said:
Am I right in assuming that the CPU frequencies/voltages are in /arch/arm/mach-msm/acpuclock-7x30.c , and that modifying those values in gedit (default program that opened when I doubleclicked it) would stick once I compile the kernel?
Click to expand...
Click to collapse
The short answer is yes, the long answer is that while that is indeed where the frequencies and voltages are stored, its pretty greek to me. I attempted to copy the 1.9 ghz acpuclock-7x30.c from another post on this forum and it doesn't seem like it compiled it, I still only made it to 1.5.
I'm going to investigate both this and where exactly the smartass governor source is and update this guide later.
Sent from my HTC Vision using XDA App
jbdubbs said:
I'm assuming that you did the 'make ARCH=arm menuconfig' step and didn't properly save your changes. When you exit the menu it'll ask if you'd like to save, obviously select 'yes'. Don't choose the option to save an alternate config at the bottom of the main menu, just keep hitting exit until it asks to explicitly.
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
-facepalms- duh, that would make sense. So is there any way to undo the mistake, or would i need to start from scratch? not that bad either way, just wondered
jmwils3 said:
-facepalms- duh, that would make sense. So is there any way to undo the mistake, or would i need to start from scratch? not that bad either way, just wondered
Click to expand...
Click to collapse
You can run 'make clean' then continue from the menuconfig step.
Sent from my HTC Vision using XDA App
jbdubbs said:
You can run 'make clean' then continue from the menuconfig step.
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
Im sorry for the extremely noob-ish questions (havent felt this noob-ish since my pre-root days on my FIRST G2), but do you mean to run that command on the created zip file, or elsewhere?
jmwils3 said:
Im sorry for the extremely noob-ish questions (havent felt this noob-ish since my pre-root days on my FIRST G2), but do you mean to run that command on the created zip file, or elsewhere?
Click to expand...
Click to collapse
Run that command from ~/kernel-compilation/vision-2632
Sent from my HTC Vision using XDA App
jbdubbs said:
Run that command from ~/kernel-compilation/vision-2632
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
it keeps giving me an error that the selected location is a directory.
jmwils3 said:
it keeps giving me an error that the selected location is a directory.
Click to expand...
Click to collapse
cd ~/kernel-compilation/vision-2632
make clean
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
Sent from my HTC Vision using XDA App
lol, thanks i had found my mistake, and i just started it from after where it had me retrieve the files (which of course, i already had from before) and it got me to the right place to run the command. everything seems to have worked, but ill see once my phone boots.
EDIT: that did it! thanks again, bro
Instead of:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4 (replace 4 with the number of physical processor cores on your system, or leave the -j option off altogether if you don't know)
You can use this:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
that will put the right value based on your processor.
Out of curiosity, why is the interactive governor & others left out of pershoot's kernel in the first place?
I'm wondering if there are compatibility issues or other optimisations with undervolting etc and you may be running the risk of causing problems/damage to your hardware.
Droid Basement said:
Note:
If you use SetCPU, please do not set any Advanced settings, and you should use the ondemand CPU governor.
Click to expand...
Click to collapse
I only ask as, in pershoot's kernel the sysfs cpufreq directory differs from what seems the norm (from what I've seen); There are two cpufreq directories in (cpu & cpu0), but we only have one processor?
Dunno, maybe I'm just being paranoid and need to download the source and investigate...
waydownsouth said:
Instead of:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j4 (replace 4 with the number of physical processor cores on your system, or leave the -j option off altogether if you don't know)
You can use this:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
Click to expand...
Click to collapse
Yeah I left that out for simplicity of the guide. Most people should know how many cores they have.
Out of curiosity, why is the interactive governor & others left out of pershoot's kernel in the first place?
I'm wondering if there are compatibility issues or other optimisations with undervolting etc and you may be running the risk of causing problems/damage to your hardware.
I only ask as, in pershoot's kernel the sysfs cpufreq directory differs from what seems the norm (from what I've seen); There are two cpufreq directories in (cpu & cpu0), but we only have one processor?
Dunno, maybe I'm just being paranoid and need to download the source and investigate...
Click to expand...
Click to collapse
I actually have some issues using BFS (his default scheduler) with the interactive governor regarding stability. I'm assuming that BFS is the culprit for leaving it out.
Sent from my HTC Vision using XDA App
jbdubbs said:
The short answer is yes, the long answer is that while that is indeed where the frequencies and voltages are stored, its pretty greek to me. I attempted to copy the 1.9 ghz acpuclock-7x30.c from another post on this forum and it doesn't seem like it compiled it, I still only made it to 1.5.
I'm going to investigate both this and where exactly the smartass governor source is and update this guide later.
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
Seems I was right about the CPU frequencies/voltages being there - I finally compiled a kernel that booted - I added a frequency value of 184Mhz, and SetCPU reflects this.
Thank you so much for this guide - I'm so chuffed with myself compiling a working kernel
*WARNING! I Am Not Responsible For Anything That Happens To Your Device or Computer*Here is another Gift from the DARKSIDE Dev Team:
Compiling CM from Source
Thank you to Sparksco for building a great base tutorial that I used help build this.
Original Thread Found Here
Updated info for non-debian based systems thanks to Vicodan:
If you want to use this on fedora or non-debian based systems you will need to replace every command that says apt-get to yum. Thanks to Vicodan for pointing this out.
*Note: Not currently working on Tmobile Hercules, for learning purposes only until source is out for our device
If you can add anything let me know and I will add to this or edit the tutorial, 2nd post will be for building from Google Source AOSP.
Hardware Requirements:
- A minimum dual core pc, the more ram the better
- A working wifi connection or network connection
- Linux Operating System. Either 32-bit or 64-bit will work
NOTE: 64-bit will run faster and you need 64bit to build Android 2.3 +
You also need full access to CM source but CM is hording those
Black Bold Print = Instructions
Red Bold Print = Terminal Code
Italic Font = Misc. Details
Optional Recommended Software:
Many of these can be found in the software center using the search box
If you find multiple versions it's ok to install them all, unless it says
otherwise
Python
Open the terminal application and type
Code:
[COLOR="red"][B]$ sudo apt-get install python[/B][/COLOR]
awk and gawk
7zip
RAR
Code:
[COLOR="red"][B]$ sudo apt-get install rar[/B][/COLOR]
Step 1 java:
Setting up java is one of the most important step to getting your pc prepared for a build environment. Truly this step is whatever is going to work best on your system, I do it this way and you can try it whichever way you want. Take my advise or not.
NOTE: On Ubuntu 11.10, and variants, you need to enable the
parter repository to install sun-java6-jdk:
Code:
[COLOR="red"][B]$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
$ sudo apt-get update
$ sudo apt-get install openjdk-6-jdk[/B][/COLOR]
then do
Code:
[COLOR="red"][B]$ sudo apt-get install -y git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
$ java -version[/B][/COLOR]
The correct version is:
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
You must have a 1.6.x to compile on the gingerbread branch of cyanogenmod. If you have the correct
Step 2 - Install git
Code:
[COLOR="Red"][B]$ sudo apt-get install git[/B][/COLOR]
Step 3 - Prepare the Build Environment
NOTE: You only need to do these steps the first time you build.
If you previously prepared your build environment, skip to Copy
proprietary files.
3a - Install the ADB
To let Samsung Galaxy S2 be recognised by the debugger add these lines to 92-samsung.rules in /etc/udev/rules.d
Code:
[COLOR="red"][B]$ sudo gedit 92-samsung.rules in /etc/udev/rules.d[/B][/COLOR]
paste
Code:
[B]SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8",
ATTRS{idProduct}=="6640", MODE="0660", OWNER="root",
GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"[/B]
save and exit
$ sudo gedit /etc/udev/rules.d/51-android.rules
paste
Code:
[B]SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, SYMLINK+=”android_adb”, MODE=”0666″
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"[/B]
save and exit
Code:
[COLOR="red"][B]$ sudo gedit .bashrc[/B][/COLOR]
paste at the top
Code:
[B]#AndroidDev PATH
export PATH=${PATH}:~/androidsdk/tools
export PATH=${PATH}:~/androidsdk/platform-tools[/B]
save and exit
Now to Install the SDK, be prepared this takes some time:
Go to Android Developers SDK Download Found Here - Link
or
Download directly from This Link - Download Link
Once done extract the contents to your home folder, then rename it to androidsdk.
Once extracted and renamed go to /androidsdk/tools and double click the file android and click run in terminal.
Android SDK updater will pop up, select the option New and start the upgrade. Now wait. When finished do new one more time to make sure you got everything, once done close SDK window and terminal window.
3b - Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
[COLOR="red"][B]$ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool[/B][/COLOR]
For 64-bit only systems:
Code:
[COLOR="red"][B]$ sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib[/B][/COLOR]
4a - Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
[COLOR="red"][B]$ mkdir -p ~/bin
$ mkdir -p ~/android/system[/B][/COLOR]
4b - Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
[COLOR="red"][B]$ curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo
$ chmod a+x ~/bin/repo[/B][/COLOR]
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository, repo sync will take a long time so sit back and watch the code on terminal scroll, dont touch it, toss in Star Wars Saga or Lord of the Rings Trilogy and watch from start to finish and it might be done:
Code:
[COLOR="red"][B]$ cd ~/android/system/
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
$ repo sync[/B][/COLOR]
4c - Copy proprietary files
NOTE: This only needs done the first time you build. If you have
already done these steps, you may skip to Download RomManager.
You will need to have a speedy with a working copy of CyanogenMod
install and ADB working on the computer. This script will copy the
proprietary files from the device.
Connect the device to the computer and ensure that ADB is working
properly.[/B]
Code:
[COLOR="red"][B]$ cd ~/android/system/device/samsung/(DEVICE NAME)
./extract-files.sh[/B][/COLOR]
4d - Download RomManager
NOTE: This only needs to be done when an update to
RomManager is released. If you are-up-to date, you may skip to Building
CyanogenMod. Download RomManager which is needed by the build:
Code:
[COLOR="red"][B]$ ~/android/system/vendor/cyanogen/get-rommanager[/B][/COLOR]
5a - Building CyanogenMod
Check for updates
First, check for updates in the source:
Code:
[COLOR="red"][B]$ cd ~/android/system/
$ repo sync
$ cp build/core/root.mk -f Makefile[/B][/COLOR]
5b - Set up your Compiler
This is optional but helpful for kernel compiling
There are a lot of things that need to be added to the .bashrc to let your
pc know about which type of compiler you want to use. The best way is
to use the one provided in the CM7 work tree.
Code:
[COLOR="red"][B]#Android
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin[/B][/COLOR]
6 - Configure Build & Compile
Now, the environment must be configured to build and the ROM
compiled, from code, for the GalaxyS2.
Code:
[COLOR="red"][B]$ . build/envsetup.sh && brunch (DEVICE NAME)[/B][/COLOR]
7 - Install
Copy your .zip file from
~/android/system/out/target/product/galaxys2att/update.cm-XXXXX-
signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the
root of the SD card.
Flash both of these .zip files from recovery.
2nd post for Building from GOOGLE Source AOSP
3rd Post for anything else I add
You sir are awesome :-D I was just looking all of this up! Actually setting up all AOSP build envoirnments as I type this
Sent from my SGH-T989 using xda premium
You put openjdk not sunjdk in the code part. Gonna give this a shot myself, thanks.
I'm assuming openjdk works too.
Sent from my SGH-T989 using xda premium
pyraxiate said:
I'm assuming openjdk works too.
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
Blah, keep misreading things, don't always assume on that, someone I know has issues with OpenJDK and the programs he's written in SUN's. On another note you also need to run apt-get update after adding the repo.
xOrphenochx said:
You put openjdk not sunjdk in the code part. Gonna give this a shot myself, thanks.
Click to expand...
Click to collapse
pyraxiate said:
I'm assuming openjdk works too.
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
xOrphenochx said:
Blah, keep misreading things, don't always assume on that, someone I know has issues with OpenJDK and the programs he's written in SUN's. On another note you also need to run apt-get update after adding the repo.
Click to expand...
Click to collapse
This is how I do it and it works every time, have set multiple computers up this same exact way.
Orphenochx - do I need to edit something in there?
xOrphenochx said:
Well truthfully there's a bit more to it, the package is named sun-java6-jdk if he wants SUN's, you'll need to run apt-get update also, and I'm OCD for just editing /etc/apt/sources.list since that repository is already in there and uncommented.
Click to expand...
Click to collapse
Aye, I'm well aware that they are two different development kits ( and his post contradicts itself by mentioning both ). I wasn't correcting / contradicting you. I was merely asking if openjdk should also work? I have openjdk installed on my build server which is why I asked. Ill add sun jdk if not
Sent from my SGH-T989 using xda premium
have you actually done this for the hercules? i dont think your instructions quite cover building for this device, especially since your pulling prop's for the wrong phone(as you have outlined in the op).
Royalknight6190 said:
This is how I do it and it works every time, have set multiple computers up this same exact way.
Orphenochx - do I need to edit something in there?
Click to expand...
Click to collapse
Not trying to be an ass, but who knows what could happen on someone else's system. You say in the post that you need to install the SUN one, then install the OpenJDK one. Which ever one works for you the best, I'd just edit the steps to make sure you don't contradict yourself.
After "$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"" you need to run "sudo apt-get update" then install the package, else apt won't know the package is available since the source list was edited without a refresh.
mikeyinid said:
have you actually done this for the hercules? i dont think your instructions quite cover building for this device, especially since your pulling prop's for the wrong phone(as you have outlined in the op).
Click to expand...
Click to collapse
The ATT version and the T-Mobile Version are exact mirror images, that just pulls the proprietary files from the phone which are necessary for you to build a rom and Yes I just did it. It works. I was looking in the Cyanogen Source tree and there were three or four Galaxys2's. And I decided to go with the ATT version because I thought it was the closest. Non of them said T-Mobile or Hercules. I am not at my house or I would name the GalaxyS2's that are under the device/samsung/ folder. I will do it when I get home.
xOrphenochx said:
Not trying to be an ass, but who knows what could happen on someone else's system. You say in the post that you need to install the SUN one, then install the OpenJDK one. Which ever one works for you the best, I'd just edit the steps to make sure you don't contradict yourself.
After "$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"" you need to run "sudo apt-get update" then install the package, else apt won't know the package is available since the source list was edited without a refresh.
Click to expand...
Click to collapse
Thanks, I forgot to add the $ sudo apt-get update, My fault. and I will add that about Java also, thanks man. I was just saying how I do it and what works best for me.
Royalknight6190 said:
The ATT version and the T-Mobile Version are exact mirror images, that just pulls the proprietary files from the phone which are necessary for you to build a rom and Yes I just did it. It works. I was looking in the Cyanogen Source tree and there were three or four Galaxys2's. And I decided to go with the ATT version because I thought it was the closest. Non of them said T-Mobile or Hercules. I am not at my house or I would name the GalaxyS2's that are under the device/samsung/ folder. I will do it when I get home.
Click to expand...
Click to collapse
I know what they are. I've been compiling cm7 for a while. I hope you understand what your telling people here. Good day sir.
Sent from my SGH-T989 using Tapatalk
---------- Post added at 02:30 PM ---------- Previous post was at 02:26 PM ----------
wait, i just thought about this a little. your telling me that you built using the att gs2 vendor platform and pulled props from your tmo gs2 and it worked? i call bs. youd have a brick if it even compiled. you should really do more research before posting brick tutorials.
mikeyinid said:
I know what they are. I've been compiling cm7 for a while. I hope you understand what your telling people here. Good day sir.
Sent from my SGH-T989 using Tapatalk
---------- Post added at 02:30 PM ---------- Previous post was at 02:26 PM ----------
wait, i just thought about this a little. your telling me that you built using the att gs2 vendor platform and pulled props from your tmo gs2 and it worked? i call bs. youd have a brick if it even compiled. you should really do more research before posting brick tutorials.
Click to expand...
Click to collapse
Ok so which one of the 4 would you use?
If you want to have a working T-Mobile Galaxy S2 I advise you not to follow this guide.
Source for MSM_8660 devices (read: our phones) is not open source and you can not build it yourself. An official member of the CyanogenMod team can build it as they have access to these sources.
This guide may work for the AT&T Galaxy S2 (not the Skyrocket), but it will sure as hell not work for this phone.
Also, it looks like you just took the tutorial from the CM wiki and formatted it for the forums and mixed in some of the tutorial from s.android.com... what have you actually added to this?
Good day, sir.
Royalknight6190 said:
Ok so which one of the 4 would you use?
Click to expand...
Click to collapse
none. hercules is not supported in cm atm.
mikeyinid said:
none. hercules is not supported in cm atm.
Click to expand...
Click to collapse
But it gets them to a good starting point. Then they can work on the Proprietary files.
Romanbb said:
If you want to have a working T-Mobile Galaxy S2 I advise you not to follow this guide.
Source for MSM_8660 devices (read: our phones) is not open source and you can not build it yourself. An official member of the CyanogenMod team can build it as they have access to these sources.
This guide may work for the AT&T Galaxy S2 (not the Skyrocket), but it will sure as hell not work for this phone.
Also, it looks like you just took the tutorial from the CM wiki and formatted it for the forums and mixed in some of the tutorial from s.android.com... what have you actually added to this?
Good day, sir.
Click to expand...
Click to collapse
I didnt pull anything from the CM wiki nor s.android.com I pulled it from Sparksco thread, which I stated, then I added the code for Samsung rules.d along with adding in how to get the proper java, because sparksco's way wasnt working for me. Right it will work for ATT, but it gives the user a good start on if they want to start building first for other phones and 2nd to try to build for our phone.
Why does everybody have an issue with people learning how to compile from source. Let them learn and do it themselves, the more people we get to learn to build Roms the better the thread will be. I have no idea why you are hating but if this is how this thread got its bad name then I know exactly why. All you can do with somebody either trying to help or looking for help is beat them down, instead of just helping them. I said in my OP that if things need to be edited then let me know. This hostility is uncalled for. Especially from a fellow Developer, that is no way a developer should act. Is that how your mother brought you up to act, I think not. Wow this thread was starting to look good again and turn around then the wolves come out to hate again. I guess nap time was over.
Despite what people are saying in the thread , I appreciate the effort you made Royal. Although I'm not building cm7, I'm intending to experiment on gb and ics AOSP to learn on . This does help some
I also think people don't know that TeamDarkside has a working cm7 port released either ..... and that you are part of it :-\
1 more thing.... ATT skyrocket roms do actually work / boot on our T989 's
http://forum.xda-developers.com/showthread.php?t=1360355
[MOD] Skyrocket ROMS on Hercules
Sent from my SGH-T989 using xda premium
pyraxiate said:
Despite what people are saying in the thread , I appreciate the effort you made Royal. Although I'm not building cm7, I'm intending to experiment on gb and ics AOSP to learn on . This does help some
I also think people don't know that TeamDarkside has a working cm7 port released either ..... and that you are part of it :-\
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
what you dont know is he didnt compile that cm7 build. its slayhers build.
Hello everyone. Today I decided I wanted to give back to the One V community with a tutorial on building a kernel. This is not specific to the Primoc/u and contains the directions for both. The source even includes both! So lets hit the ground running.
Note: for the most up to date instructions visit here
Now youll need to have access to sudo to get the packages needed. here are the commands to get packages
Ubuntu 10.04-11.10:
Code:
sudo apt-get update; sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gcc
Ubuntu 12.04
Code:
sudo apt-get update; sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 gcc
Now, to get the source run these commands
Code:
cd ~/
mkdir kernel
cd kernel
git clone git://github.com/teamblueridge/MSM7X30_KERNEL.git onev_kernel
cd onev_kernel
first you are changing to your home directory. Next your making a folder for kernels, and then pulling the source from github. This source is modified and maintained by me, so I know it stays working. Finally your changing into the kernels directory. Now how do we build this thing you ask. Well we have to do some more prep work. Lets start that prep work
run these commands
Code:
cd ~/
mkdir toolchains
cd toolchains
#this takes some time
git clone https://android.googlesource.com/platform/prebuilt android_prebuilt
cd ~/kernel/onev_kernel
Now we select our branch
for ics run
Code:
git checkout ics
For jb
Code:
git checkout jb-hack
Now were ready to build. Basically your grabbing the android prebuilts which includes the needed toolchain in the steps before.
Now heres the fun codes
Okay below, i have a -jX in the command. This is the number of parallell builds. This will be the number of your CPU's plus one. If you have no clue how many cpus you have run this code below and add one
Code:
grep -c processor /proc/cpuinfo
To make CDMA
Code:
make ARCH=arm primoc_defconfig
make -jX ARCH=arm CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
To make GSM
Code:
make ARCH=arm primou_defconfig
make -jX ARCH=arm CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
So whats going on here you ask now? your using gnu make to build a kernel! arm is the architecture, CROSS_COMPILE is the toolchain we downloaded and -j`grep -c processor /proc/cpuinfo` will find the number of cpu cores you have and adjust the speed for your system!
So now your kernel is created and you want the kernel image to stick in your boot.img. Well its always located at ~/kernel/onev_kernel/arch/arm/boot/zImage any modules you selected are listed at the end of the build
If you were wondering, you can also modify the .config with this command
Primoc
Code:
make mrproper"
make ARCH=arm primoc_defconfig
make menuconfig
Primou
Code:
make mrproper
make ARCH=arm primou_defconfig
make menuconfig
Want the easy way out? Try this script
https://github.com/simonsimons34/kernel-building-script
reserverd for future use
Perfect!! Now I can remember how to do it when I don't want to waste Jenkins!
Nice one! :good:
simonsimons34 said:
To make CDMA
Code:
make -j`grep -c processor /proc/cpuinfo` ARCH="arm" CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primoc_defconfig
make -j`grep -c processor /proc/cpuinfo` ARCH="arm" CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
To make GSM
Code:
make -j`grep -c processor /proc/cpuinfo` ARCH="arm" CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primou_defconfig
make -j`grep -c processor /proc/cpuinfo` ARCH="arm" CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
Primoc
Code:
make mrproper CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primoc_defconfig
make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" menuconfig
Primou
Code:
make mrproper CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" primou_defconfig
make CROSS_COMPILE="~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" menu_config
Click to expand...
Click to collapse
At the beginning, why not just have them export "~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" as CROSS_COMPILE? I am sure there is a legit reason why, so I am not being a stink head. I suppose that unless the user added it to .bash_profile, they'd forget to do the "export" command each time...
You actually answered your own question there this is meant to be easy to follow and not go into too much depth where users unfamiliar to linux cant follow. Its trying to get people enjoying the ease of linux and not be too easily scared off. Also, forgetting to export was the exact reason I didn't have an export. This hurts nothing, afterall
got an error. followed the guide step by step, Ill fix it myself im just letting you know.
/home/conner/kernel/onev_kernel/scripts/mksysmap: line 44: ~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-nm: No such file or directory
make: *** [vmlinux] Error 1
question??????
simonsimons34 said:
You actually answered your own question there this is meant to be easy to follow and not go into too much depth where users unfamiliar to linux cant follow. Its trying to get people enjoying the ease of linux and not be too easily scared off. Also, forgetting to export was the exact reason I didn't have an export. This hurts nothing, afterall
Click to expand...
Click to collapse
ok first awsome of u to share it with us ok ive ran the commands with ubuntu and ive done the whole process and when it is finished and the kernel is done what do we have to do how to we convert it to a image file and get it on the device im sure this is a stupid question and a waist of ur time i appoligize for me being a noob
Mods/admins recently had a discussion on where guides/tutorials should go and it was decided that the General section is the place for them. Moved there.
sellers86 said:
got an error. followed the guide step by step, Ill fix it myself im just letting you know.
/home/conner/kernel/onev_kernel/scripts/mksysmap: line 44: ~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-nm: No such file or directory
make: *** [vmlinux] Error 1
Click to expand...
Click to collapse
Its you not me. I just double checked.
sbkjuggalo said:
ok first awsome of u to share it with us ok ive ran the commands with ubuntu and ive done the whole process and when it is finished and the kernel is done what do we have to do how to we convert it to a image file and get it on the device im sure this is a stupid question and a waist of ur time i appoligize for me being a noob
Click to expand...
Click to collapse
No no this is a tutorial. Its meant to allow people interested to be able to learn and do it. The next big thing may come from someone that gave up. Everyone needs help along the way. Once you get the kernel compiled, you can download android kitchen from here. I don't have a link, Google will suffice. So take that open menu with ./menu now go yo 0>12>w>x>0>x and go to the boot extracted folder. Note you must set up kitchen from a sick kernel zip that I have released. Now once in this directory delete the zImage there and replace with the one you compiled. Now go to ./menu 0>12>b>x>0>x and in the Working directory your new kernel is ready to be sent to your phone! All you have to do after that is when the ROM is booted run
adb remount
adb push /path/to/bcmdhd.ko /system/lib/modules/bcmdhd.ko
Enjoy
Sent from my One V using Tapatalk 2
You are awesome for doing this. :thumbup:
sentfromybrain
simonsimons34 said:
Its you not me. I just double checked.
Well, running a different command (the one I normally use) fixed it. so Idk what to tell you there.
Click to expand...
Click to collapse
Its probably your toolchain.. It is your toolchain. you could easily use the ndk/cmtoolchain/custom
Sent from my One V using Tapatalk 2
simonsimons34 said:
Its probably your toolchain.. It is your toolchain. you could easily use the ndk/cmtoolchain/custom
Sent from my One V using Tapatalk 2
Click to expand...
Click to collapse
that makes a whole lot of sense... no it is not my toolchain, I followed your directions step by step and got the error. same toolchain, same locations, same commands.
sellers86 said:
got an error. followed the guide step by step, Ill fix it myself im just letting you know.
/home/conner/kernel/onev_kernel/scripts/mksysmap: line 44: ~/toolchains/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-nm: No such file or directory
make: *** [vmlinux] Error 1
Click to expand...
Click to collapse
sellers86 said:
that makes a whole lot of sense... no it is not my toolchain, I followed your directions step by step and got the error. same toolchain, same locations, same commands.
Click to expand...
Click to collapse
Since you knew how to fix it, obviously that is tool chain.
It's missing arm-eabi-nm
Sent from my One V using Tapatalk 2
nice simon, built fine for me. :good:
simonsimons34 said:
Since you knew how to fix it, obviously that is tool chain.
It's missing arm-eabi-nm
Sent from my One V using Tapatalk 2
Click to expand...
Click to collapse
You think I didn't think of that? Smh dude I'm not an idiot. And I fixed it by running a different command pointing to the same tool chain.
Sent from my One V using Tapatalk 2
what went wrong got this error.... any help would be greatfuly thanked.... any one with time to assist would be nicely thanked...($$$)
sellers86 said:
You think I didn't think of that? Smh dude I'm not an idiot. And I fixed it by running a different command pointing to the same tool chain.
Sent from my One V using Tapatalk 2
Click to expand...
Click to collapse
Lloir said it works fine so im sorry but i will side with him. Recognized dev > someone not
when it comes to development
sbkjuggalo said:
what went wrong got this error.... any help would be greatfuly thanked.... any one with time to assist would be nicely thanked...($$$)
Click to expand...
Click to collapse
Your error seems to me like there would be a better alternative. Please try this
Code:
sudo apt-get install gcc
make menuconfig
Sent from my One V using Tapatalk 2
Thx will try after work tonight
Sent from my One V using Xparent Blue Tapatalk 2
hi,
i have setup my Server to Build daily builds for Cyanogenmod.
i have start the first time manually the process.
can it work with this selfmade script?
PHP:
#!/bin/bash
cd ~/android/system/
repo sync
cd ~/android/system/vendor/cm
./get-prebuilts
cd ~/android/system
source build/envsetup.sh && brunch endeavoru
and how i can copy or move the newest build to the Download directory?
i know that i can do it with "cp" or mv" but with the daily changed date in the Zip file?
and the last Question... how can i edit the "master" build.prop? i mean the Build.prop they didn´t change after "repo sync"
i use this Cyanogenmod Wiki http://wiki.cyanogenmod.org/w/Build_for_endeavoru
thanks for helping
http://lars-mueller.mobi/download/endeavoru/
Re: [Q] some question to build Roms on server
Should work, but I always do . build/envsetup.sh && brunch xxx instead of your way.
Sent from my One X using xda premium
it´s the same without source build.
do you know how can i copy the files with the script?
AW: [Q] some question to build Roms on server
Okay I have solved my problems. I move the filed via " mv /my/files/cm10.1-"Y-m-d".zip /destination/path/" to the public download directory..
And that is the directory http://lars-mueller.mobi/download/endeavoru
geschrieben mit dem Android 4.2.2 powerd HOX
Re: [Q] some question to build Roms on server
Oo nice!
I guess those are broken just like the official builds?
Sent from my One X using xda premium
why the Builds are broken, i try it tomorrow
Vendor blobs have been subject to a DMCA takedown. So the builds are missing 20mb of blobs.
Sent from my One X using xda premium
Hi everyone. I am attempting to buld my first ROM and am following a guide to build beanstalk. I am at a point that confuses me. The comand is "breakfast (Device name)". Is this just looking for "n7100" or is there a speacial name I have to put there? Thanks!!
PS: Before anyone say this is not the place for this, Id like to say sorry first. IF i can get this to work and I get permision from scott this will turn into a new Beanstalk build thread.
It depends on the Beanstalk build environment setup. Your best bet is to PM someone that has already built for a device and ask them.
Just something to try, you could try the breakfast command without typing anything after it and see if your device name shows up then.
When I started building from source, I have never used the breakfast command, only lunch and make.
Thanks for the reply. I am running into another problem thats a step before that. I am trying to get the curl command to work. It creates a file called repo but when I try to do the next command repo init "blahblah" I get an error code saying syntay error Doctype HTML. The only thing I can think of is that the repo file should be a python script but is getting saved as html. I dont know how to fix this. Can someone post there repo file. This is the code to I am using to create the repo file.
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Bert.C said:
It depends on the Beanstalk build environment setup. Your best bet is to PM someone that has already built for a device and ask them.
Just something to try, you could try the breakfast command without typing anything after it and see if your device name shows up then.
When I started building from source, I have never used the breakfast command, only lunch and make.
Click to expand...
Click to collapse
Goneeuro said:
Thanks for the reply. I am running into another problem thats a step before that. I am trying to get the curl command to work. It creates a file called repo but when I try to do the next command repo init "blahblah" I get an error code saying syntay error Doctype HTML. The only thing I can think of is that the repo file should be a python script but is getting saved as html. I dont know how to fix this. Can someone post there repo file. This is the code to I am using to create the repo file.
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Click to expand...
Click to collapse
Have you got that big list of dependencies installed? If you dont know what I mean, search for aosp amd setting up build environment and theres a list of packages that need imstalling, python beimg one of them.
Actually looking at that link I dont think thats where my repo come from. If you can wait until tomorrow when Im back at my pc Ill sort out a step by step guide if you want? As in noob starting from scratch guide that I followed to get set up.
Sent from my GT-N7100 using Tapatalk
Bert.C said:
Have you got that big list of dependencies installed? If you dont know what I mean, search for aosp amd setting up build environment and theres a list of packages that need imstalling, python beimg one of them.
Actually looking at that link I dont think thats where my repo come from. If you can wait until tomorrow when Im back at my pc Ill sort out a step by step guide if you want? As in noob starting from scratch guide that I followed to get set up.
Sent from my GT-N7100 using Tapatalk
Click to expand...
Click to collapse
Yeah. I had a wrong link in the curl command. It was an old link. I googled it and replaced it, now everything seems to be working. Lets see though. Any help you can give though I would apreciate it.
Goneeuro said:
Yeah. I had a wrong link in the curl command. It was an old link. I googled it and replaced it, now everything seems to be working. Lets see though. Any help you can give though I would apreciate it.
Click to expand...
Click to collapse
What steps have you already taken mate? Start from the very beginning if you can and we shall get you up and running in no time at all (unless you already are?)
Hi. I got it syncing now. Thanks. The next command I'm not to sure of is the breakfast command.
Sent from my GT-N7100 using xda app-developers app
Goneeuro said:
Hi. I got it syncing now. Thanks. The next command I'm not to sure of is the breakfast command.
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
Did you add your N7100 repo's to the local manifest?
Bert.C said:
Did you add your N7100 repo's to the local manifest?
Click to expand...
Click to collapse
Can I message you on hangouts?
Bert.C said:
Did you add your N7100 repo's to the local manifest?
Click to expand...
Click to collapse
Sent PM. :good:
Ok. Next question. Where or how do I get the device specific files for the note 2 so I can try to build the newest beanstalk. I thought they would automatically come from CM but the device isnt supported. Not sure if I mentioned this or not before but I have never done this before so it is a learning experience for me.