diff options
-rw-r--r-- | lt-qcom-linux.yaml | 28 | ||||
-rw-r--r-- | lt-qcom-linux/builders.sh | 37 | ||||
-rw-r--r-- | trigger-lt-qcom-linux-4.9.0.yaml | 6 |
3 files changed, 55 insertions, 16 deletions
diff --git a/lt-qcom-linux.yaml b/lt-qcom-linux.yaml index 7e716668b8..bf8f90353e 100644 --- a/lt-qcom-linux.yaml +++ b/lt-qcom-linux.yaml @@ -16,24 +16,28 @@ - job-cancel parameters: - string: - name: KERNELREPO + name: KERNEL_REPO_URL default: 'https://git.linaro.org/landing-teams/working/qualcomm/kernel.git' - string: - name: KERNELRELEASE + name: KERNEL_CONFIGS + default: 'defconfig distro.config' - string: - name: KERNELVERSION + name: KERNEL_DESCRIBE - string: - name: KERNELBRANCH + name: KERNEL_VERSION + - string: + name: KERNEL_BRANCH disabled: false node: docker-jessie-amd64 display-name: 'Qualcomm LT Linux kernel build' scm: - git: - url: ${KERNELREPO} - refspec: +refs/heads/${KERNELBRANCH}:refs/remotes/origin/${KERNELBRANCH} + url: ${KERNEL_REPO_URL} + refspec: +refs/heads/${KERNEL_BRANCH}:refs/remotes/origin/${KERNEL_BRANCH} name: origin branches: - - refs/heads/${KERNELBRANCH} + - refs/heads/${KERNEL_BRANCH} + basedir: linux skip-tag: true shallow-clone: true wipe-workspace: false @@ -45,12 +49,10 @@ - shell: | #!/bin/bash set -ex - echo "Starting ${JOB_NAME} with the following parameters:" - echo "KERNELRELEASE: ${KERNELRELEASE}" - echo "KERNELVERSION: ${KERNELVERSION}" - echo "KERNELBRANCH: ${KERNELBRANCH}" - echo "GIT_COMMIT: ${GIT_COMMIT}" - echo "GIT_BRANCH: ${GIT_BRANCH}" + sudo apt-get update + sudo apt-get install -y ccache + - shell: + !include-raw: lt-qcom-linux/builders.sh publishers: - email-ext: recipients: 'nicolas.dechesne@linaro.org' diff --git a/lt-qcom-linux/builders.sh b/lt-qcom-linux/builders.sh new file mode 100644 index 0000000000..1787959c56 --- /dev/null +++ b/lt-qcom-linux/builders.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -ex + +echo "Starting ${JOB_NAME} with the following parameters:" +echo "KERNEL_DESCRIBE: ${KERNEL_DESCRIBE}" +echo "KERNEL_VERSION: ${KERNEL_VERSION}" +echo "KERNEL_BRANCH: ${KERNEL_BRANCH}" +echo "GIT_COMMIT: ${GIT_COMMIT}" +echo "GIT_BRANCH: ${GIT_BRANCH}" + +toolchain_url=http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz +tcdir=${HOME}/srv/toolchain +tcbindir="${tcdir}/$(basename $toolchain_url .tar.xz)/bin" + +export ARCH=arm64 +export CROSS_COMPILE="ccache $(basename $(ls -1 ${tcbindir}/*-gcc) gcc)" +export PATH=${tcbindir}:$PATH + +# SRCVERSION is the main kernel version, e.g. <version>.<patchlevel>.0. +# PKGVERSION is similar to make kernelrelease, but reimplemented, since it requires setting up the build (and all tags). +# e.g. SRCVERSION -> 4.9.0, PKGVERSION -> 4.9.47-530-g244b81e58a54, which leads to +# linux-4.9.0-qcomlt-99 (4.9.47-530-g244b81e58a54-99) +SRCVERSION=$(echo ${KERNEL_VERSION} | sed 's/\(.*\)\..*/\1.0/') +PKGVERSION=$(echo ${KERNEL_VERSION} | sed -e 's/\.0-rc/\.0~rc/')$(echo ${KERNEL_DESCRIBE} | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}') + +cd ${WORKSPACE}/linux + +make ${KERNEL_CONFIGS} +make savedefconfig +cp defconfig arch/${ARCH}/configs + +make KERNELRELEASE=${SRCVERSION}-qcomlt-${BUILD_NUMBER} \ + KDEB_PKGVERSION=${PKGVERSION}-${BUILD_NUMBER} \ + KDEB_CHANGELOG_DIST=sid \ + DEBEMAIL="dragonboard@lists.96boards.org" \ + DEBFULLNAME="Linaro Qualcomm Landing Team" \ + -j`nproc` deb-pkg diff --git a/trigger-lt-qcom-linux-4.9.0.yaml b/trigger-lt-qcom-linux-4.9.0.yaml index 286f888182..eb6c4d7e24 100644 --- a/trigger-lt-qcom-linux-4.9.0.yaml +++ b/trigger-lt-qcom-linux-4.9.0.yaml @@ -41,9 +41,9 @@ git fetch --tags https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --tags https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git - echo KERNELRELEASE=$(git describe --always) > qcomlt_parameters - echo KERNELVERSION=$(make kernelversion | sed 's/\(.*\)\..*/\1.0/') >> qcomlt_parameters - echo KERNELBRANCH=$(echo ${GIT_BRANCH} | sed 's|origin/||') >> qcomlt_parameters + echo KERNEL_VERSION=$(make kernelversion) > qcomlt_parameters + echo KERNEL_DESCRIBE=$(git describe --always) >> qcomlt_parameters + echo KERNEL_BRANCH=$(echo ${GIT_BRANCH} | sed 's|origin/||') >> qcomlt_parameters cat qcomlt_parameters publishers: - trigger-parameterized-builds: |