yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] orbital_71:
Hi Raum, to speed up building i need to open a terminal and run this 2 command right?

To enable Ccache add

Code:

export USE_CCACHE=1

to your .bashrc file

Optional: If you like to set the path, where the Ccache will be stored on your own, you have to add another line to the .bashrc

export CCACHE_DIR=<path-to-your-cache-directory>

Now run this command once to initialize the Ccache

Code:

prebuilts/misc/linux-x86/ccache/ccache -M 15G
[LG Optimus 2x] Raum1807:
Yes, add

$ export USE_CCACHE=1

to the end of the hidden '.bashrc' file in your '/Home' directory (Ctrl+H to make it visible).

Use this command

$ gedit ~/.bashrc

to make the necessary changes. Then save it.

Presumably run

$ cd ~/cm10

to get to your working directory.

Finally use

$ prebuilts/misc/linux-x86/ccache/ccache -M 15G

from your building directory.

Btw, you can open another instance of your terminal window with Ctrl+Shift+T and use

$ watch prebuilts/misc/linux-x86/ccache/ccache -s

to see what and if the cache is doing anything while building. Use Ctrl+C whenever you want to kill the process.
[LG Optimus 2x] orbital_71:
Raum from mine understanding this are the command i need for building and speeding up

Run rebuilt command:

$ cd ~/cm10

$ repo sync

$ . build/envsetup.sh

then run this:

$ prebuilts/misc/linux-x86/ccache/ccache -M 15G
[LG Optimus 2x] Raum1807:
The ccache has to be implemented one time only.

For rebuilding just use

$ cd ~/cm10
$ repo sync
$ . build/envsetup.sh
$ brunch p990
[LG Optimus 2x] orbital_71:
Raum i am getting this warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead

i google to find answer but not much help.
[LG Optimus 2x] Raum1807:
AW: [GUIDE CM10] How to build your own CyanogenMod 10 ROM from sources for LG P990 O2

Just ignore it. It is just a warning.
[LG Optimus 2x] orbital_71:
Raum how to totally clear all mine cm10.1? Let say i wanna start a totally clean build without all this old file in mine home directory.Tks
[LG Optimus 2x] mivv:
tipe - make clean
[LG Optimus 2x] orbital_71:
Command is " tipe make clean" ?
[LG Optimus 2x] slebit:
The command is: "make clean".
[LG Optimus 2x] J.E.abhishek kumar:
i want to create new cm10 based rom for lg p690 so should i follow the same procedure
[LG Optimus 2x] hell_lock:
I have a general question.. is it necessary to remove the out directory before building rom again? or should I just make the changes in the device tree and do a brunch again?
[LG Optimus 2x] slebit:
I always do a "make clean" before I compile my roms. Sometimes it might not be necessary, but sometimes it can cause problems when you don't "make clean". And to be certain that isn't the problem if something weird is happening, I always do it. :)
[LG Optimus 2x] rugglez:
In most cases, you can get away without cleaning the out directory (make clean or make clobber), since it automatically rebuilds the modified files. But if you were receiving some error while compiling before making the changes, or you want to be safe and not take any chances and got a lot of time, "make clean" is recommended :)
[LG Optimus 2x] winstonxl2:
I did every step But it just didnt go cause my previous Ubuntu 12.04 was pretty good working but now on 13.04 i was first crashing while compiling and now i have this error. Hope someone can help me.My previous seagate harddisk it totaly not working.

The error log is below
[LG Optimus 2x] duffycop:
I want to build and port CM10-stable for Samsung Galaxy GT-S7275B

Should I follow this guide? If I follow exactly this guide, I may brick my phone?

I would like to get some answer because maybe I can start colaborating unofficialy with some builds for phones that hasn't a CM :)

Cheers!
[LG Optimus 2x] hamzahrmalik:
Rough estimate for build time anyone?

laptop i3, 2.13ghz dual core

6gb ddr3 ram

arch linux running natively (not dual boot)

