update redroid builder
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:14.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG userid
|
||||
ARG groupid
|
||||
@@ -8,8 +8,19 @@ ARG username
|
||||
|
||||
# COPY sources.list etc/apt/sources.list
|
||||
|
||||
# gettext python-mako python3-mako python-enum34 used to build mesa3d
|
||||
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python gettext python-mako python3-mako python-enum34
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& echo "install package for building AOSP" \
|
||||
&& apt-get install -y git-core gnupg flex bison build-essential zip curl zlib1g-dev \
|
||||
gcc-multilib g++-multilib libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev \
|
||||
libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig \
|
||||
&& echo "install utils" \
|
||||
&& apt-get install -y sudo \
|
||||
&& echo "install packages for build mesa3d or meson related" \
|
||||
&& apt-get install -y python3-pip pkg-config python3-dev ninja-build \
|
||||
&& pip3 install mako meson
|
||||
|
||||
|
||||
RUN groupadd -g $groupid $username \
|
||||
&& useradd -m -u $userid -g $groupid $username \
|
||||
@@ -17,10 +28,10 @@ RUN groupadd -g $groupid $username \
|
||||
&& echo $username >/root/username \
|
||||
&& echo "$username:$username" | chpasswd && adduser $username sudo
|
||||
|
||||
|
||||
ENV HOME=/home/$username \
|
||||
USER=$username \
|
||||
PATH=/src/.repo/repo:/src/prebuilts/jdk/jdk8/linux-x86/bin/:$PATH \
|
||||
USE_CCACHE=1 \
|
||||
CCACHE_DIR=/src/.ccache
|
||||
PATH=/src/.repo/repo:/src/prebuilts/jdk/jdk8/linux-x86/bin/:$PATH
|
||||
|
||||
|
||||
ENTRYPOINT chroot --userspec=$(cat /root/username):$(cat /root/username) / /bin/bash -i
|
||||
|
||||
26
android-builder-docker/Dockerfile.1404
Normal file
26
android-builder-docker/Dockerfile.1404
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ARG userid
|
||||
ARG groupid
|
||||
ARG username
|
||||
|
||||
# COPY apt.conf /etc/apt/apt.conf
|
||||
|
||||
# COPY sources.1404.list etc/apt/sources.list
|
||||
|
||||
# gettext python-mako python3-mako python-enum34 used to build mesa3d
|
||||
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python gettext python-mako python3-mako python-enum34
|
||||
|
||||
RUN groupadd -g $groupid $username \
|
||||
&& useradd -m -u $userid -g $groupid $username \
|
||||
&& echo "$username ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
|
||||
&& echo $username >/root/username \
|
||||
&& echo "$username:$username" | chpasswd && adduser $username sudo
|
||||
|
||||
ENV HOME=/home/$username \
|
||||
USER=$username \
|
||||
PATH=/src/.repo/repo:/src/prebuilts/jdk/jdk8/linux-x86/bin/:$PATH \
|
||||
USE_CCACHE=1 \
|
||||
CCACHE_DIR=/src/.ccache
|
||||
|
||||
ENTRYPOINT chroot --userspec=$(cat /root/username):$(cat /root/username) / /bin/bash -i
|
||||
@@ -1,9 +1,9 @@
|
||||
# Build ReDroid with docker
|
||||
|
||||
## Sync Code
|
||||
ReDroid manifest include several branches:
|
||||
- `redroid-12.0.0`
|
||||
- `redroid-11.0.0`
|
||||
ReDroid manifest include several branches / tags:
|
||||
- `redroid-12.0.0` / `refs/tags/redroid-12.0.0_rxxxxxx`
|
||||
- `redroid-11.0.0` / `refs/tags/redroid-11.0.0_rxxxxxx`
|
||||
- `redroid-10.0.0`
|
||||
- `redroid-9.0.0`
|
||||
- `redroid-8.1.0`
|
||||
@@ -12,18 +12,21 @@ ReDroid manifest include several branches:
|
||||
# fetch code
|
||||
|
||||
mkdir ~/redroid && cd ~/redroid
|
||||
repo init -u https://github.com/remote-android/platform_manifests.git -b <BRANCH> --depth=1
|
||||
repo init -u https://github.com/remote-android/platform_manifests.git -b <REV> --depth=1
|
||||
repo sync -c --no-tags
|
||||
```
|
||||
|
||||
## Build
|
||||
```bash
|
||||
# create builder docker image
|
||||
# create builder docker image (ubuntu 20.04)
|
||||
# adjust apt.conf and source.list if needed
|
||||
docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t android-build-trusty .
|
||||
docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t redroid-builder .
|
||||
|
||||
# OR ubuntu 14.04 (old mesa3d release)
|
||||
docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t redroid-builder -f Dockerfile.1404 .
|
||||
|
||||
# start builder
|
||||
docker run -it -v ~/redroid:/src android-build-trusty
|
||||
docker run -it --rm --hostname redroid-builder --name redroid-builder -v <AOSP-SRC>:/src redroid-builder
|
||||
|
||||
# *inside* builder container
|
||||
cd /src
|
||||
|
||||
10
android-builder-docker/sources.1404.list
Normal file
10
android-builder-docker/sources.1404.list
Normal file
@@ -0,0 +1,10 @@
|
||||
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
@@ -1,10 +1,10 @@
|
||||
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
|
||||
|
||||
Reference in New Issue
Block a user