Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 1 | - job: |
| 2 | name: 96boards-reference-platform-aosp-db410c |
| 3 | project-type: freestyle |
| 4 | defaults: global |
| 5 | logrotate: |
Fathi Boudra | bf3c1f3 | 2016-02-11 07:25:53 +0200 | [diff] [blame] | 6 | daysToKeep: 60 |
| 7 | numToKeep: 60 |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 8 | properties: |
| 9 | - authorization: |
| 10 | anonymous: |
| 11 | - job-read |
Benjamin Copeland | 9dc2eb8 | 2022-10-11 12:40:33 +0100 | [diff] [blame] | 12 | everyone-flat: |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 13 | - job-build |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 14 | - job-cancel |
Riku Voipio | b7c49aa | 2020-12-01 15:15:24 +0200 | [diff] [blame] | 15 | disabled: true |
Vishal Bhoj | 902a794 | 2018-04-14 12:08:04 +0530 | [diff] [blame] | 16 | node: docker-xenial-aosp |
Fathi Boudra | e0c7324 | 2016-07-02 12:20:07 +0300 | [diff] [blame] | 17 | display-name: 'Reference Platform - AOSP (DragonBoard 410c)' |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 18 | concurrent: true |
| 19 | wrappers: |
| 20 | - timestamps |
| 21 | - timeout: |
| 22 | timeout: 500 |
| 23 | builders: |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 24 | - shell: | |
| 25 | #!/bin/bash |
| 26 | |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 27 | set -ex |
| 28 | |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 29 | java -version |
| 30 | |
| 31 | sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list |
| 32 | sudo apt-get update |
Fathi Boudra | 5fe938e | 2016-12-11 11:34:29 +0200 | [diff] [blame] | 33 | sudo apt-get install -y gcc-4.9-multilib bison git gperf libxml2-utils python-mako zip time python-requests genisoimage patch mtools libfdt-dev python-mako gettext |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 34 | |
| 35 | mkdir -p ${HOME}/bin ${WORKSPACE}/build/out |
| 36 | curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 37 | chmod a+x ${HOME}/bin/* |
| 38 | export PATH=${HOME}/bin:${PATH} |
| 39 | |
| 40 | if [ ! -d "/home/buildslave/srv/${JOB_NAME}" ]; then |
| 41 | sudo mkdir -p /home/buildslave/srv/${JOB_NAME} |
| 42 | sudo chmod 777 /home/buildslave/srv/${JOB_NAME} |
| 43 | fi |
| 44 | cd /home/buildslave/srv/${JOB_NAME} |
| 45 | |
| 46 | git config --global user.email "ci_notify@linaro.org" |
| 47 | git config --global user.name "Linaro CI" |
| 48 | |
| 49 | # Clean any artifacts related to previous build |
| 50 | rm -rf vendor/db410c |
Vishal Bhoj | 40022ef | 2016-03-10 16:17:02 +0700 | [diff] [blame] | 51 | rm -rf out/target/product/db410c/system/ out/target/product/db410c/data/ out/target/product/db410c/*.xml out/target/product/db410c/obj/kernel/ |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 52 | rm -rf out/target/product/db410c/*.zip out/target/product/db410c/*.img out/target/product/db410c/*.xz |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 53 | |
| 54 | # Runs as ubuntu |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 55 | repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r16 |
| 56 | cd .repo |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 57 | rm -rf local_manifests |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 58 | git clone https://github.com/96boards/android_manifest -b android-6.0-db410c local_manifests |
| 59 | cd .. |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 60 | repo sync -f --force-sync -j16 |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 61 | |
| 62 | # Extract the proprietary firmware |
| 63 | mkdir -p vendor/db410c |
| 64 | cd vendor/db410c |
| 65 | wget --progress=dot -e dotbytes=1M http://developer.qualcomm.com/download/db410c/firmware-410c-1.2.0.bin |
| 66 | yes | sh firmware-410c-1.2.0.bin > /dev/null |
| 67 | cd ../.. |
| 68 | |
| 69 | mkdir -p out |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 70 | cp .repo/manifest.xml out/source-manifest.xml |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 71 | repo manifest -r -o out/pinned-manifest.xml |
| 72 | |
| 73 | source build/envsetup.sh |
| 74 | lunch db410c-userdebug |
| 75 | make droidcore -j8 |
| 76 | |
| 77 | cd out/target/product/db410c/ |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 78 | for image in "boot-db410c.img" "system.img" "userdata.img" "cache.img" "dt.img" "ramdisk.img"; do |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 79 | echo "Compressing ${image}" |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 80 | xz -z ${image} |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 81 | done |
| 82 | cd - |
| 83 | |
| 84 | cp -a /home/buildslave/srv/${JOB_NAME}/out/*.xml /home/buildslave/srv/${JOB_NAME}/out/target/product/db410c/ |
| 85 | cp -a /home/buildslave/srv/${JOB_NAME}/out/*.xml ${WORKSPACE}/ |
| 86 | |
| 87 | # Create MD5SUM |
| 88 | cd out/target/product/db410c/ |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 89 | md5sum *.txt *.xz *.xml *.img > MD5SUMS.txt |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 90 | cd - |
| 91 | |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 92 | # Build information |
Fathi Boudra | 0465cf3 | 2016-07-02 15:28:53 +0300 | [diff] [blame] | 93 | cat > out/target/product/db410c/HEADER.textile << EOF |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 94 | |
Fathi Boudra | 0465cf3 | 2016-07-02 15:28:53 +0300 | [diff] [blame] | 95 | h4. Reference Platform Build - AOSP (DragonBoard 410c) |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 96 | |
| 97 | Build description: |
| 98 | * Build URL: "$BUILD_URL":$BUILD_URL |
| 99 | |
Ricardo Salveti | ba56315 | 2016-02-23 13:46:35 -0300 | [diff] [blame] | 100 | Please also check "RPB-AOSP-DragonBoard410c-Build":https://github.com/96boards/documentation/wiki/RPB-AOSP-DragonBoard410c-Build for more information about this build. |
| 101 | |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 102 | Install (also check the bootloader "install guide":https://github.com/96boards/documentation/wiki/Dragonboard-410c-Installation-Guide-for-Linux-and-Android#install-android-release): |
| 103 | |
Fathi Boudra | ec7bd7a | 2018-03-02 10:51:05 +0200 | [diff] [blame] | 104 | bc. wget https://snapshots.linaro.org/96boards/reference-platform/aosp/db410c/${BUILD_NUMBER}/boot-db410c.img.xz |
| 105 | wget https://snapshots.linaro.org/96boards/reference-platform/aosp/db410c/${BUILD_NUMBER}/cache.img.xz |
| 106 | wget https://snapshots.linaro.org/96boards/reference-platform/aosp/db410c/${BUILD_NUMBER}/system.img.xz |
| 107 | wget https://snapshots.linaro.org/96boards/reference-platform/aosp/db410c/${BUILD_NUMBER}/userdata.img.xz |
Ricardo Salveti | d11d9dd | 2016-02-09 15:43:06 -0200 | [diff] [blame] | 108 | for f in *.xz; do xz -d \$f; done |
| 109 | sudo fastboot flash boot boot-db410c.img |
| 110 | sudo fastboot flash system system.img |
| 111 | sudo fastboot flash userdata userdata.img |
| 112 | sudo fastboot flash cache cache.img |
| 113 | |
| 114 | EOF |
| 115 | |
| 116 | cat > out/target/product/db410c/BUILD-INFO.txt << EOF |
| 117 | Format-Version: 0.5 |
| 118 | |
| 119 | Files-Pattern: * |
| 120 | License-Type: open |
| 121 | EOF |
| 122 | |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 123 | # Publish parameters |
| 124 | cat << EOF > ${WORKSPACE}/publish_parameters |
| 125 | PUB_SRC=${PWD}/out/target/product/db410c/ |
Fathi Boudra | ec7bd7a | 2018-03-02 10:51:05 +0200 | [diff] [blame] | 126 | PUB_DEST=96boards/reference-platform/aosp/db410c/${BUILD_NUMBER} |
Vishal Bhoj | 372cd5d | 2017-02-07 19:48:10 +0530 | [diff] [blame] | 127 | PUB_EXTRA_INC=^(BUILD-INFO.txt|HEADER.textile)$ |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 128 | EOF |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 129 | |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 130 | # Construct post-build-lava parameters |
Vishal Bhoj | 8d14e9e | 2016-05-17 16:05:48 +0530 | [diff] [blame] | 131 | cat << EOF > ${WORKSPACE}/post_build_lava_parameters |
Vishal Bhoj | c81bf40 | 2016-05-19 19:00:22 +0530 | [diff] [blame] | 132 | DEVICE_TYPE=apq8016-sbc |
Vishal Bhoj | 8d14e9e | 2016-05-17 16:05:48 +0530 | [diff] [blame] | 133 | TARGET_PRODUCT=${TARGET_PRODUCT} |
| 134 | MAKE_TARGETS=${MAKE_TARGETS} |
| 135 | JOB_NAME=${JOB_NAME} |
| 136 | BUILD_NUMBER=${BUILD_NUMBER} |
| 137 | BUILD_URL=${BUILD_URL} |
Vishal Bhoj | 5de235f | 2016-05-31 18:41:38 +0530 | [diff] [blame] | 138 | DOWNLOAD_URL=${PUBLISH_SERVER}/${PUB_DEST} |
Vishal Bhoj | 8d14e9e | 2016-05-17 16:05:48 +0530 | [diff] [blame] | 139 | LAVA_SERVER=validation.linaro.org/RPC2/ |
| 140 | IMAGE_EXTENSION=img.xz |
| 141 | FRONTEND_JOB_NAME=${JOB_NAME} |
| 142 | DOWNLOAD_URL=${PUBLISH_SERVER}/${PUB_DEST} |
| 143 | CUSTOM_JSON_URL=https://git.linaro.org/ci/job/configs.git/blob_plain/refs/heads/master:/96boards-reference-platform-aosp/lava-job-definitions/apq8016-sbc/template-boot.json |
| 144 | EOF |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 145 | - inject: |
| 146 | properties-file: publish_parameters |
Fathi Boudra | ec7bd7a | 2018-03-02 10:51:05 +0200 | [diff] [blame] | 147 | - linaro-publish-token |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 148 | - shell: |
| 149 | !include-raw: |
| 150 | - android/linaro-publisher.sh |
Vishal Bhoj | 8d14e9e | 2016-05-17 16:05:48 +0530 | [diff] [blame] | 151 | - trigger-builds: |
| 152 | - project: 'post-build-lava' |
| 153 | property-file: post_build_lava_parameters |
| 154 | block: true |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 155 | publishers: |
| 156 | - archive: |
| 157 | artifacts: '*.xml' |
| 158 | latest-only: true |
| 159 | - logparser: |
Fathi Boudra | e86882b | 2019-03-22 14:15:21 +0200 | [diff] [blame] | 160 | parse-rules: '/var/jenkins_home/userContent/android.parse' |
Ricardo Salveti | 14c21ed | 2016-02-09 00:56:02 -0200 | [diff] [blame] | 161 | unstable-on-warning: false |
| 162 | fail-on-error: false |
| 163 | - fingerprint: |
| 164 | files: 'build/fingerprints/*' |
| 165 | - email: |
Fathi Boudra | 02bc50a | 2017-10-04 02:58:23 +0300 | [diff] [blame] | 166 | recipients: 'fathi.boudra@linaro.org vishal.bhoj@linaro.org' |