Skip to content

Commit 92b0003

Browse files
committed
nougat: First pass at building 7.0
* Doesn't work, hangs-up with a java error. * Work in progress.
1 parent fe5e5d7 commit 92b0003

File tree

2 files changed

+59
-19
lines changed

2 files changed

+59
-19
lines changed

Dockerfile

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Minimum Docker image to build Android AOSP
33
#
4-
FROM ubuntu:14.04
4+
FROM ubuntu:16.04
55

66
MAINTAINER Kyle Manna <kyle@kylemanna.com>
77

@@ -14,9 +14,9 @@ RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
1414
RUN apt-get update && \
1515
apt-get install -y bc bison bsdmainutils build-essential curl \
1616
flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \
17-
lib32readline-gplv2-dev lib32z1-dev libesd0-dev libncurses5-dev \
18-
libsdl1.2-dev libwxgtk2.8-dev libxml2-utils lzop \
19-
openjdk-7-jdk \
17+
lib32z1-dev libesd0-dev libncurses5-dev \
18+
libsdl1.2-dev libwxgtk3.0-dev libxml2-utils lzop sudo \
19+
openjdk-8-jdk \
2020
pngcrush schedtool xsltproc zip zlib1g-dev && \
2121
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2222

@@ -26,21 +26,6 @@ RUN chmod 755 /usr/local/bin/*
2626
# Install latest version of JDK
2727
# See http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
2828
WORKDIR /tmp
29-
RUN curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb && \
30-
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb && \
31-
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb && \
32-
sum=`shasum ./openjdk-8-jre-headless_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
33-
[ $sum == "e10d79f7fd1b3d011d9a4910bc3e96c3090f3306" ] || \
34-
( echo "Hash mismatch. Problem downloading openjdk-8-jre-headless" ; exit 1; ) && \
35-
sum=`shasum ./openjdk-8-jre_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
36-
[ $sum == "1e083bb952fc97ab33cd46f68e82688d2b8acc34" ] || \
37-
( echo "Hash mismatch. Problem downloading openjdk-8-jre" ; exit 1; ) && \
38-
sum=`shasum ./openjdk-8-jdk_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
39-
[ $sum == "772e904961a2a5c7d2d129bdbcfd5c16a0fab4bf" ] || \
40-
( echo "Hash mismatch. Problem downloading openjdk-8-jdk" ; exit 1; ) && \
41-
dpkg -i *.deb && \
42-
apt-get -f install && \
43-
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4429

4530
# All builds will be done by user aosp
4631
COPY gitconfig /root/.gitconfig

tests/build-nougat.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
#
3+
# Test script file that maps itself into a docker container and runs
4+
#
5+
# Example invocation:
6+
#
7+
# $ AOSP_VOL=$PWD/build ./build-nougat.sh
8+
#
9+
set -ex
10+
11+
if [ "$1" = "docker" ]; then
12+
TEST_BRANCH=${TEST_BRANCH:-android-7.0.0_r14}
13+
TEST_URL=${TEST_URL:-https://android.googlesource.com/platform/manifest}
14+
15+
cpus=$(grep ^processor /proc/cpuinfo | wc -l)
16+
17+
repo init --depth 1 -u "$TEST_URL" -b "$TEST_BRANCH"
18+
19+
# Use default sync '-j' value embedded in manifest file to be polite
20+
repo sync
21+
22+
prebuilts/misc/linux-x86/ccache/ccache -M 10G
23+
24+
source build/envsetup.sh
25+
lunch aosp_arm-eng
26+
make -j $cpus
27+
else
28+
aosp_url="https://raw.githubusercontent.com/kylemanna/docker-aosp/master/utils/aosp"
29+
args="bash run.sh docker"
30+
export AOSP_EXTRA_ARGS="-v $(cd $(dirname $0) && pwd -P)/$(basename $0):/usr/local/bin/run.sh:ro"
31+
export AOSP_IMAGE="kylemanna/aosp:7.0-nougat"
32+
33+
#
34+
# Try to invoke the aosp wrapper with the following priority:
35+
#
36+
# 1. If AOSP_BIN is set, use that
37+
# 2. If aosp is found in the shell $PATH
38+
# 3. Grab it from the web
39+
#
40+
if [ -n "$AOSP_BIN" ]; then
41+
$AOSP_BIN $args
42+
elif [ -x "../utils/aosp" ]; then
43+
../utils/aosp $args
44+
elif [ -n "$(type -P aosp)" ]; then
45+
aosp $args
46+
else
47+
if [ -n "$(type -P curl)" ]; then
48+
bash <(curl -s $aosp_url) $args
49+
elif [ -n "$(type -P wget)" ]; then
50+
bash <(wget -q $aosp_url -O -) $args
51+
else
52+
echo "Unable to run the aosp binary"
53+
fi
54+
fi
55+
fi

0 commit comments

Comments
 (0)