refine doc
This commit is contained in:
26
android-builder-docker/Dockerfile
Normal file
26
android-builder-docker/Dockerfile
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.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
|
||||
53
android-builder-docker/README.md
Normal file
53
android-builder-docker/README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Build ReDroid with docker
|
||||
|
||||
## Sync Code
|
||||
ReDroid manifest include several branches:
|
||||
- `redroid12-gsi`, `redroid-s-beta-3`
|
||||
- `redroid11-gsi`, `redroid-11.0.0`
|
||||
- `redroid10-gsi`, `redroid-10.0.0`
|
||||
- `redroid-9.0.0`, `redroid9-gsi` (experimental)
|
||||
- `redroid-8.1.0`
|
||||
|
||||
branch with `-gsi` is recommended (fully treble / VNDK enforced).
|
||||
|
||||
```bash
|
||||
# fetch code
|
||||
|
||||
mkdir aosp && cd aosp
|
||||
repo init -u https://github.com/remote-android/platform_manifests.git -b <BRANCH> --depth=1
|
||||
repo sync -c --no-tags
|
||||
```
|
||||
|
||||
## Build
|
||||
```bash
|
||||
# create builder docker image
|
||||
# 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 .
|
||||
|
||||
# *inside* builder container
|
||||
cd /src
|
||||
|
||||
. build/envsetup.sh
|
||||
lunch redroid_x86_64-userdebug
|
||||
# or lunch redroid_arm64-userdebug
|
||||
m
|
||||
|
||||
# create redroid docker image in *HOST*
|
||||
cd <BUILD-OUT-DIR>
|
||||
sudo mount system.img system -o ro
|
||||
sudo mount vendor.img vendor -o ro
|
||||
sudo tar --xattrs -c vendor -C system --exclude="vendor" . | docker import -c 'ENTRYPOINT ["/init", "qemu=1", "androidboot.hardware=redroid"]' - redroid
|
||||
```
|
||||
|
||||
## Note
|
||||
```bash
|
||||
# intent changes for redroid-10 (copyfile hook during repo sync), DO NOT PANIC
|
||||
# [Android Clang/LLVM Toolchain](https://github.com/remote-android/platform_manifests/tree/llvm-toolchain-redroid-10.0.0)
|
||||
|
||||
project prebuilts/clang/host/linux-x86/ (*** NO BRANCH ***)
|
||||
-m clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.scudo_minimal-aarch64-android.a
|
||||
-m clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.scudo_minimal-arm-android.a
|
||||
-m clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.scudo_minimal-i686-android.a
|
||||
-m clang-r353983c/lib64/clang/9.0.3/lib/linux/libclang_rt.scudo_minimal-x86_64-android.a
|
||||
```
|
||||
|
||||
3
android-builder-docker/apt.conf
Normal file
3
android-builder-docker/apt.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
Acquire::https::proxy "http://some-proxy:8080";
|
||||
Acquire::https::proxy "https://some-proxy:8080/";
|
||||
10
android-builder-docker/sources.list
Normal file
10
android-builder-docker/sources.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
|
||||
Reference in New Issue
Block a user