- job: name: 96boards-bubblegum project-type: freestyle defaults: global logrotate: daysToKeep: 30 numToKeep: 30 properties: - authorization: anonymous: - job-read - job-extended-read - job-workspace parameters: - string: name: ROOTFS default: 'alip developer' disabled: false node: docker-utopic-amd64 display-name: '96boards - Actions Semi Bubblegum' scm: - git: url: https://git.linaro.org/people/paul.liu/vendor-kernel.git refspec: +refs/heads/bubblegum96:refs/remotes/origin/bubblegum96 name: origin branches: - refs/heads/bubblegum96 skip-tag: true shallow-clone: true wipe-workspace: false wrappers: - timestamps - build-name: name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}' builders: - linaro-publish-token: host: builds.96boards.org - shell: | #!/bin/bash set -ex trap cleanup_exit INT TERM EXIT cleanup_exit() { cd ${WORKSPACE} sudo kpartx -dv out/bubblegum-jessie_*.img || true rm -rf lci-build-tools rm -rf builddir* rm -rf out } sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list sudo apt-get update sudo apt-get install -y kpartx python-pycurl wget -q \ http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/a/android-tools/android-tools-fsutils_4.2.2+git20130218-3ubuntu41+linaro1_amd64.deb \ http://repo.linaro.org/ubuntu/linaro-tools/pool/main/l/linaro-image-tools/linaro-image-tools_2015.11-1.linarojessie.1_amd64.deb \ http://repo.linaro.org/ubuntu/linaro-tools/pool/main/l/linaro-image-tools/python-linaro-image-tools_2015.11-1.linarojessie.1_all.deb \ http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/m/multipath-tools/kpartx_0.5.0-7ubuntu7.1_amd64.deb sudo dpkg -i --force-all *.deb rm -f *.deb export LANG=C export make_bootwrapper=false export make_install=true export kernel_flavour=bubblegum export kernel_config=owl_evb_linux_hdmi_defconfig export MAKE_DTBS=true export ARCH=arm64 export tcbindir="${HOME}/srv/toolchain/arm64-tc-14.09/bin" export toolchain_url=http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz rm -rf configs lci-build-tools git clone --depth 1 http://git.linaro.org/ci/lci-build-tools.git git clone --depth 1 http://git.linaro.org/ci/job/configs.git bash -x lci-build-tools/jenkins_kernel_build_inst rm -rf out/dtbs cp -a linux-*.deb out/ # Create the hardware pack cp -a configs/96boards-bubblegum/hwpacks/linaro-bubblegum . VERSION=`date +%Y%m%d`-${BUILD_NUMBER} linaro-hwpack-create --debug linaro-bubblegum ${VERSION} linaro-hwpack-replace -t `ls hwpack_linaro-bubblegum_*_arm64_supported.tar.gz` -p `ls linux-image-*-linaro-bubblegum_*.deb` -r linux-image -d -i linaro-hwpack-replace -t `ls hwpack_linaro-bubblegum_*_arm64_supported.tar.gz` -p `ls linux-headers-*-linaro-bubblegum_*.deb` -r linux-headers -d -i cat > out/README.txt << EOF Build information: * build: ${BUILD_URL} * git URL: ${GIT_URL} * git branch: ${GIT_BRANCH} * git commit: ${GIT_COMMIT} EOF cat > out/HEADER.html << EOF
                    
                
EOF for rootfs in ${ROOTFS}; do # Get rootfs export ROOTFS_BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/job/debian-arm64-rootfs/label=docker-jessie-arm64,rootfs=${rootfs}/lastSuccessfulBuild/buildNumber` export ROOTFS_BUILD_TIMESTAMP=`wget -q --no-check-certificate -O - https://ci.linaro.org/job/debian-arm64-rootfs/label=docker-jessie-arm64,rootfs=${rootfs}/lastSuccessfulBuild/buildTimestamp?format=yyyyMMdd` export ROOTFS_BUILD_URL="http://snapshots.linaro.org/debian/images/${rootfs}-arm64/${ROOTFS_BUILD_NUMBER}/linaro-jessie-${rootfs}-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.tar.gz" wget --progress=dot -e dotbytes=2M ${ROOTFS_BUILD_URL} cat >> out/README.txt << EOF * rootfs (${rootfs}): http://snapshots.linaro.org/debian/images/${rootfs}-arm64/${ROOTFS_BUILD_NUMBER} EOF # Create pre-built image(s) linaro-media-create --dev fastmodel --output-directory ${WORKSPACE}/out --image-file bubblegum-jessie_${rootfs}_${VERSION}.img --image-size 2G --binary linaro-jessie-${rootfs}-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.tar.gz --hwpack hwpack_linaro-bubblegum_*.tar.gz --hwpack-force-yes --bootloader uefi # Create eMMC rootfs image(s) mkdir boot rootfs for device in $(sudo kpartx -avs out/bubblegum-jessie_${rootfs}_${VERSION}.img | cut -d' ' -f3); do partition=$(echo ${device} | cut -d'p' -f3) [ "${partition}" = "2" ] && sudo mount -o loop /dev/mapper/${device} boot [ "${partition}" = "3" ] && sudo mount -o loop /dev/mapper/${device} rootfs done cat << EOF | sudo tee rootfs/etc/modprobe.d/blacklist-pvrsrvkm.conf blacklist pvrsrvkm EOF cat << EOF | sudo tee rootfs/etc/fstab /dev/disk/by-partlabel/SYSTEM / ext4 errors=remount-ro 0 1 EOF sudo rm -rf rootfs/dev rootfs/boot rootfs/var/lib/apt/lists sudo mkdir rootfs/dev rootfs/boot rootfs/var/lib/apt/lists sudo make_ext4fs -o -L rootfs -l 6G -s out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img rootfs/ sudo umount boot rootfs sudo kpartx -dv out/bubblegum-jessie_${rootfs}_${VERSION}.img sudo rm -rf boot rootfs # Compress image(s) gzip -9 out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img gzip -9 out/bubblegum-jessie_${rootfs}_${VERSION}.img done # Create boot image(s) cat > boot.txt << EOF setenv initrd_high "0xffffffffffffffff" setenv fdt_high "0xffffffffffffffff" setenv bootpart "2" setenv bootcmd "fatload mmc 1:2 0x00080000 Image; fatload mmc 1:2 0x01ffffc0 uInitrd; fatload mmc 1:2 0x10000000 s900_96board.dtb; booti 0x00080000 0x01ffffc0 0x10000000" setenv bootargs "console=tty0 console=ttyS5,115200n8 root=/dev/disk/by-partlabel/SYSTEM rootwait rw" run bootcmd boot EOF mkdir boot-fat dd if=/dev/zero of=out/boot.emmc.img bs=512 count=102400 sudo mkfs.fat -F32 -n "BOOT" out/boot.emmc.img sudo mount -o loop,rw,sync out/boot.emmc.img boot-fat sudo cp -a out/Image out/s900_96board.dtb boot-fat/ || true sudo mkimage -A arm64 -O linux -C none -T ramdisk -a 0 -e 0 -n "initramfs" -d out/initrd.img-* boot-fat/uInitrd || true sudo mkimage -A arm -O linux -C none -T script -a 0 -e 0 -n "boot script" -d boot.txt boot-fat/boot.scr || true sudo umount boot-fat sudo chmod 777 out/boot.emmc.img rm -rf boot-fat # Compress boot partition image(s) gzip -9 out/boot.emmc.img # Create MD5SUMS file (cd out && md5sum * > MD5SUMS.txt) # Publish test -d ${HOME}/bin || mkdir ${HOME}/bin wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py time python ${HOME}/bin/linaro-cp.py \ --server ${PUBLISH_SERVER} \ --link-latest \ out snapshots/bubblegum/linaro/debian/${BUILD_NUMBER} publishers: - email: recipients: 'fathi.boudra@linaro.org paul.liu@linaro.org'