thanks
[LG Optimus 2x] azharshaikh7866:
cm12

will this work for cm12 on p990?

i have installed ubuntu 14.04, openjdk7,installed android sdk , all packages that are mentioned in the op

and used repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0 to intialize & did a repo sync.

i have a 3mbps connection it is still downloading cm source
[LG Optimus 2x] gucky01:
Yes, thats a good start But you must also include some more files in a local manifest. Look at Tonys or DJs sources!.
[LG Optimus 2x] NoDze:
I assume it should. I was viewing this thread a few days ago thinking the same. You are syncing from the correct repo, just try a build and we'll see if it works :) thanks for trying :D

Edit: what gucky said :D
[LG Optimus 2x] azharshaikh7866:
after adding the local_manifest.xml i m getting the fetch error

error: Cannot fetch pengus77/lge-kernel-star

what revision should i put in local manifest?
[LG Optimus 2x] tonyp:
Just remove the kernel from the manifest, if you use my device repo (or any that uses mine as a base) you'll have a precompiled kernel, anyways.

See here:

https://github.com/tonyp/android_manifest/blob/cm-11.0-tonyp/default.xml

At the end you'll find my additions - the kernel line is commented out.
[LG Optimus 2x] azharshaikh7866:
i have used this (repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0) to initialize and edit local_manifest to this

<manifest>

<project path="device/lge/p990" name="tonyp/android_device_lge_p990" remote="github" revision="cm-11.0"/>

<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge.git" remote="github" revision="cm-12.0"/>

<project path="kernel/lge/star" name="pengus77/lge-kernel-star" remote="github" revision="jb-412"/>

</manifest>

edit:modified default manifest by looking at your manifest

now getting this

Checking build tools versions...

bionic/libc/arch-arm/arm.mk:81: *** "TARGET_CPU_VARIANT not set or set to an unknown value. Possible values are cortex-a7, cortex-a8, cortex-a9, cortex-a15, krait, scorpion, denver. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.". Stop.
[LG Optimus 2x] wulsic:
Did you already brunch the device? You can also lunch it and then make. What I can read from this is that or you didn't specified the device which you are going to compile for, or the boardconfig doesn't has that mentioned but I think that it's the first thing I said since the devs here are experienced ;)
[LG Optimus 2x] tonyp:
The reason you're failing here is that the tegra2 CPU_VARIANT has been deprecated by Google and CM.

In my sources it's realized via this patch.

The patch gets applied via a modified vendorsetup script which gets called once you execute ". build/envsetup.sh".

https://github.com/tonyp/tonyp_device_lge_p990/blob/cm-11.0/vendorsetup.sh

But for now you can just change the TARGET_CPU_VARIANT from "tegra2" to "generic". This will fix the compile error.

It won't cause any harm - my first CM11 builds used generic as well. The other flags prevent neon instructions to get compiled, and at a later stage you can bring back the possibly a little more optimized tegra2 variant back.
[LG Optimus 2x] azharshaikh7866:
i used brunch p990
[LG Optimus 2x] azharshaikh7866:
after doing TARGET_CPU_VARIANT = generic i m getting this

find: `src': No such file or directory

find: `src': No such file or directory

find: `src': No such file or directory

find: `src': No such file or directory

find: `src': No such file or directory

find: `src': No such file or directory

device/lge/p990/Android.mk:6: *** my-dir must be called before including any other makefile..

View attachment 3056651
[LG Optimus 2x] gucky01:
Yes, thats the first error I recognized, too. I am at work now and will be home very late. I will post the changes I made to get it work in the Lollipop-thread, ok?
[LG Optimus 2x] azharshaikh7866:
now i mgetting this

In file included from device/lge/p990/include/hardware/audio.h:32:0,

from frameworks/av/include/media/nbaio/AudioStreamInSource.h:20,

from frameworks/av/media/libnbaio/AudioStreamInSource.cpp:22:

system/core/include/system/audio.h:873:8: error: previous definition of 'struct audio_config'

