aboutsummaryrefslogtreecommitdiff
path: root/96boards-dragonboard845c-aosp-master/builders.sh
blob: eeb1d019433e2730b9172f69d22490af3f14bce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash

# Install needed packages
sudo apt-get update

# Here is for packages not listed by the source.android.com site below.
# But the following packages might not be really necessary,
# as the docker image for docker-focal-aosp labelled nodes is linaro/jenkins-amd64-ubuntu:focal
# which is defined here: https://git.linaro.org/infrastructure/ci-yadp-builder.git/tree/docker_templates_aosp_amd64.yml#n2
# And the packages listed here might be already defined there.
sudo apt-get install -y --allow-change-held-packages wget sudo python3 python-is-python3 openjdk-11-jdk-headless
java -version

## https://source.android.com/docs/setup/start/requirements#hardware-requirements
sudo apt-get install -y --allow-change-held-packages git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 libncurses5 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig

## keep the same package as listed here before
sudo apt-get install -y python-mako gperf time genisoimage patch mtools rsync liblz4-tool lzop libssl-dev libdrm-intel1 python3-pip

# Set local configuration
git config --global user.email "ci_notify@linaro.org"
git config --global user.name "Linaro CI"
java -version

BUILD_DIR=aosp-master/build
if [ ! -d "/home/buildslave/srv/${BUILD_DIR}" ]; then
  sudo mkdir -p /home/buildslave/srv/${BUILD_DIR}
  sudo chmod 777 /home/buildslave/srv/${BUILD_DIR}
fi
cd /home/buildslave/srv/${BUILD_DIR}

# Download helper scripts (repo)
mkdir -p ${HOME}/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
chmod a+x ${HOME}/bin/*
export PATH=${HOME}/bin:${PATH}

repo init -u https://android.googlesource.com/platform/manifest -b main --repo-branch=master --no-repo-verify
repo sync -j$(nproc) -c -f
./device/linaro/dragonboard/fetch-vendor-package.sh
rm -rf build-info
source build/envsetup.sh
lunch db845c-trunk_staging-userdebug
make -j$(nproc)
repo manifest -r -o out/target/product/db845c/pinned-manifest.xml

wget https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/android-lcr/hikey/build-info/aosp-master-template.txt -O ${PWD}/out/target/product/db845c/BUILD-INFO.txt

# Publish parameters
cat << EOF > ${WORKSPACE}/publish_parameters
PUB_DEST=96boards/dragonboard845c/linaro/aosp-master/${BUILD_NUMBER}
PUB_SRC=${PWD}/out/target/product/db845c/
PUB_EXTRA_INC=^[^/]+\.(dtb|dtbo|zip)$|MLO|vmlinux|System.map
EOF