Skip to content

Commit

Permalink
Support multiple board targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed May 20, 2018
1 parent e2748ec commit 08900d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ properties([
choice(choices: 'all\njessie-minimal-rock64\njessie-openmediavault-rock64\nstretch-minimal-rock64\nxenial-i3-rock64\nxenial-mate-rock64\nxenial-minimal-rock64\nlinux-virtual', description: 'What makefile image to target', name: 'MAKE_TARGET')
booleanParam(defaultValue: true, description: 'Whether to upload to Github for release or not', name: 'GITHUB_UPLOAD'),
booleanParam(defaultValue: false, description: 'If build should be marked as pre-release', name: 'GITHUB_PRERELEASE'),
string(defaultValue: 'rock64 rockpro64', description: 'Board targets', name: 'BOARD_TARGETs'),
string(defaultValue: 'ayufan-rock64', description: 'GitHub username or organization', name: 'GITHUB_USER'),
string(defaultValue: 'linux-build', description: 'GitHub repository', name: 'GITHUB_REPO'),
])
Expand All @@ -24,7 +25,8 @@ node('docker && linux-build') {
withEnv([
"USE_CCACHE=true",
"RELEASE_NAME=$VERSION",
"RELEASE=$BUILD_NUMBER"
"RELEASE=$BUILD_NUMBER",
"BOARD_TARGETs=$BOARD_TARGETs"
]) {
stage('Prepare') {
sh '''#!/bin/bash
Expand All @@ -51,23 +53,29 @@ node('docker && linux-build') {
sh '''#!/bin/bash
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make u-boot-build
for i in $BOARD_TARGETs; do
make u-boot-build BOARD_TARGET=$i
done
'''
}

stage('Kernel') {
sh '''#!/bin/bash
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make kernel-build KERNEL_DIR=kernel
for i in $BOARD_TARGETs; do
make kernel-build KERNEL_DIR=kernel BOARD_TARGET=$i
done
'''
}

stage('Images') {
sh '''#!/bin/bash
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make -j$(nproc) $MAKE_TARGET
for i in $BOARD_TARGETs; do
make -j$(nproc) BOARD_TARGET=$i $MAKE_TARGET
done
'''
}
}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else ifeq (rockpro64,$(BOARD_TARGET))
ATF_PLAT ?= rk3399
UBOOT_DEFCONFIG ?= rockpro64-rk3399_defconfig
BL31 ?= rkbin/rk33/rk3399_bl31_v1.00.elf
DDR ?= rkbin/rk33/rk3399_ddr_800MHz_v1.08.bin
DDR ?= rkbin/rk33/rk3399_ddr_666MHz_v1.11.bin
BOARD_CHIP ?= rk3399
USE_UBOOT_SPL ?= yes
else
Expand Down

0 comments on commit 08900d8

Please sign in to comment.