struct audio_config {

^

make: *** [/home/azhar/cm12/out/target/product/p990/obj/SHARED_LIBRARIES/libnbaio_intermediates/AudioStreamInSource.o] Error 1

make: *** wait: No child processes. Stop.

patch fail afte . build/envsetup.sh

View attachment 3057589

after brunch p990

View attachment 3057603
[LG Optimus 2x] DJNoXD:
For the first compile, which will result in no audio, you can remove the audio.h file.

But later you have to patch the audio.h from hardware repository for our ics libs.
[LG Optimus 2x] jgcaap:
where is .bashrc file ? i find two of them not sure which one to edit.
[LG Optimus 2x] DJNoXD:
The one of your user.

You get into the user folder by typing

cd ~

or type the following to open the user bashrc into editor (replace nano by the editor you prefer)

nano ~/.bashrc
[LG Optimus 2x] Wooby:
Hey i got a question does I can build a cm9 rom from this guide with working camera and hardawre accelaration??? Im starting to build maybe tommorow for first time wish me luck :D
[LG Optimus 2x] Jordan~Kurniawan:
as i strongly want this ..

but, i can assure you .. that RC is will and are working on fixing the bugs ..

why devs spend hours and hours if RC is working on a same thing ?

i think tonyp and all other devs are making a valid and reasonable way ..

by keep developing custom ROM from CM10 as a base but not yet releasing it ..

when it come out .. it will be ... how do i put this ...

EXPLOSIVE :D
[LG Optimus 2x] ethansp:
Ok. We talking about kanging (make our own rom from sources), not about build from nightlies.
[LG Optimus 2x] cmahendra:
You mean this build cm-10-20121103-NIGHTLY-p990.zip 2012-11-03 18:15:26 ? What about screen automatically wake issue? Also tell can you use power button to wake on and switch off? It was not working on previous build.

EDIT: Are we discussing this in correct thread? We must discuss this in RC's post, right?
[LG Optimus 2x] Jordan~Kurniawan:
deleted due to double post
[LG Optimus 2x] Raum1807:
Interesting. I was wondering what this was about since I have WIFI working. Last build is ten minutes old and running like a charm.

For testing purposes I flashed the NIGHTLY-20121103 over mine and then mine again on top of it to see what happens. And yes: suddenly there is no WIFI. Logcat is inconclusive at this point. I had to flash the NIGHTLY-20121102 over this mess and booted it to see whether WIFI is working. And yes, it is. Flashed my newest build on top of it and WIFI is still there. So it seems there is a problem if you are coming from NIGHTLY-20121103. It is working when you make a fresh install or if you are coming from another (older?) version.

Could anyone confirm this please?
[LG Optimus 2x] rugglez:
I have a peculiar problem. My internet disconnects after every 2GB of download/upload (to reduce network traffic), so i have to reconnect if that happens. The problem is, though i can restart the repo sync to continue from the the last project it left off, there is one huge project towards the end, with size >2GB. I get disconnected in the middle of downloading that project every time and it freezes. When i reconnect and retry, it again starts redownloading that projects and gets stuck there. Due to this, i am unable to build any CM ROM (trying since cm7). I talked to my ISP and he says that he cannot help me with the 2GB limit. Any other way to get around this, or any other way to sync repo (where reconnection does not cause the need to restart that large project download)?
[LG Optimus 2x] petr.klos:
Telefonica CZE? This is the first time I am hearing about this issue.... router problems?
[LG Optimus 2x] rugglez:
It is not a problem, it is just a measure taken by our ISP to control network traffic :)

We have DC++, where we get speeds upto 12 MBPS from same ISP users. Sometimes, users keep hundreds of GB downloads on queue and go afk, and waste bandwidth. To avoid this, this 2GB reconnect measure has been taken.

