Hello,
I don't want to ask how to build ROM.
I am new to building and compiling. I followed tutorial here on xda.
I installed everything crucial, then I do "repo init" ( repo init -u https://github.com/P880-dev/android.git -b cm-11.0) and then "repo sync". Source has downloaded. Then I do "source \envsetup.sh", "lunch", chose 11 as cm_p880-userdebug and at last "make -j6 otapackage". Now I have a question: I am compiling it for like 6 hours and in "home\username\android\out\project\p880" is around 12 GB of data, is that good?
Sent from my LG-P880 using Tapatalk
yep that is good.. every next time would be faster..
how long ? depends on processor and ram
@gerciolisz
Oh, forgot my specs:
Asus laptop
Core i5 3120m
6 GB ram
in virtualbox:
3 cores
2,5 gb
60 gb disk
And run make -j6
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
I am more concerned about that I have only 6 gb of disk available. But I think it is on the end of process. It is worth if waiting
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
You have to initialize ccache before compilation, that way it can cache the code when you first compile it. Check here.
LGaljo said:
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
Click to expand...
Click to collapse
Just like Adam said.. But anyway it needs more space to cache..
Sent from my LG-P880 using xda app-developers app
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
LGaljo said:
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
Click to expand...
Click to collapse
You can, but won't have effect now as you already compiled.
gerciolisz said:
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
Click to expand...
Click to collapse
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
LGaljo said:
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Click to expand...
Click to collapse
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
gingerboy92 said:
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
Click to expand...
Click to collapse
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
faabak said:
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
Click to expand...
Click to collapse
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
LGaljo said:
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
Click to expand...
Click to collapse
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
gingerboy92 said:
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
Click to expand...
Click to collapse
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
faabak said:
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
Click to expand...
Click to collapse
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
gingerboy92 said:
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
Click to expand...
Click to collapse
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
faabak said:
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
Click to expand...
Click to collapse
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
gingerboy92 said:
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
Click to expand...
Click to collapse
Yeah, i also noticed! But it does'nt seems like everyone has that problem.. I run "brunch" again now, it only used like 15 minutes or so.. Will try to install it!
Related
Hi Guys,
This is for US version with ATT
I am starting an attempt to build from AOSP source and I will post as much as possible the complete process for people who wish to do the same. I have never compiled for ATRIX before, and I am sure I will need a lot of help from the community.
I have started my process by first Installing a fresh copy of linux mint 12,
I will give the list of packages install and the directory setup, I will keep my folder in the home directory so the commands I use are portable and probably help make a script in the end , for compile from scratch to the *.img files ready for installation via fast boot.
I am open to suggestions and criticism
Reserved for the main TUT
Lets start by installing all tools that may be needed to build the source including apps
Install an good IDE which also supports android-sdk
Code:
sudo apt-get install eclipse-cdt
1) Install SDK
Install the SDK with api for 2.3.3 and 4.0 if you wish to update to ice cream sandwich, which I plan to soon try after first sucessful compile for 2.3.3
follow instructions here
http://developer.android.com/sdk/eclipse-adt.html#installing
2)Initialize Build Environment
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils libsdl-dev libesd0-dev libwxgtk2.6-dev
3)Install CodeSoucery compiler for arm-linux-eabi
Download the IA32-GNU/Linux installer from here
go to the download folder in command prompt and set executable permissions for it
Code:
chmod +x arm-2011.03-41-arm-none-linux-gnueabi.bin
Install it with all default options
4) Get Kernel Source for ATRIX from
here
Unzip code in a folder in home directory , a folder named kernel-tegra is created
5) Get config file from an ATT atrix with stock kernel
Connet phone switch on debugging from settings
Assuming android sdk installed under home folder.
Code:
cd ~/android-sdk-linux/platform-tools/
./adb pull /proc/config.gz
mv config.gz ~/kernel-tegra/
cd ~/kernel-tegra/
gunzip config.gz
cp -a config .config
6) Lets Compile the Kernel
Start with setting the compiler flags
Code:
cd ~/kernel-tegra
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
make oldconfig
make zImage
make modules
and we have a compiled kernel, now we need to packit and upload it to the phone! Working on it now
Is this the right forum mate..?
whats an atria? herp a derp
So where do I start this, do I go to main android developement thread in the forum?
Sorry atrix, auto correction sucks
Sent from my MB860 using xda premium
I'm 15 with only.visual basic programming ... if I can help please shoot me a pm
Sent from my MB860 using xda premium
lol..take a look at the cm wiki if you need help compiling. There's plenty of guides and tutorials out there
I tried reading those guides but they are highly customized about CM7 code and rely on scripts. M y aim here is to start with google source apply motorola patches update to a working repo on google code and update to ICS. To be generic so anyone can use it for any platform as a guide and know what files are to be modified, I am going to mention in detail about all files modified, all drivers that were added and if possible explain changes in each file , reason and what needs to be changed. If I could find that documentation it would be great but I couldn't!
Also cm7 doesn't have a official repo for ATRIX.
I'm interested for this tutorial. So be kind to continue please. Its nice to gain more knowledge and if it is step by step its even better !
Thank you !
This certainly looks interesting, I think might get linux running in a virtual machine and try it myself. Ice cream sandwich would be a very good thing to get working from this, but to build it from source, you need the source for tegra from nvidia for sure, and maybe code from motorola, I am right?
Even if that's not possible, a guide for building a android aosp rom for the atrix sounds awesome, keep posting.
Ya you do need source from motorola for the kernel, but any device running ICS on tegra2 should help with the kernel, and I don't think the kernel version has changed in ICS it is still 2.6.xx, cause I haven't read anywhere about the change. Also if kernel is the same the drivers are almost the same, so I am guessing main framework and UI changes are a big part, which happen to be quite independent of hardware!
aditya_g8 said:
Ya you do need source from motorola for the kernel, but any device running ICS on tegra2 should help with the kernel, and I don't think the kernel version has changed in ICS it is still 2.6.xx, cause I haven't read anywhere about the change. Also if kernel is the same the drivers are almost the same, so I am guessing main framework and UI changes are a big part, which happen to be quite independent of hardware!
Click to expand...
Click to collapse
I read somewhere that they were going to start using 3.x kernel, but the sdk says its running 2.6.29, and the kernel might not be updated for some time since its not part of the main linux kernel repository anymore.
Is Spotify really necessary???
WTF is this? I hope you prove me wrong but you have noob written all over you. First you misspell Atrix then you misspell Olympus. You write a guide on how to install Spotify. You don't even specify what you're trying to compile. Kernel? AOSP? CM7?
yeahmann said:
WTF is this? I hope you prove me wrong but you have noob written all over you. First you misspell Atrix then you misspell Olympus. You write a guide on how to install Spotify. You don't even specify what you're trying to compile. Kernel? AOSP? CM7?
Click to expand...
Click to collapse
Hey I am new to this, but I am trying to work thing out. I am hardware guy with very less programming experience. I want to write a guide from a noob perspective, which is which is why I started. More than a guide this is a log of things I am doing to get my AOSP and kernel compiled. I wish to then start with ICS, I know it is a long shot but worth a try!
When I am done with it completely say 2.3.3 I will clean up my posts and make sure no errors exists
Guys let the dude try at least ...everyone is a n00b at sometime or the other ...he is trying to learn so motivate him ...
lol..install spotify..sdk..eclipse ide..
lol
Neither 3 of those have anything to do with building..you obviously haven't read the cm wiki yet. theres nothing about scripts there...It gives you the commands to run to get all the tools necessary, & Instructions on how to build.
Jussayin..the way you're going, is headed in the wrong direction even for a noob
jasonyump said:
Jussayin..the way you're going, is headed in the wrong direction even for a noob
Click to expand...
Click to collapse
I agree with that , guess some dev needs to point him to the right direction ...
---------- Post added at 07:19 PM ---------- Previous post was at 07:17 PM ----------
Dont know if this will help, but a long time ago, i compiled a kernel for my spica and here are the steps ...
http://forum.samdroid.net/f28/setup-kernel-build-environment-using-virtualbox-windows-7-64-bit-4007/
---------- Post added at 07:37 PM ---------- Previous post was at 07:19 PM ----------
here is another link which might help
http://forum.xda-developers.com/showthread.php?t=1188298
munchy_cool said:
I agree with that , guess some dev needs to point him to the right direction ...
---------- Post added at 07:19 PM ---------- Previous post was at 07:17 PM ----------
Dont know if this will help, but a long time ago, i compiled a kernel for my spica and here are the steps ...
http://forum.samdroid.net/f28/setup-kernel-build-environment-using-virtualbox-windows-7-64-bit-4007/
---------- Post added at 07:37 PM ---------- Previous post was at 07:19 PM ----------
here is another link which might help
http://forum.xda-developers.com/showthread.php?t=1188298
Click to expand...
Click to collapse
Thanks guys, I will read through them links and will learn. I am open to learning and sorry for the script part , I read a forum where CM7 compile was done with a automated script file which said official and I thought that was it.
Hi guys I have compiled the kernel and have a zImage, I wish to pack and upload it and test it before I can confirm it is working. Thanks for the help again guys! And I got rid of spotify I see people are much more critical than I thought! I was hoping for a little more help as a friendly forum!
Thanks a lot munchy_cool
aditya_g8 said:
Hi guys I have compiled the kernel and have a zImage, I wish to pack and upload it and test it before I can confirm it is working. Thanks for the help again guys! And I got rid of spotify I see people are much more critical than I thought! I was hoping for a little more help as a friendly forum!
Thanks a lot munchy_cool
Click to expand...
Click to collapse
I wasn't trying to be critical, I was just wondering why you had it on there.
I will teach you build ROM.
Lets get some ROCK!!!
Operating System
First step is having a fully functional linux distro. You can choose what you prefer, I'm using ubuntu and I write commands for it. You can use OSX too, as I know, but I've completely no idea how, I never had a Mac.
Well, talking about linux, you need a 64bit distribution, so if you have an old 32 bit processor youn cannot go ahead.
To check which version do you have, type in a shell
uname -a
If the results include "x86_64" you're ok.
Required Packages
You need to install some little packages, to be able to proceed, you can do this with your favorite package manager:
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-dev:i386 g++-multilib mingw32 openjdk-6-jdk pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Some systems need some trick to install all this package, is your care to check this process completed correctly and fix eventually problems.
Install "repo"
Repo is the program that handles synchronization between our pc and the repository, in this case Cyanogen's one. To install do:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
So we have downloaded and added executables flag to it. Now we need a folder to store locally the sources, you can put it everywhere, but to be coherent with other guides, I do:
mkdir -p ~/CM10/
Repository initialization
Well, now it's time to initialize our source folder to correctly sync with repository:
cd CM10
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Nota: Maybe the repo command is not recognized. In this case you can restart the shell or te machine.
Download
Now is download time! Write this command and get a fresh beer, you have to download several GB of data, please wait.
repo sync -j16
The "-j16" switch may be modified as you want, is the number of concurrent thread downloading from repo. 16 is my value, for a 100Mbit connection, maybe you can decrease a little to match your line speed. Someone uses 8 threads for an 8Mbit ADSL line.
Download precompiled files.
There are some others files needed, like the toolchain, including GCC, to compile code.
~/CM10/vendor/cm/get-prebuilts
Another small wait time and we're ready!
Add sources code for GT540
Copy sources from https://github.com/mmxtrem/device_lge_swift to ~/CM10/device/lge/swift
Or extract this archive http://depositfiles.com/files/1chflk58r to ~/CM10/device/lge/swift
Build
Great, we're ready to build!
The build process takes some hours, so be patient. My notebook, takes more than 10 hours!
cd CM10
source build/envsetup.sh && brunch swift
Install
When is ready, we can find the result here:
~/CM10/system/out/target/product/swift/cm-10-XXXXX-JellyBeanSwift-XXXX.zip
This is the package to be flashed in recovery mode.
There are Gapps included.
Update
If you want to update your build, you have to do only this:
cd CM10
repo sync
and build again!
P.S. Dont forget write Credit my name, when will be publish your ROM. Good Luck!
[Guide] How to use Github
http://forum.xda-developers.com/showthread.php?t=1877040
Wow I always wanted to try this out! Thanks for the surprise tutorial!
Wow wow wow.. forget my post in the other thread. This thing miro, this thing here is possible your best contribution to this community.. I'm getting my old gt540 back from my brother and trying these right tomorrow..
I actually thought about asking you for such a tutorial but scratched it as I didn't believe you would do it. But thank you again and again.. I was so wrong
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
-bfar97- said:
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Click to expand...
Click to collapse
+1
Sent from my LG-P990 using Tapatalk 2
smileydr0id said:
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
Click to expand...
Click to collapse
Yes, gt540 is msm7x27
smileydr0id said:
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
Click to expand...
Click to collapse
https://github.com/Californication its my repo!
lge-kernel-msm7x27-ics-3.0.8 - not working. I did try port it from LG L5. Kernel not starting, kernel not finish.
lge-kernel-msm7x27 - kernel from SDSL and AOSP, I ported it from https://github.com/CyanogenMod/lge-kernel-msm7x27 for LG 7227 devices (P500/510/C660/and other), but it dont have latest fixes.
Please dont write stupid massages like "smiles" or +1 or other, make it clean! Devs only, if you want build ROM real, if no go spaming into other thread!
XiproX said:
Yes, gt540 is msm7x27
Click to expand...
Click to collapse
https://github.com/Californication its my repo!
lge-kernel-msm7x27-ics-3.0.8 - not working. I did try port it from LG L5. Kernel not starting, kernel not finish.
lge-kernel-msm7x27 - kernel from SDSL and AOSP, I ported it from https://github.com/CyanogenMod/lge-kernel-msm7x27 for LG 7227 devices (P500/510/C660/and other), but it dont have latest fixes.
Click to expand...
Click to collapse
damn
-bfar97- said:
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Click to expand...
Click to collapse
^ This, make a guide for this, or is just all "lets google it"?
thanks for that tut miroslav !!
i would be happy if you can make example of bug fixing/driver porting (something simple as example).
Oh, nice post Miro
But one thing, why don't you post how to make device files. It would be of more use as people will try to make their own sources and a good chance that they could make their own device in collaboration. :good:
i've ear i can do a build in a 32bits processor too! but you know xD do what was said up please!!
Could someone try to build this because I can't cause I have 32bit system in my PC.
We need JB for daily use!
Why are you using -mfloat-abi=softfp
why not -mfloat-abi=hard ?
aaa801 said:
Why are you using -mfloat-abi=softfp
why not -mfloat-abi=hard ?
Click to expand...
Click to collapse
forgot about this line, not using for ROM. it need only for android-ndk for kernel building.
Niquel97 said:
We need JB for daily use!
Click to expand...
Click to collapse
Just do it! (c. Nike)
P.S. Dreams-dreams-dreams.... :laugh:
miroslav_mm said:
forgot about this line, not using for ROM. it need only for android-ndk for kernel building.
Click to expand...
Click to collapse
So should work fine if set to hard yes?
i'm getting this error when compiling:
Install system fs image: out/target/product/swift/system.img
out/target/product/swift/system.img+ maxsize=262225920 blocksize=135168 total=277360512 reserve=2703360
error: out/target/product/swift/system.img+ too large (277360512 > [264929280 - 2703360])
al3000 said:
i'm getting this error when compiling:
Install system fs image: out/target/product/swift/system.img
out/target/product/swift/system.img+ maxsize=262225920 blocksize=135168 total=277360512 reserve=2703360
error: out/target/product/swift/system.img+ too large (277360512 > [264929280 - 2703360])
Click to expand...
Click to collapse
Yes, me too, the build comes so big that it fails the size checks on the default partition layout.
To avoid that change the contents in device/lge/swift/BoardConfig.mk, I've used these values:
Code:
# PARTITIONS
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00500000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00900000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x0010B07600
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x007478A00
BOARD_FLASH_BLOCK_SIZE := 131072
I believe you can still zip up the right files in out/target/product/swift/ to have a signable update zip, the command "make otapackage" which I found somewhere didn't seem to work.
Disclaimer: I'm not responsible for what this does to your shiny device, SO DON'T BLAME ME!!!
Requirements:
Ubuntu 12.10 64-bit
15GB of disk space (25Gb recommended)
Internet connection
Brain
First:
Install required packages:
Code:
apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool libxml2 xsltproc g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
Install repo:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod 755 ~/bin/repo
echo "export PATH=\${PATH}:~/bin" >> ~/.bashrc
export PATH=${PATH}:~/bin
Second:
Sync all the sources
Code:
cd ~/android/system
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
mkdir -p .repo/local_manifests
curl -L -o .repo/local_manifests/razrqcom.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/master/razrqcom.xml
repo sync -j1
Go sleep for the night, because this takes overnight
Third:
Build:
Code:
cd ~/android/system/vendor/cm
./get-prebuilts
cd ~/android/system/device/motorola/qinara
./extract-files.sh
cd ~/android/system
. build/envsetup.sh
lunch cm_mb886-userdebug
make otapackage
ENJOY!!!
Resverved...
tcf38012 said:
Resverved...
Click to expand...
Click to collapse
Cool tutorial.
Did you have success using this method?
Your internet must really suck :silly, takes me an two hours tops during heavy traffic. Well, Defy GB takes many, many hours...but it also syncs for like 20 devices untill you modify the xmls and scripts.
Also, sync -j1 is the slowest setting and only recommended if you net really does suck. I get best results between -j3 and -j5 depending on time of day. The number is me amount of simultaneous downloads that will occur.
Do everyone a favor and not add in the ccache part of the guide. I've had issues in the past where the only difference in compile was ccache, and the ccache version was the buggy one. I used to love it, but once you use if for a bit and start getting buggy roms, only to disable it and recompile the same crap and not have a buggy rom....quit using ccache easy decision to make for me.
Thanks for the guide, I'm sure someone will find it useful. Once my cable net gets back online I plan on messing around with CM10.
//Gotta love MR's no tethering entitlement check
Markyzz said:
Cool tutorial.
Did you have success using this method?
Click to expand...
Click to collapse
Yeah I wish
I just need to make it work and upload to github.
I will work on it more on the weekend
skeevy420 said:
Your internet must really suck :silly, takes me an two hours tops during heavy traffic. Well, Defy GB takes many, many hours...but it also syncs for like 20 devices untill you modify the xmls and scripts.
Also, sync -j1 is the slowest setting and only recommended if you net really does suck. I get best results between -j3 and -j5 depending on time of day. The number is me amount of simultaneous downloads that will occur.
Do everyone a favor and not add in the ccache part of the guide. I've had issues in the past where the only difference in compile was ccache, and the ccache version was the buggy one. I used to love it, but once you use if for a bit and start getting buggy roms, only to disable it and recompile the same crap and not have a buggy rom....quit using ccache easy decision to make for me.
Thanks for the guide, I'm sure someone will find it useful. Once my cable net gets back online I plan on messing around with CM10.
//Gotta love MR's no tethering entitlement check
Click to expand...
Click to collapse
Go ahead and use your lte lol
I just have a 325kb/s inet speed at the max, so I just use -j1
You can change it if you have a super connection at your house
Downloads, unless your wireless, work better solo anyways...
Why the tuturial? Why not just build the CM10.1 yourself and collect the $50 reward?
tcf38012 said:
Go ahead and use your lte lol
I just have a 325kb/s inet speed at the max, so I just use -j1
You can change it if you have a super connection at your house
Downloads, unless your wireless, work better solo anyways...
Click to expand...
Click to collapse
325k..now I get it. I have 1.5m down with 60k up...ISP caps upload to stop torrenting, but I guess they've never heard of leeching.
No LTE here, closest is 30 milesish. 3gb data cap with $10 per GB afterwards....damn ripoff.
I can -j2 and both [email protected] or [email protected]
One of my neighbors uses only WPA security... I'll "access" that network if mines not back up soon.
---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------
nick2012 said:
Why the tuturial? Why not just build the CM10.1 yourself and collect the $50 reward?
Click to expand...
Click to collapse
Just because its a repo doesn't mean it works. This is a start and could end up being the working one. We need a starting point & this is just that.
Reportedly Hashcode's 10.1 boots on our AHD, but the display is black. This is because the newer RazrHD builds use a different display name/driver(?) than the AHD. Same goes for the touchscreen (I think). If you look at some log in /proc after booting up (I forgot the name, but you need to reboot, not power off, or else it'll be erased), you'll see the error about the display
This is also why TWRP doesn't load on the AHD. Hashcode tested a rebuild with the display name fix, and the screen worked, but something else didn't so it's not ready for primetime just yet.
I'm not sure if it's a kernel/init or system issue, but the cm10 version I uploaded is an older RarzrHD build by Hashcode and doesn't have a broken display on the AHD, whereas Epinter's latest cm10 doesn't work. So maybe that's a place to start for the display issue.
As a test, I flashed only Epinter's /system, leaving Hashcode's boot.img intact, and the ROM booted up. The backlight lit up during an incoming call but it did not vibrate or ring, and the display was black, of course. Hopefully this helps with building 10.1.
progrockguy said:
Reportedly Hashcode's 10.1 boots on our AHD, but the display is black. This is because the newer RazrHD builds use a different display name/driver(?) than the AHD. Same goes for the touchscreen (I think). If you look at some log in /proc after booting up (I forgot the name, but you need to reboot, not power off, or else it'll be erased), you'll see the error about the display
This is also why TWRP doesn't load on the AHD. Hashcode tested a rebuild with the display name fix, and the screen worked, but something else didn't so it's not ready for primetime just yet.
I'm not sure if it's a kernel/init or system issue, but the cm10 version I uploaded is an older RarzrHD build by Hashcode and doesn't have a broken display on the AHD, whereas Epinter's latest cm10 doesn't work. So maybe that's a place to start for the display issue.
As a test, I flashed only Epinter's /system, leaving Hashcode's boot.img intact, and the ROM booted up. The backlight lit up during an incoming call but it did not vibrate or ring, and the display was black, of course. Hopefully this helps with building 10.1.
Click to expand...
Click to collapse
Latest CM10.1 merge broke a few things on the RAZR HD side and they're working on it...
Before I even got an Atrix HD, I had a feeling Atrix\RAZR HD would be like Bravo\Defy and I was right....Quit making clone phones Motorola. We need 5 models a year -- small, medium, large, small tablet, and big tablet with all running the same OS...That's what I would do if I were in charge.
Almost up to a 1:1 post to thank ratio. Makes me happy.
skeevy420 said:
Latest CM10.1 merge broke a few things on the RAZR HD side and they're working on it...
Before I even got an Atrix HD, I had a feeling Atrix\RAZR HD would be like Bravo\Defy and I was right....Quit making clone phones Motorola. We need 5 models a year -- small, medium, large, small tablet, and big tablet with all running the same OS...That's what I would do if I were in charge.
Almost up to a 1:1 post to thank ratio. Makes me happy.
Click to expand...
Click to collapse
Atrix is for AT&T, Razr is for Verizon. That's OK, and that's great.
Cause we, as Atrix users, can use RAZR builds :good:
The display don't work with the razrhd kernel, right? somebody has a dmesg ?
epinter said:
The display don't work with the razrhd kernel, right? somebody has a dmesg ?
Click to expand...
Click to collapse
It does not. If you can teach me how to get a dmesg I'll do it right now. If you want, PM me. I really need to learn to use dmesg so it would be awesome if you could teach me while getting what you need.
Sent from my XT925 using xda app-developers app
EcHoFiiVe said:
It does not. If you can teach me how to get a dmesg I'll do it right now. If you want, PM me. I really need to learn to use dmesg so it would be awesome if you could teach me while getting what you need.
Sent from my XT925 using xda app-developers app
Click to expand...
Click to collapse
adb shell dmesg
Updated
See OP for more details
Since you seem to be one of the few into compiling from source, have you had any issues with compiling the kernel? I cannot get the kernel to build and its driving me crazy. I first noticed that it wasn't calling the right defconfig, so a "make ARCH=arm menuconfig", load the correct one and saved it as .config...you'd think that would work, but it then started complaining about missing files -- zconf.tab.c & zconf.hash.c -- noticed that both of them were in the .gitignore file for scripts/kconfig (where those 2 files should be). Have you seen that in your compiles, and if so, any fix?
For what I'm doing, I could just use the CM10.1 kernel from epinter's latest, but I'd have to set up the makefiles to reflect that...and I'd rather not do that for what is probably a minor\dumb issue on my end.
I'd post a build log, but I didn't save any from last night. I'll post one in a little while once I have it.
EDIT: Saw another issue I could be having -- gcc4.7. Forked the kernel repo and changed to the gcc4.7 branch. Gonna pick in the latest 10.1 commits and go from there. :fingers-crossed:
EDIT2: All my issues were from using gcc4.7. Switched to gcc4.6 & everything's fine.
So this is about settings up the development environment in linux distro, particularly Ubuntu 13/12/11 versions.
Lets begin -
PC Requirements -
A PC running ubuntu 13/12/11 version with minimum of 20Gb HDD space allocated for /root and 50Gb for /home partition. [if compiling JB based roms]
Swap size should be double the size of ur existing RAM memory.
A good processor [Dual core minimum. Quad core recommended]
A fast internet connection for downloading sources.
----------------------------------------------------------------------------------
Things you need -
java sdk
some software packages like bison, perl, git, python etc [mentioned below]
boot image tools [if working with kernels]
android kitchen by dsixda [for basic rom tweaking] [not mandatory, but useful when working with kernels]
Android SDK [for adb, fastboot and app building platform]
eclipse [for app building][will not be covered]
----------------------------------------------------------------------------------
1. Installing oracle java sdk / open jdk
Open jdk is simplest. Just use the applet provided in Ubuntu store and install it. If u want oracle's closed source java sdk , then type these commands. They will work for all latest ubuntu versions. just run one by one in terminal.
this will purge[remove] any old java openjdk versions
Code:
sudo apt-get purge openjdk*
just type 1 line after other in terminal..
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
this will install java 7.
----------------------------------------------------------------------------------
2. If u r compiling android roms from source, then u need these packages/software for basic building.
for 32bit and 64 bit pc's
Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
libncurses5-dev zlib1g-dev pngcrush schedtool
for 64 bit only
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
----------------------------------------------------------------------------------
3. Android SDK -
Download the SDK from android developers blog.
Then install the sdk using these commands -
Code:
$ mkdir ~/development
$ cd ~/Downloads
$ tar -zxvf android-sdk_r22.0.1-linux.tgz
$ mv ~/Downloads/android-sdk-linux ~/development/
----------------------------------------------------------------------------------
4. For building kernels -
type these -
Code:
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 git
u also need some toolchain for building kernels. Get them from here.
change directory into something like "cd android" and issue this command.
Then export the specified path of toolchain while building ur kernel.
Code:
git clone git://github.com/AndroidUnited/Android_Toolchains
----------------------------------------------------------------------------------
5. Android Kitchen and Boot image tools can be found HERE and HERE.
----------------------------------------------------------------------------------
Future references and other helpful guides -
Kernel building HERE and HERE.
Rom building HERE.
Goodluck
reserved dont know y
Awesome. :good::good::good::good:
masara59 said:
Awesome. :good::good::good::good:
Click to expand...
Click to collapse
thnx..just helping others whenever possible, although i myself am learning through the process
A_U said:
thnx..just helping others whenever possible, although i myself am learning through the process
Click to expand...
Click to collapse
Thanks very much bro, this is the latest guide i can find on the xda. Thanks for sharing your experience
vishal007 said:
Thanks very much bro, this is the latest guide i can find on the xda. Thanks for sharing your experience
Click to expand...
Click to collapse
glad to help..but u need to know some programming lang skills to fix compile errors and other issue .. i am last person u want to ask wat to learn..as i myself know basic C&DS
learning how to compile wont make u a dev..maybe some knowledge about how things work although
Little correction you need to make, the 50gb should be /home not /root
/root is the main install partition and can be about 20gb
Trust me I'm a Linux expert
Sent from my HTC Desire using xda app-developers app
AndyFox2011 said:
Little correction you need to make, the 50gb should be /home not /root
/root is the main install partition and can be about 20gb
Trust me I'm a Linux expert
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
oh dint know that..thanks for correcting me
any more errors, suggest thnx
edit - corrected cheers..
A_U said:
oh dint know that..thanks for correcting me
any more errors, suggest thnx
Click to expand...
Click to collapse
I'll let ya know, it's just so you don't confuse people when they go to install Ubuntu, it's complex enough as it is to insure
Sent from my HTC Desire using xda app-developers app
---------- Post added at 08:35 PM ---------- Previous post was at 08:34 PM ----------
Looks like I confused you 20 gb for the / partition and then 50gb for the /home partition
Then as much as can be spared for swap, swap is good
Sent from my HTC Desire using xda app-developers app
AndyFox2011 said:
I'll let ya know, it's just so you don't confuse people when they go to install Ubuntu, it's complex enough as it is to insure
Sent from my HTC Desire using xda app-developers app
---------- Post added at 08:35 PM ---------- Previous post was at 08:34 PM ----------
Looks like I confused you 20 gb for the / partition and then 50gb for the /home partition
Then as much as can be spared for swap, swap is good
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
done.. yea got confused..
but frankly i dint allocate this much while i compiled. maybe 20 to 30 should be more than enough.
A_U said:
done.. yea got confused..
but frankly i dint allocate this much while i compiled. maybe 20 to 30 should be more than enough.
Click to expand...
Click to collapse
I have 150 for /home cause I have 3 rom sources on my pc and I use ccache, which I recommend using ccache if you have space for it, it speeds up rebuilds a lot
Sent from my HTC Desire using xda app-developers app
AndyFox2011 said:
I have 150 for /home cause I have 3 rom sources on my pc and I use ccache, which I recommend using ccache if you have space for it, it speeds up rebuilds a lot
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
yea ccache makes builts a lot faster..maybe reduce 30min roughly or even more depending upon processor
A_U said:
yea ccache makes builts a lot faster..maybe reduce 30min roughly or even more depending upon processor
Click to expand...
Click to collapse
Without ccache I can do a full build (from scratch) in an hour, with ccache it's 30 minutes but I still need more ram! It's not fast enough, more ram and bigger had!
Sent from my HTC Desire using xda app-developers app
AndyFox2011 said:
Without ccache I can do a full build (from scratch) in an hour, with ccache it's 30 minutes but I still need more ram! It's not fast enough, more ram and bigger had!
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
well i dont have that much fast config..but it took slim bean to build 4 hours with ccache :/ and dint boot too on first build..had to rebuild 5 to 6 times.. but later got it working with some wifi errors etc..
A_U said:
well i dont have that much fast config..but it took slim bean to build 4 hours with ccache :/ and dint boot too on first build..had to rebuild 5 to 6 times.. but later got it working with some wifi errors etc..
Click to expand...
Click to collapse
Thats not bad... That's what my old pc took to build cmx
Sent from my HTC Desire using xda app-developers app
Hey guys, after reading your advanced replies above, can i ask some thing of low level? I installed ubuntu via wubi in a 25 GB partition. Idk about /home and /root partition will use how much space of it and also idk how much wubi use for swap from that memory. So will you please tell what actually wubi did ??
vishal007 said:
Hey guys, after reading your advanced replies above, can i ask some thing of low level? I installed ubuntu via wubi in a 25 GB partition. Idk about /home and /root partition will use how much space of it and also idk how much wubi use for swap from that memory. So will you please tell what actually wubi did ??
Click to expand...
Click to collapse
wubi slows down the whole system after gradual use..
create a separate partition and install a distro on that..google how to do that..many youtube videos are there for ur help.
A_U said:
wubi slows down the whole system after gradual use..
create a separate partition and install a distro on that..google how to do that..many youtube videos are there for ur help.
Click to expand...
Click to collapse
I created a seperate partition, already done googling and following videos on youtube for installation of linux without wubi.
The problem was, my full hard disk was shown as a partition instead of individual drives while installing distro directly. I also saw how to create seperate /root and swap memory but i was being forced to create partition of my full hard drive again, no C: D: even the new one was there. So last i used wubi. Will u tell me what actually happened ? I will try again if you say and this time i will provide screenshot
vishal007 said:
I created a seperate partition, already done googling and following videos on youtube for installation of linux without wubi.
The problem was, my full hard disk was shown as a partition instead of individual drives while installing distro directly. I also saw how to create seperate /root and swap memory but i was being forced to create partition of my full hard drive again, no C: D: even the new one was there. So last i used wubi. Will u tell me what actually happened ? I will try again if you say and this time i will provide screenshot
Click to expand...
Click to collapse
In windows don't create it as a partition, leave it as free space, then when it gets to partition options in Ubuntu install choose the something else option and do it manually
Use the free space you left to create 4 partitions,
=/ (this is the root, format it to ext4)
-/boot (make this 256mb, and again ext4)
- /home (ext4,this needs to be the biggest for all your data to be stored on)
- swap (as much as you can spare for swap, in the formatting options is has a format as swap setting)
Sent from my HTC Desire using xda app-developers app
vishal007 said:
I created a seperate partition, already done googling and following videos on youtube for installation of linux without wubi.
The problem was, my full hard disk was shown as a partition instead of individual drives while installing distro directly. I also saw how to create seperate /root and swap memory but i was being forced to create partition of my full hard drive again, no C: D: even the new one was there. So last i used wubi. Will u tell me what actually happened ? I will try again if you say and this time i will provide screenshot
Click to expand...
Click to collapse
Bootup to LiveUSB, open GParted and tell me if the partition is detected.
If GParted detect it, reformat the partition (the free space) to ext4, spare 1 GB for swap.
Then, install Ubuntu. Try it.
Hey,
first off, I'm not sure if this thread really belongs here, but I also thought its not something General and not a usual Q&A topic.
I see my self as a developer now, one really at the beginning, but I thought I can get the best help here.
So the most important step is already done, I know what I want to make. A better ElementalX (yes, hard do believe I know).
What i want to do? Add CPU OC Support (outside of the installer), GPU OC Support, GPU Voltage Control Support (for the KControl App) and more CPU and I/O Governors.
Also, if it works easy, I would try to add a short Boost of 2.8 GHz (or 2.6/2.7) like in faux123's Kernel, maybe for 2-5 Seconds, as it otherwise crashes (my nexus 5 at least).
So, are you interested? Yes? Cause so am I. I'm reading about how to make my own Kernel since a lot of time, but got back to it yesterday and today i installed Ubuntu 15.04 and updated it with anything needed.
GCC 4.9.2 was installed already, I followed this tutorials:
oh and before, i run Ubuntu 15.04 (Dual Boot) as I feel like in the totally wrong place with Linux and Ubuntu is easier for Windows people like me.
Code:
[URL="http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276"]http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276[/URL]
the above link didnt gave me links to Google Devices Source Code so I searched for myself :
[URL="https://source.android.com/source/building-kernels.html"]https://source.android.com/source/building-kernels.html[/URL]
[URL="http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/"]http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/[/URL]
So, can someone give me a quick guide on how to get the source code of LMY48B Kernel?
I already did this:
Code:
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
git clone https://android.googlesource.com/kernel/msm.git kernel
but i cant find that "Kernel" folder anywhere on my Ubuntu partition...
So what are my next steps? I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Is someone interested in working with me? would be more like me telling what I would like and him giving me the code oh well, maybe that's a bad idea :silly:
I am also open for Eclipse, as I already have that installed on Windows, sadly I'm unable to find the "Choose SDK location". Not in settings, not under help, not under any other tab. So I googled that problem and I just found out that other users seem also not able to find it. And I stopped using that thing. Maybe someone here knows how to do that, than I would start learning about how to do it in there again.
Help is very very appreciated.
https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6
xXDanielHDXx said:
I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Click to expand...
Click to collapse
All @flar2 work is already public. His N5 branch has been forked 26 times. Check his Github. As long as you give him credit if you ever release it as your own fork away.
garynych said:
https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6
Click to expand...
Click to collapse
thanks for the reply
the first page is really nice. Simple, yet anything I need is shown.
I already know the second one though. I tried to download the url with ubuntu but it said that that url doesnt include any git data.
Is there a correct url for that, or how to download it at all? That Question and maybe 1-2 more and I should have my Kernel ready