mirror of
https://github.com/kylemanna/docker-aosp
synced 2025-06-07 16:06:17 +00:00
nougat: First pass at building 7.0
* Doesn't work, hangs-up with a java error. * Work in progress.
This commit is contained in:
parent
fe5e5d753f
commit
92b000310e
23
Dockerfile
23
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Minimum Docker image to build Android AOSP
|
# Minimum Docker image to build Android AOSP
|
||||||
#
|
#
|
||||||
FROM ubuntu:14.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
|
|||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y bc bison bsdmainutils build-essential curl \
|
apt-get install -y bc bison bsdmainutils build-essential curl \
|
||||||
flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \
|
flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \
|
||||||
lib32readline-gplv2-dev lib32z1-dev libesd0-dev libncurses5-dev \
|
lib32z1-dev libesd0-dev libncurses5-dev \
|
||||||
libsdl1.2-dev libwxgtk2.8-dev libxml2-utils lzop \
|
libsdl1.2-dev libwxgtk3.0-dev libxml2-utils lzop sudo \
|
||||||
openjdk-7-jdk \
|
openjdk-8-jdk \
|
||||||
pngcrush schedtool xsltproc zip zlib1g-dev && \
|
pngcrush schedtool xsltproc zip zlib1g-dev && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
@ -26,21 +26,6 @@ RUN chmod 755 /usr/local/bin/*
|
|||||||
# Install latest version of JDK
|
# Install latest version of JDK
|
||||||
# See http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
|
# See http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb && \
|
|
||||||
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb && \
|
|
||||||
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb && \
|
|
||||||
sum=`shasum ./openjdk-8-jre-headless_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
|
||||||
[ $sum == "e10d79f7fd1b3d011d9a4910bc3e96c3090f3306" ] || \
|
|
||||||
( echo "Hash mismatch. Problem downloading openjdk-8-jre-headless" ; exit 1; ) && \
|
|
||||||
sum=`shasum ./openjdk-8-jre_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
|
||||||
[ $sum == "1e083bb952fc97ab33cd46f68e82688d2b8acc34" ] || \
|
|
||||||
( echo "Hash mismatch. Problem downloading openjdk-8-jre" ; exit 1; ) && \
|
|
||||||
sum=`shasum ./openjdk-8-jdk_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
|
||||||
[ $sum == "772e904961a2a5c7d2d129bdbcfd5c16a0fab4bf" ] || \
|
|
||||||
( echo "Hash mismatch. Problem downloading openjdk-8-jdk" ; exit 1; ) && \
|
|
||||||
dpkg -i *.deb && \
|
|
||||||
apt-get -f install && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
# All builds will be done by user aosp
|
# All builds will be done by user aosp
|
||||||
COPY gitconfig /root/.gitconfig
|
COPY gitconfig /root/.gitconfig
|
||||||
|
55
tests/build-nougat.sh
Executable file
55
tests/build-nougat.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Test script file that maps itself into a docker container and runs
|
||||||
|
#
|
||||||
|
# Example invocation:
|
||||||
|
#
|
||||||
|
# $ AOSP_VOL=$PWD/build ./build-nougat.sh
|
||||||
|
#
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ "$1" = "docker" ]; then
|
||||||
|
TEST_BRANCH=${TEST_BRANCH:-android-7.0.0_r14}
|
||||||
|
TEST_URL=${TEST_URL:-https://android.googlesource.com/platform/manifest}
|
||||||
|
|
||||||
|
cpus=$(grep ^processor /proc/cpuinfo | wc -l)
|
||||||
|
|
||||||
|
repo init --depth 1 -u "$TEST_URL" -b "$TEST_BRANCH"
|
||||||
|
|
||||||
|
# Use default sync '-j' value embedded in manifest file to be polite
|
||||||
|
repo sync
|
||||||
|
|
||||||
|
prebuilts/misc/linux-x86/ccache/ccache -M 10G
|
||||||
|
|
||||||
|
source build/envsetup.sh
|
||||||
|
lunch aosp_arm-eng
|
||||||
|
make -j $cpus
|
||||||
|
else
|
||||||
|
aosp_url="https://raw.githubusercontent.com/kylemanna/docker-aosp/master/utils/aosp"
|
||||||
|
args="bash run.sh docker"
|
||||||
|
export AOSP_EXTRA_ARGS="-v $(cd $(dirname $0) && pwd -P)/$(basename $0):/usr/local/bin/run.sh:ro"
|
||||||
|
export AOSP_IMAGE="kylemanna/aosp:7.0-nougat"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Try to invoke the aosp wrapper with the following priority:
|
||||||
|
#
|
||||||
|
# 1. If AOSP_BIN is set, use that
|
||||||
|
# 2. If aosp is found in the shell $PATH
|
||||||
|
# 3. Grab it from the web
|
||||||
|
#
|
||||||
|
if [ -n "$AOSP_BIN" ]; then
|
||||||
|
$AOSP_BIN $args
|
||||||
|
elif [ -x "../utils/aosp" ]; then
|
||||||
|
../utils/aosp $args
|
||||||
|
elif [ -n "$(type -P aosp)" ]; then
|
||||||
|
aosp $args
|
||||||
|
else
|
||||||
|
if [ -n "$(type -P curl)" ]; then
|
||||||
|
bash <(curl -s $aosp_url) $args
|
||||||
|
elif [ -n "$(type -P wget)" ]; then
|
||||||
|
bash <(wget -q $aosp_url -O -) $args
|
||||||
|
else
|
||||||
|
echo "Unable to run the aosp binary"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user