Sadly, none of my friends have a fast internet connection and linux installed like me, so if i have to do this, it has to be from my own pc.
[LG Optimus 2x] TrymHansen:
Thanks. Was going to test this theory, so first made a freshly synced build about an hour ago, installed it on top of the exact same build restored from a backup (which indeed was an 1103-nightly), and now it works... so whatever it was it has been fixed in this build.
[LG Optimus 2x] xtream2004:
Error installing packages

I'm getting Errors when executing

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 tofrodos \

python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386

libncurses5-dev, libx11-dev, libreadline6-dev, libgl1-mesa-glx and zlib1g-dev cannot be found.

I just set up a blank Ubuntu 12.10 and followed the instructions in first post.

I know Linux most of time is just RTFM - when there's more to do than just using it for browsing and mail -

but didn't find any solution yet.

Anyone with a little hint?
[LG Optimus 2x] Raum1807:
What version of UBUNTU 12.10 did you set up? 32-bit, right? Please check the OS type in "About this Computer" with the system button in the upper right corner of your desktop. If it is the 32-bit version, please try again with the 64-bit version. Jellybean cannot be compiled with a 32-bit OS.
[LG Optimus 2x] xtream2004:
No, 64bit ubuntu 12.10...
[LG Optimus 2x] Raum1807:
Oh, okay. Open a terminal window and paste this in

dpkg --print-architecture && dpkg --print-foreign-architectures

What does it say?
[LG Optimus 2x] xtream2004:
It just says "amd64" once...
[LG Optimus 2x] Raum1807:
I don't know what happened but something went wrong on your side while installing UBUNTU 12.10 64-bit and you lost the possibility to install the i386 packages.

Run

dpkg --add-architecture i386

and then

apt-get update

Now try to reinstall the missing packages...
[LG Optimus 2x] xtream2004:
That's it! Thank you! Maybe you want to add this to your first post... just installed ubuntu12.10 via wubi because i didn't want to repartition my ssd, could imagine others may run into these troubles, too...
[LG Optimus 2x] winstonxl2:
i COmpiled my rom without any errors and did every step

The JB System works but wifi just dont wan't to turn on somebody know how to fix
[LG Optimus 2x] Raum1807:
Glad I could help you.

Regarding your idea of adding it to the initial post: it's more of a Linux/Ubuntu problem than an obstacle in the building process. If someone else runs into the same problem as well and speaks up here then I will reconsider to add it since it is just complicating the tutorial even more. To be honest, at the moment I consider this to be an individual case. But time will tell.

Have an nice day!
[LG Optimus 2x] Raum1807:
Other users had the same problem as well. You flashed it over a nightly, right? Was it 20121103? Seems to be the culprit right now. You can solve it by flashing the nightly from 20121102, check if WIFI is there again and then flash your 'own' ROM over it.

Hope this is helping you too.
[LG Optimus 2x] winstonxl2:
Yes i tested 03 and just flashed it over i wil report if my problem is fixed

My problem is still not fixed tryed nightly 03 30 it just dont work

My tip wifi doesnt work maybe other things too so just only repo sync

And just edit cm10 nightly my best solution
[LG Optimus 2x] icyeye:
hi! i am totaly new on linux / ubuntu so

i got this at 1st step : chmod: cannot access `jdk-6u37-linux-x64.bin': No such file or directory

i am on 12.10 x64 amd... and installed ubuntu through wubi installer
[LG Optimus 2x] owain94:
Cd to the directory where the jdk.bin is located I think you downloaded it to the default download folder so do this first

cd ~/Downloads

And after this try the chmod again
[LG Optimus 2x] winstonxl2:
Go to terminal and do after cd the directory where that bin is located

Or maybe try to do properties and make executable

Cd /home/Downloads/

chmod +x jdk-6u37-linux-x64.bin

Hope it could help cause i need to sleep foor school now
[LG Optimus 2x] icyeye:
ah yes..now its working :) ty

---------- Post added at 11:38 PM ---------- Previous post was at 11:37 PM ----------

its working, ty

EDIT : when doing step 4 i got

[sudo] password for tzarr:

do i write mine pass which Ubuntu needed when loging( it doesnt allow me to type ..nothing ) in or..its totaly diferent thing?

EDIT 2 : mv: cannot move `jdk1.6.0_37' to `/usr/lib/jvm/./jdk-6u37-linux-x64.bin': No such file or directory

