Help needed to build ICS - LG Optimus Black

Hi!
Im trying to build ICS rom but i got this error and cant complete the compile.
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
someone can help me?
thanks
__________________
DJ

Sent from my LG-P970 using XDA App

amit007us said:
Sent from my LG-P970 using XDA App
Click to expand...
Click to collapse
what is this?

what instruction are you using?

Have you check the path?
It said "cannot find"
Is the path exist?
Sent from derp-mobile

Maybe this command is wrong? -lz or like agent said, the path might be incorrect...

You need zlib.

Oh yeah, google tells the same Here is the solution:
Code:
sudo apt-get install zlib1g-dev
Hope you can make it soon
Here another solution: http://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz

Goodluck porting it bro

Thank you guyz i will try all of your ideas... anyway i installed zlib but doesnt work. Maybe i need uninstall and install it again. The prob is ive never used ubuntu before but im gonna try hope i can do it. I will post here the results!
Sent from my LG-P970 using XDA App

donjamal said:
Thank you guyz i will try all of your ideas... anyway i installed zlib but doesnt work. Maybe i need uninstall and install it again. The prob is ive never used ubuntu before but im gonna try hope i can do it. I will post here the results!
Sent from my LG-P970 using XDA App
Click to expand...
Click to collapse
Goodluck !

host StaticLib: libpng (out/host/linux-x86/obj/STATIC_LIBRARIES/libpng_intermediates/libpng.a)
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt]
still got it
i installed everything

You need zlib, yes, but development package of zlib. Your problem is that the linker (ld) cannot find z library to compile the source.
Sent from my LG-P970 using XDA App

First, you didn't mention what version of your Ubuntu, 32/64bit? But AFAIK 32bit won't work, so it can only built with 64bit Ubuntu based. Many tutorial how to prepare build environment, so what to do first is to make sure that all component/library are prepared...
http://forum.xda-developers.com/showthread.php?t=1354865
http://mjanja.co.ke/2011/11/building-android-4-0-on-ubuntu-11-10/
http://forums.androidcentral.com/hacking/144804-how-compile-ics-aosp-4-0-3-xoom-gnex-nexus-s.html
Last words, GOOD LUCK mate..

setting up a building machine
To set up the building machine I've used this script by Treken this might help link

hmmmm. great news
wish all the best

Thaks guyz, but non of the methods worked, so reinstall the whole ubuntu and im gonna make it again
one question.. ubuntu 11 or 10 64bit?

runtime_Err0r said:
You need zlib, yes, but development package of zlib. Your problem is that the linker (ld) cannot find z library to compile the source.
Sent from my LG-P970 using XDA App
Click to expand...
Click to collapse
If it gets to the linker, then the headers are already there - the development package is most likely installed.
What you need is the 32 bit zlib if you're on 64 bit.

Did you also try this here:
Code:
sudo apt-get install lib32z1-dev
???

Use the script to set up the building enviroment I posted, it works on ubuntu10.04 and 11.10 and also for 64 and 32 bits OSes

Related

Cyanogenmod 7 (Think Tank, in progress)

Hello All,
So I´m all sorts of new at developing for android, and I wanted to open up my thoughts and efforts to the community. I am trying to port CM 7, (eventually 9), and am using the CM Compiler that was developed by LithidCM. I´ve gotten everything up and running, now I just need to figure out how to set up the proper files from the Holiday itself. As I said, this is a work in progress, and any suggestions are very helpful. Right now, the stumbling block is setting up a Holiday/Raider/Vivid repo with the necessary compilation files.
Lets get cooking!
CMCompiler (All credit goes to Lithid CM) http://forum.xda-developers.com/showthread.php?t=1415661
+1 i would love to see cm7 or 9 on my vivid
That CMCompiler wont work for the Vivid
Sent from my SGH-T989 using Tapatalk
Not until there is either a CM repo for the Vivid or I can set up the correct files locally, then I can modify the script for it to look there, rather than the CM repo. Iḿ looking for ways to make it WORK, so anything to that end is appreciated. Either that or work on another method if it looks more promising. I have time, a machine, a device, some knowledge, and the desire, I just want to get together with some other people who can contribute a bit on the knowledge end to HELP get this up and running.
XAviierG said:
That CMCompiler wont work for the Vivid
Sent from my SGH-T989 using Tapatalk
Click to expand...
Click to collapse
That was very insightful.... I'm sure the OP is very thankful for all your help.
I'm already taking care of this
If you're into it, you can download my repo for CM9 here: https://github.com/thecubed/android_device_htc_holiday
I make no promises on timeline, but I do expect to have a teaser video with a few things working at least here in a day or so.
thecubed said:
I'm already taking care of this
If you're into it, you can download my repo for CM9 here: https://github.com/thecubed/android_device_htc_holiday
I make no promises on timeline, but I do expect to have a teaser video with a few things working at least here in a day or so.
Click to expand...
Click to collapse
if you guys want i got a port booting with signal for the amaze almost same device
I too would love to see both CM7 and 9 on the Vivid, however from what i gather CMCompiler is not really going to be the way at it.
I follow alot of Team Haxsung and CM people and they all believe it to be not the best way to help the CM community, rather a way to re brand and take credit.
Further, CMCompiler requires there being a branch, which means that nightlies will be compiled quickly by build bots, if build bots are down or you want to make a nightly KANG you can install the dependencies via the CM wiki and build yourself, which might actually allow you to learn how to build and modify the source rather then having an application spit it out for you
Drew
thecubed said:
I'm already taking care of this
If you're into it, you can download my repo for CM9 here: https://github.com/thecubed/android_device_htc_holiday
I make no promises on timeline, but I do expect to have a teaser video with a few things working at least here in a day or so.
Click to expand...
Click to collapse
AH! I have been using your repo as my source on CMC, but it fails each time because I´m missing some files. which files, well, that´s the step I´m at now. Im stoked your working on this. I´d like to learn how to do this on my own as well, then I´d be happy to put together a step by step from scratch for building from a fresh install of Ubuntu, I think it´s needed.
drewdatrip said:
I too would love to see both CM7 and 9 on the Vivid, however from what i gather CMCompiler is not really going to be the way at it.
I follow alot of Team Haxsung and CM people and they all believe it to be not the best way to help the CM community, rather a way to re brand and take credit.
Further, CMCompiler requires there being a branch, which means that nightlies will be compiled quickly by build bots, if build bots are down or you want to make a nightly KANG you can install the dependencies via the CM wiki and build yourself, which might actually allow you to learn how to build and modify the source rather then having an application spit it out for you
Drew
Click to expand...
Click to collapse
And if you´ve read anything I have written (and what others have added) you would see that the purpose of this post is LEARNING. I´m not a linux guy, but I´m quickly figuring it out, not much help to individuals such as yourself who choose to distract and detract rather than assist and contribute, or at least keep your finger off the ¨submit¨ button.
I posted this thread because there is no working version of CM7 for this device. Lets drop the negativity/whatever and put our efforts and keystrokes to getting this booting.
Some of the amaze builds i have you should just have to have someone make a kernel and they will work
http://dl.dropbox.com/u/40288576/full_ruby-ota-eng.xboarder56_12-24-11.zip (ics 4.0.3 amaze should be easy to port to vivid almost same phone)
http://dl.dropbox.com/u/46431819/Amaze/update-cm-7.1.0-SelfKANG1-Amaze-4g.zip
MCreane said:
And if you´ve read anything I have written (and what others have added) you would see that the purpose of this post is LEARNING. I´m not a linux guy, but I´m quickly figuring it out, not much help to individuals such as yourself who choose to distract and detract rather than assist and contribute, or at least keep your finger off the ¨submit¨ button.
I posted this thread because there is no working version of CM7 for this device. Lets drop the negativity/whatever and put our efforts and keystrokes to getting this booting.
Click to expand...
Click to collapse
Ok we're just letting you know that the CMCompiler will not help. But try this.
http://forum.xda-developers.com/showthread.php?t=667298
My comment had no attitude as you speak of, like XAviierG i was just letting you know that if your intention is LEARNING the CMcompiler does not help with the process. Its an application that runs in a terminal window and you press numbers on screen to pull from the repos, again thats not learning and it wont help get the Vivid working any sooner.
I appropriate your eagerness to learn Linux, i am still learning alot aswell, and i too was excited when i read about the CMcompling application, however after reading about it and the stance of the dev teams i realized that its not the best for me and people looking to learn
Drew
thecubed said:
I'm already taking care of this
If you're into it, you can download my repo for CM9 here: https://github.com/thecubed/android_device_htc_holiday
I make no promises on timeline, but I do expect to have a teaser video with a few things working at least here in a day or so.
Click to expand...
Click to collapse
This just made my day
Sent from my HTC PH39100 using Tapatalk
CMC got me motivated to figure out how to get this working. Yes it´s a shortcut, no it doesn´t help anyone who can´t flash through rommanager already, and thus not us, right now. However, what gets people learning is a good thing, as far as I am concerned. I know far more about Linux now than I ever would have if it had worked beautifully from the start, including building everything through other means that it looks to do through invisible scripting.
As I said, I´m done talking about this.
Back on topic.
I am working on building a fresh CM7 Kernel through
Code:
[email protected]:~/android/kernel/cm-kernel$ adb pull /proc/config.gz /home/michaelcreane/android/kernel/cm-kernel/config.gz
cat config.gz | gunzip > .config
All goes well
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
No problems.
But then
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
and I run into this:
Code:
[email protected]:~/android/kernel/cm-kernel$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option ‘-mlittle-endian’
cc1: error: unrecognized command line option ‘-mapcs’
cc1: error: unrecognized command line option ‘-mno-sched-prolog’
cc1: error: unrecognized command line option ‘-mno-thumb-interwork’
scripts/mod/empty.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch
scripts/mod/empty.c:1:0: error: bad value (armv5t) for -march= switch
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
I just accepted all defaults in the RCU implementation, and I´m guessing that´s where the errors are starting. I got the same error when I ran
Code:
scripts/extract-ikconfig boot.img > .config
rather than extracting the .gz file from my device. Any ideas?
@MCreane and the cubed
I'm glad you guys are working on this. Very exited to see what you guys come up with. I also think it would be great to have a guide.
Sent from my HTC PH39100 using XDA App
I was able to build the Holiday kernel successfully after pulling config.gz and doing this:
Code:
make oldconfig
export CROSS_COMPILE=<path to android source>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make ARCH=arm -j2
michealw31 said:
I was able to build the Holiday kernel successfully after pulling config.gz and doing this:
Code:
make oldconfig
export CROSS_COMPILE=<path to android source>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make ARCH=arm -j2
Click to expand...
Click to collapse
Awesome, ill give that a shot after work. Much appreciated
Sent from my HTC Raider X710e using xda premium
Tease: we have a successful booting CM9 from source
Current problem: the kernel we're using (stock from source) is missing the proper USB stack for ICS, as well as GSL changes, so we either have to fork toastcfh's kernel, or fix tiamat's kernel which currently doesn't boot.
However, we were able to get it to boot with a stock kernel built from source. Gfx are skewed, but touchscreen worked, and the colors were right-- so we're on to something at least.
Anyway, I'll be pushing what I have to my github as "holidayics" instead of "holiday" until it's ready for primetime. (@ http://github.com/thecubed )
thecubed said:
Tease: we have a successful booting CM9 from source
Current problem: the kernel we're using (stock from source) is missing the proper USB stack for ICS, as well as GSL changes, so we either have to fork toastcfh's kernel, or fix tiamat's kernel which currently doesn't boot.
However, we were able to get it to boot with a stock kernel built from source. Gfx are skewed, but touchscreen worked, and the colors were right-- so we're on to something at least.
Anyway, I'll be pushing what I have to my github as "holidayics" instead of "holiday" until it's ready for primetime. (@ http://github.com/thecubed )
Click to expand...
Click to collapse
Good to hear about your progress. I'm willing to help test if you need any help in that department.
Sent from my Transformer TF101 using Tapatalk

Development! Project JellyBeanSwift - Open Source Project!

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.

[GUIDE] Setting up development environment in a Linux Distro [ubuntu 13/12/11]

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.

Compiling cm11

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!

[Q] Kernel compiling

Hello everyone, I'm a noob that want try to learn something more about Android.
I'm trying to compile the Optimus-prime kernel of Demetris, but I'm stuck on an error during compile session.
My steps:
1) git init -u git://github.com/Ntemis/lge-kernel-p880
2) downloaded NDK from google http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86.tar.bz2
(I'm using Slackware 14.1 32 bit)
3) I've used as baseconfig this one : cyanogenmod_x3_defconfig
4) then as toolchain :
Code:
export CROSS_COMPILE=~/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
5)finally I did
Code:
make -j2 ARCH=arm SUBARCH=arm
Now the error:
Code:
CC arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.o
arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.c:58:27: fatal error: board-lge-nfc.h: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.o] Errore 1
make[1]: *** [arch/arm/mach-tegra/lge/x3] Errore 2
make: *** [arch/arm/mach-tegra] Errore 2
The include file board-lge-nfc.h is present in the same folder of board-x3-i2c-dev.c
Where is the error?
are you sure the cross compile path points to the correct directory?
try using doomlord toolchain, kernel compiling is quite tricky and most toolchains give errors
Poi se vuoi se ne parla in pvt
Rudjgaard said:
are you sure the cross compile path points to the correct directory?
try using doomlord toolchain, kernel compiling is quite tricky and most toolchains give errors
Poi se vuoi se ne parla in pvt
Click to expand...
Click to collapse
Hi,
I have only the official NDK on my machine. Anyway I'll try also that doomlord toolchain
Thx for the hint. :good:
I've tried DoomLord's toolchain,but I have the same problem.
So I've tried to download Iodak's sources and I'm been able to compile it without any problem.
Is there a problem with Optimus Prime sources?Is there some special trick?
Well, I've found a solution....
It looks like there is some problem with include path.I've moved the "board-lge-nfc.h" file inside the include folder in the main root of the kernel sources and it worked.
Now I'm stuck with tspdrv. Same story: missing files when they are there instead. I did the same trick with another include file and it worked again, but now I have other missing files.
I'm sure there is something wrong in my setup/sources ...
bilbo75 said:
Well, I've found a solution....
It looks like there is some problem with include path.I've moved the "board-lge-nfc.h" file inside the include folder in the main root of the kernel sources and it worked.
Now I'm stuck with tspdrv. Same story: missing files when they are there instead. I did the same trick with another include file and it worked again, but now I have other missing files.
I'm sure there is something wrong in my setup/sources ...
Click to expand...
Click to collapse
Simply just cherry-pick this commit and you'll be fine
https://github.com/laufersteppenwolf/lge-kernel-p880/commit/c2e57252398ded9520beb9382f538da53f9a0199
I think this will help you
https://github.com/iodak/LG_X3_P880_v20a/commit/6f2086454d537c6f49038f36d6eeddbe4adcd70a
Also look at other commits on this page when you get into problems.
https://github.com/iodak/LG_X3_P880_v20a/commits/master?page=9
Sent from my LG-P880 using xda app-developers app
Wow! Thanks you very much for your help guys! :highfive:
Now I have to study cherry-picking
bilbo75 said:
Wow! Thanks you very much for your help guys! :highfive:
Now I have to study cherry-picking
Click to expand...
Click to collapse
One of the best ( if not the best) git(hub) tuts on xda: http://forum.xda-developers.com/showthread.php?t=1877040
everything's covered, and even git noobs ( such as I am ) can easily understand it
You have to:
git fetch https://iodak/LG_X3_P880_20a
Then wait for a while
Then git cherry-pick 6f2086454d537c6f49038f36d6eeddbe4adcd70a
Commit that you want.
Sent from my LG-P880 using xda app-developers app
I'm amazed from your kindness guys!
A big thanks again! :victory:

Categories

Resources