summaryrefslogtreecommitdiffstats
path: root/ci/build-all-defconfigs.sh
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-11-01 13:19:58 +1030
committerJoel Stanley <joel@jms.id.au>2018-11-01 13:21:17 +1030
commita81c124cb68903e5b14d981d0cd84c0581fe92f8 (patch)
tree81014ce8ebc4825dd249cc336e8bd36b3830b739 /ci/build-all-defconfigs.sh
parent3226cf303f1f3c2fcc8a6581b22d2ed575b36663 (diff)
downloadblackbird-op-build-a81c124cb68903e5b14d981d0cd84c0581fe92f8.tar.gz
blackbird-op-build-a81c124cb68903e5b14d981d0cd84c0581fe92f8.zip
ci: Get kernel version
When building with the SDK the build scripts have to specify the kernel version (and GCC). This was hardcoded, which is fine as the CI scripts are checked into the repo where the changes are made. Hoover it's one more thing to remember when bumping the kernel version. This grabs it from the BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE in the given config file, which should always be set. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'ci/build-all-defconfigs.sh')
-rwxr-xr-xci/build-all-defconfigs.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
index 0ab53bff..e1455b2b 100755
--- a/ci/build-all-defconfigs.sh
+++ b/ci/build-all-defconfigs.sh
@@ -39,6 +39,12 @@ while getopts "o:p:rs:" opt; do
esac
done
+function get_kernel_release
+{
+ IFS=. read major minor macro <<<"$1"
+ echo -n "${major}_${minor}"
+}
+
if [ -z "${PLATFORM_LIST}" ]; then
echo "Using all the defconfigs for all the platforms"
DEFCONFIGS=`(cd openpower/configs; ls -1 *_defconfig)`
@@ -84,7 +90,11 @@ for i in ${DEFCONFIGS[@]}; do
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_CXX y
# FIXME: How do we work this out programatically?
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_6 y
- ./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_18 y
+
+ KERNEL_VER=$(./buildroot/utils/config --file $O/.config --state BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE)
+ echo "KERNEL_VER " $KERNEL_VER
+ HEADERS=BR2_TOOLCHAIN_EXTERNAL_HEADERS_$(get_kernel_release $KERNEL_VER)
+ ./buildroot/utils/config --file $O/.config --set-val $HEADERS y
fi
op-build O=$O olddefconfig
op-build O=$O
OpenPOWER on IntegriCloud