on step 4 got this mesage...
[LG Optimus 2x] winstonxl2:
You must just enter your login password

You must just type your password after that sudo thing

It wil not show letters

It allows you to type but you dont see what you type

---------- Post added at 11:57 PM ---------- Previous post was at 11:46 PM ----------

Icyeye if you got more problems just google it cause thats the fastest way

I need to sleep now got tomorrow school
[LG Optimus 2x] icyeye:
[/QUOTE]Icyeye if you got more problems just google it cause thats the fastest way

I need to sleep now got tomorrow school

np m8. thank u any way :)

nn!
[LG Optimus 2x] p.valenta:
OpenJDK & local_manifest.xml

Hi All,

I have two notes on tutorial:

1) Sun JDK

I always used Sun JDK to compile CM, but I forgot to install it on my fresh installed Xubuntu 12.10. There is already present OpenJDK by default in Ubuntu and CM will build fine with it as well. There is only one warning message about different Java version, but build works fine.

I found over internet few CM10 build guides (for other devices) which have missing Sun JDK step too.

2) local_manifest.xml

You don't need to manually modify this file. First time calling brunch p990 will automatically write all entries there for you and download all sources before build begin.

Anyway, nice work Raum1807. ;)
[LG Optimus 2x] Raum1807:
I beg to differ:

1. The java toolchain Ubuntu, Xubuntu in your case, ships with the release of 12.10 is OpenJDK 7. And building with Java Version 7 is not recommended by all involved parties: Google AOSP advises us to use SunJDK 6 and so does CyanogenMod. However you can try to build it with OpenJDK 6. I was curios myself in the past and built CM9 with OpenJDK successfully. But from time to time there were problems. The building process is complex enough as it is. I don't think we have to add odd potential problems by using a different java version than the experts at Google and CyanogenMod.

2. Yes, you do need to modify local_manifest.xml. You are right that it will be created by using 'breakfast p990' or as you said 'brunch p990' the first time. This is correct. But you need to add a line for including the source of the proprietary files to the manifest anyway. So why not creating it in first place and copying a few more lines to the file instead of one?

Thank you for your feedback.;)
[LG Optimus 2x] tomsi91:
sudo mv jdk1.6.0_37 /usr/lib/jvm/./jdk-6u37-linux-x64.bin

this does not work and not make sense for me. i think there only should be

sudo mv jdk1.6.0_37 /usr/lib/jvm/
[LG Optimus 2x] fuxmen:
Can someone please help me to setup oracle virtualbox to instal 64bit system if I try to install 64bit ubuntu at start there is an error that my computer don't support 64bit software...
[LG Optimus 2x] tomsi91:
probably you dont have x64 virtualization support in your CPU. i met this problem on friends computer. some core 2 duo and other older cpus dont have it. i dont know how about amd.
[LG Optimus 2x] TrymHansen:
Well, you of course need a 64-bit processor in your system. Secondly you need to turn on virtualization in the BIOS. These come under various names, look for VTx, EMT etc.

Some Intel-procs don't support virtualization unfortunately, YMMV.
[LG Optimus 2x] fuxmen:
Thanks I menage to deal with it. Turn on virtualization in BIOS i Have hp laptop with core i5vPro. Then chose Ubuntu 64bit in Virtualbox, now system ready when i back from work start to trying to build my firt build ever :D
[LG Optimus 2x] TrymHansen:
Excellent. Don't forget to adjust the memory and number of processors you allocate to the building machine. Give it as much RAM as possible (~50-80% of your total, depending on how much you have), and give it as many processors as the physical core count. (Under System/Motherboard and System/Processor.) If you're going to use the computer at the same time, set an execution cap at ~90%, if not give it the full 100.

