summaryrefslogtreecommitdiff
path: root/jenkins_kernel_build_inst
blob: 7b1f395be818876453d51fe0c1527e466cb9718c (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/sh
# Example env variables and its values
# kernel_config='omap2plus_defconfig'
# export board_type='panda'
# kernel_flavour='omap4'
# rootfs_type='nano'
set -xe

if test -z "$kernel_config"; then
  kernel_config='omap2plus_defconfig'
fi
if test -z "$hwpack_type"; then
  hwpack_type='panda'
fi
if test -z "$board_type"; then
  board_type='panda'
fi
if test -z "$kernel_flavour"; then
  kernel_flavour='omap'
fi
if test -z "$rootfs_type"; then
  rootfs_type='nano'
fi
if test -z "$git_web_url"; then
  git_web_url="unknown"
fi
if test -z "$submit_job"; then
  submit_job=1
fi

export kernel_config
export hwpack_type
export board_type
export kernel_flavour
export rootfs_type
export git_web_url
export submit_job
export bundle_stream_name=`echo $JOB_NAME | sed -e 's/_.*//' -e 's/\./_/g'`
kernel_config_name=`echo ${kernel_config} | sed -e 's/_defconfig//g'`

if test "$hwpack_type" = "panda" ; then
    export kernel_version=`git describe --match='v*' | sed -e 's/^v//'``echo -${kernel_config_name}-linaro-lt-${kernel_flavour} | sed -e 's/_/-/g'`
else
    export kernel_version=`git describe --match='v*' | sed -e 's/^v//'``echo -${kernel_config_name}-linaro-${kernel_flavour} | sed -e 's/_/-/g'`
fi

# Below is the list of values that will be used in the json files
kernel_git=`cat .git/config|grep -i git |cut -d "=" -f2` 
export KERNEL_GIT="$kernel_git"
export KERNEL_COMMIT=$GIT_COMMIT 
. $WORKSPACE/lci-build-tools/jenkins_common_lib

#Calling the function build_instructions which includes the kernel build instructions
build_instructions