Skip to content

Commit

Permalink
Allow Usage of GCC6 and GCC8 in SDK CI-Test Based on Config
Browse files Browse the repository at this point in the history
For P8 configs use GCC 6, and for P9 configs use GCC 8.
For P10, GCC 8 will also be selected.

Signed-off-by: Luis Fernandez <[email protected]>
  • Loading branch information
LF-Luis committed Jul 3, 2019
1 parent 4e89368 commit 7127b7b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
16 changes: 12 additions & 4 deletions ci/build-all-defconfigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7127b7b

Please sign in to comment.