Good luck with your first build. (You should probably play "What a feeling" from Flashdance when you install it ;))
[LG Optimus 2x] fuxmen:
I will propably do :) I have android phones for 1,5 year, now I will transformate this maybe in my hobby and second I need to learn linux for my work (server farm and SAP )
[LG Optimus 2x] rugglez:
Finally i synced the repo. It seems that provision has been added to resume sync from the byte where it left off from rather that starting from the start of the project again(saw that message saying it resumed from where it left off).

Now i am getting this error while building.

/bin/bash: /home/*/cm10/out/host/linux-x86/bin/llvm-rs-cc: cannot execute binary file
RenderScript: LiveWallpapers <= packages/wallpapers/Basic/src/com/android/wallpaper/galaxy/galaxy.rs packages/wallpapers/Basic/src/com/android/wallpaper/fall/fall.rs packages/wallpapers/Basic/src/com/android/wallpaper/grass/grass.rs packages/wallpapers/Basic/src/com/android/wallpaper/nexus/nexus.rs
make: *** [/home/*/cm10/out/target/common/obj/APPS/Galaxy4_intermediates/src/RenderScript.stamp] Error 126
make: *** Waiting for unfinished jobs....
/bin/bash: /home/*/cm10/out/host/linux-x86/bin/llvm-rs-cc: cannot execute binary file
make: *** [/home/*/cm10/out/target/common/obj/APPS/HoloSpiralWallpaper_intermediates/src/RenderScript.stamp] Error 126
/bin/bash: /home/*/cm10/out/host/linux-x86/bin/llvm-rs-cc: cannot execute binary file
make: *** [/home/*/cm10/out/target/common/obj/APPS/LiveWallpapers_intermediates/src/RenderScript.stamp] Error 126

I gave execute permissions to that file but it is still giving error. I am running Ubuntu 12.04 64-bit. Help would be appreciated. Thanks.
[LG Optimus 2x] Ferrum Master:
Wrong Thread
[LG Optimus 2x] Raum1807:
What you have is a permission problem. You have installed everything from the guide in the first post as root user (sudo su), haven't you?
[LG Optimus 2x] rugglez:
Fixed the error by clearing the 'out' folder :)
[LG Optimus 2x] winstonxl2:
Someone fixed the WiFi problem
[LG Optimus 2x] p.valenta:
You are welcome.

1. Yes, you are right. I always used Sun JDK as it is recommended. Only lately I found that OpenJDK works too.

2. I'm sure I didn't add proprietary files to the manifest. Anyway, this is just detail. ;)

Speed improvement tip - CCACHE

Maybe you can add optional configuration steps to increase build speed by using CCACHE:

1) Install it by using

sudo apt get ccache

2) In your home directory show hidden files by CTRL+H and append to your .bashrs file these lines:

export USE_CCACHE=1
export CCACHE_DIR=<path-to-your-cache-directory>
ccache -M 10G

You can set ccache to more than 10GB. You will see ccache info next time opening terminal. This will increase build speed a lot as most changes in nighties are made in java frameworks only.
[LG Optimus 2x] Benee:
Android ships with a ccache binary. Located in prebuilts/misc/linux-x86/ccache/. No need to install it ;)

Yeah it will speed up building a lot. BUT ccache is for C/C++. Not for java! So no speed ups in java frameworks. But still. The biggest chunk in compiling are those C files. So after a make clobber everything will be way faster.
[LG Optimus 2x] fuxmen:
I interupted sync with lost connection then forced close terminal, now when i type repo sync in ~/cm10 dir it says:

no command repo found... I can only execute it in ~/bin dir with ./repo but i dont waht sources there

I tryied ctr+c when it hangs but no luck.. im know a little bit about linux but don't know how to make this repo app visible in whole system
[LG Optimus 2x] TrymHansen:
do this

PATH=~/bin:$PATH

again.
[LG Optimus 2x] fuxmen:
Ok works, This changing standard path of $ to my ~/bin dir? and system can see repo everywere because of that?