diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh index e1455b2b30..36f319a82c 100755 --- a/ci/build-all-defconfigs.sh +++ b/ci/build-all-defconfigs.sh @@ -83,13 +83,21 @@ for i in ${DEFCONFIGS[@]}; do op-build O=$O $i ./buildroot/utils/config --file $O/.config --set-val BR2_CCACHE y ./buildroot/utils/config --file $O/.config --set-str BR2_CCACHE_DIR $CCACHE_DIR - if [ -d "$SDK_DIR" ]; then + if [ -d "$SDK_DIR/p8/host" ] || [ -d "$SDK_DIR/p9/host" ]; then ./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL y - ./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR ./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC y ./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 + + IS_P8=$(./buildroot/utils/config --file $O/.config --state BR2_OPENPOWER_POWER8) + + # FIXME: How do we work this out programatically for each individual config? + if [[ ! -n ${IS_P8} ]]; then + ./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_8 y + ./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR/p9/host + else + ./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_6 y + ./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR/p8/host + fi KERNEL_VER=$(./buildroot/utils/config --file $O/.config --state BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE) echo "KERNEL_VER " $KERNEL_VER diff --git a/ci/build.sh b/ci/build.sh index 988fac0f1e..fab4169e03 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -129,12 +129,17 @@ EOF if [ -d "$SDK_CACHE" ]; then SDK_DIR=$SDK_CACHE/$(toolchain_hash)-$distro if [ ! -d "$SDK_DIR" ]; then - chmod +x ci/build-sdk.sh - run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro witherspoon_defconfig" - mv output-$distro-witherspoon_defconfig $SDK_DIR - $SDK_DIR/host/relocate-sdk.sh + chmod +x ci/build-sdk.sh + mkdir $SDK_DIR/p8/ + mkdir $SDK_DIR/p9/ + run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro habanero_defconfig" + run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro witherspoon_defconfig" + mv output-$distro-habanero_defconfig $SDK_DIR/p8/ + mv output-$distro-witherspoon_defconfig $SDK_DIR/p9/ + $SDK_DIR/p8/host/relocate-sdk.sh + $SDK_DIR/p9/host/relocate-sdk.sh fi - sdk_args="-s $SDK_DIR/host" + sdk_args="-s $SDK_DIR" else sdk_args="" fi