Skip to content

Commit 224c2e0

Browse files
authored
Merge pull request #28 from robbyoconnor/6.0-marshmallow
Various updates for the MM branch
2 parents fe5e5d7 + 99329da commit 224c2e0

File tree

5 files changed

+49
-11
lines changed

5 files changed

+49
-11
lines changed

Dockerfile

-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ COPY ssh_config /root/.ssh/config
5050
# considered to be ephemeral
5151
VOLUME ["/tmp/ccache", "/aosp"]
5252

53-
# Improve rebuild performance by enabling compiler cache
54-
ENV USE_CCACHE 1
55-
ENV CCACHE_DIR /tmp/ccache
56-
5753
# Work in the build directory, repo is expected to be init'd here
5854
WORKDIR /aosp
5955

README.md

+35-6
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ For the terribly impatient.
4646
5. In parallel you are expected to be drinking because I save you some time.
4747

4848

49-
mkdir kitkat ; cd kitkat
49+
mkdir marshmallow ; cd marshmallow
5050
export AOSP_VOL=$PWD
51-
curl -O https://raw.githubusercontent.com/kylemanna/docker-aosp/master/tests/build-kitkat.sh
52-
bash ./build-kitkat.sh
51+
curl -O https://raw.githubusercontent.com/kylemanna/docker-aosp/master/tests/build-marshmallow.sh
52+
bash ./build-marshmallow.sh
5353

5454
How it Works
5555
------------
@@ -70,12 +70,41 @@ Docker container. For example to run `repo sync` in the Docker container:
7070

7171
The `aosp` wrapper doesn't work well with setting up environments, but with
7272
some bash magic, this can be side stepped with short little scripts. See
73-
`tests/build-kitkat.sh` for an example of a complete fetch and build of AOSP.
73+
`tests/build-marshmallow.sh` for an example of a complete fetch and build of AOSP.
7474

75+
[Docker Compose][]
76+
------
77+
78+
A [Docker Compose][] file is provided in the root of this repository, you can tweak it as need be:
79+
80+
```yaml
81+
version: "2"
82+
83+
services:
84+
aosp:
85+
image: kylemanna/aosp:6.0-marshmallow
86+
volumes:
87+
- /tmp/ccache:/ccache
88+
- ~/aosp:/aosp
89+
```
90+
Example run: `docker-compose run --rm aosp repo sync -j4` -- your android build directory will be in `~/aosp`.
91+
92+
Issues
93+
------
94+
95+
There are some known issues with using Docker Toolbox on macOS and current
96+
virtualization technologies resulting in unusual user ID assignments and very
97+
poor performing virtualization file sharing implementations with things like
98+
VirtualBox. It's recommended to run this image completely in a virtual machine
99+
with enough space to fit the entire build (80GB+) as opposed to mapping the
100+
build to the local macOS file system via VirtualBox or similar.
75101

76102
Tested
77103
------
78104

79-
* Android Kitkat `android-4.4.4_r2.0.1`
105+
* Android KitKat `android-4.4.4_r2.0.1`
80106
* Android Lollipop `android-5.0.2_r1`
81-
* Android Marshmallow `android-6.0.1_r72`
107+
* Android Marshmallow `android-6.0.1_r80`
108+
* Android Nougat `android-7.0.0_r14`
109+
110+
[Docker Compose]: https://docs.docker.com/compose

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: "2"
2+
3+
services:
4+
aosp:
5+
image: kylemanna/aosp:6.0-marshmallow
6+
volumes:
7+
- ~/aosp/ccache:/tmp/ccache
8+
- ~/aosp:/aosp
9+
- ~/.gitconfig:/root/.gitconfig

tests/build-marshmallow.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
set -ex
1010

1111
if [ "$1" = "docker" ]; then
12-
TEST_BRANCH=${TEST_BRANCH:-android-6.0.1_r72}
12+
TEST_BRANCH=${TEST_BRANCH:-android-6.0.1_r80}
1313
TEST_URL=${TEST_URL:-https://android.googlesource.com/platform/manifest}
1414

1515
cpus=$(grep ^processor /proc/cpuinfo | wc -l)

utils/docker_entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ set -e
1717
if [ -z ${USER_ID+x} ]; then USER_ID=1000; fi
1818
if [ -z ${GROUP_ID+x} ]; then GROUP_ID=1000; fi
1919

20+
# ccache
21+
export CCACHE_DIR=/tmp/ccache
22+
export USE_CCACHE=1
23+
2024
msg="docker_entrypoint: Creating user UID/GID [$USER_ID/$GROUP_ID]" && echo $msg
2125
groupadd -g $GROUP_ID -r aosp && \
2226
useradd -u $USER_ID --create-home -r -g aosp aosp

0 commit comments

Comments
 (0)