Post Reply

[DEV] Docker template for building CyanogenMod

OP michael_ch

20th July 2014, 08:50 PM   |  #51  
Member
Thanks Meter: 43
 
35 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by michael_ch

Hi!

  • You're right there was no CCACHE support. Thanks for the pointer, it's added now! Beware that your Dockerfile doesn't initiate /srv/ccache in a dedicated volume (you're only using a volume in build.sh).
  • Right now I'm still using a single folder in $HOME/android. You might create subfolders inside if you're compiling multiple ROMs, this should be no problem.
  • Building on Ubuntu 14.04 seems to work fine. I am surprised to read on the page you mentioned that OpenJDK 7 should be used. Right now my build does not compile unless I'm using OpenJDK 6.
  • Regarding DEBIAN_FRONTEND - I'm already using this since the beginning - have a look!

Thanks for your comments, especially about ccache I'm not a fan of having tons of ROMs without being able to tell a difference, so if you're ok with it, we can either merge the remaining stuff from your repository into mine, or the other way around. What do you think?

Yep, I'd definetly like to have just one build env. There is no point for multiple docker files.... I just uploaded mine to be able to talk about it.

Building with OpenJDK7: add "EXPERIMENTAL_USE_JAVA7=1" to your android-env-vars.sh and make sure that java -version says java 7... I'm still setting the ANDROID_JAVA_HOME to java6, though. It might not be tested with every ROM, but Omni should work AFAICT.

run.sh looks cool, too. I can't see an obvious reason why I'd like to keep my docker definition (well, except for "I still have to test it"). Thank you!
6th January 2015, 05:50 PM   |  #52  
OP Senior Member
Thanks Meter: 74
 
105 posts
Join Date:Joined: Oct 2009
Lightbulb New version
I have updated the Dockerfile in order to work with CyanogenMod 12.0. Successfully compiled cm-12.0 for the Moto G (falcon) just today.
Feel free to experiment with Docker, if you haven't done so yet!

Link: https://github.com/stucki/docker-cyanogenmod/

For more details, take a look at the first post in this thread.
The Following User Says Thank You to michael_ch For This Useful Post: [ View ]
31st January 2015, 08:04 AM   |  #53  
Member
Flag Toronto
Thanks Meter: 6
 
45 posts
Join Date:Joined: Nov 2014
More
EDIT; Got it working
Last edited by waleed_k; 31st January 2015 at 08:07 AM.
31st January 2015, 10:02 AM   |  #54  
OP Senior Member
Thanks Meter: 74
 
105 posts
Join Date:Joined: Oct 2009
Quote:
Originally Posted by waleed_k

EDIT; Got it working

Thought so Just call. /run.sh. It automatically reuses an existing box if found.
Last edited by michael_ch; 1st February 2015 at 02:05 AM.
1st February 2015, 01:27 AM   |  #55  
Member
Flag Toronto
Thanks Meter: 6
 
45 posts
Join Date:Joined: Nov 2014
More
If I want to run again after the initial time to update the build, do I run this code all over again
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper
Or are there less steps?

Thanks
1st February 2015, 02:10 AM   |  #56  
OP Senior Member
Thanks Meter: 74
 
105 posts
Join Date:Joined: Oct 2009
Lightbulb
Quote:
Originally Posted by waleed_k

If I want to run again after the initial time to update the build, do I run this code all over again

Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper
Or are there less steps?

Thanks

The repositories should still exist in the android/ folder, so there's no need to repeat the repo init. Just run "repo sync" (I usually add "-j 16" for 16 concurrent pulls).
Before building again, I recommend to run "make clean":

Code:
repo sync -j 16
source build/envsetup.sh
make clean
breakfast <device codename>
brunch <device codename>
Good luck!
1st February 2015, 02:45 AM   |  #57  
Member
Flag Toronto
Thanks Meter: 6
 
45 posts
Join Date:Joined: Nov 2014
More
Sweet! My first build was a success!
Thanks!

Post Reply Subscribe to Thread

Tags
build, compile, cyanogenmod, docker
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes