Merge pull request #3569 from op-jenkins/op-build-update_143_4-17-2020
op-build update 4-17-2020
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
index e1455b2..a866f38 100755
--- a/ci/build-all-defconfigs.sh
+++ b/ci/build-all-defconfigs.sh
@@ -56,11 +56,6 @@
done
fi
-if [ -z "${OUTDIR}" or ! -d "${OUTDIR}" ]; then
- echo "No output directory specified"
- exit 1;
-fi
-
if [ -z "$CCACHE_DIR" ]; then
CCACHE_DIR=`pwd`/.op-build_ccache
fi
@@ -73,23 +68,23 @@
export BR2_DL_DIR=${DL_DIR}
fi
-if [ -f $(ldconfig -p | grep libeatmydata.so | tr ' ' '\n' | grep /|head -n1) ]; then
+if [ -f "$(ldconfig -p | grep libeatmydata.so | tr ' ' '\n' | grep /|head -n1)" ]; then
export LD_PRELOAD=${LD_PRELOAD:+"$LD_PRELOAD "}libeatmydata.so
fi
for i in ${DEFCONFIGS[@]}; do
- export O=${OUTDIR}-$i
+ export O=${OUTDIR}/$i
rm -rf $O
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
+ ./buildroot/utils/config --file $O/.config --enable CCACHE \
+ --set-str CCACHE_DIR $CCACHE_DIR
if [ -d "$SDK_DIR" ]; 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
+ ./buildroot/utils/config --file $O/.config --enable TOOLCHAIN_EXTERNAL \
+ --set-str TOOLCHAIN_EXTERNAL_PATH $SDK_DIR \
+ --enable TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC \
+ --enable TOOLCHAIN_EXTERNAL_CXX
# 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 --enable BR2_TOOLCHAIN_EXTERNAL_GCC_6
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-sdk.sh b/ci/build-sdk.sh
index 8267af3..6848565 100755
--- a/ci/build-sdk.sh
+++ b/ci/build-sdk.sh
@@ -27,7 +27,25 @@
export O=`pwd`/output-$1-$2/
op-build O=$O $2
-./buildroot/utils/config --file $O/.config --set-val BR2_CCACHE y
-./buildroot/utils/config --file $O/.config --set-str BR2_CCACHE_DIR $CCACHE_DIR
+./buildroot/utils/config --file $O/.config --enable CCACHE
+./buildroot/utils/config --file $O/.config --set-str CCACHE_DIR $CCACHE_DIR
+
+# Disable things not necessary for the sdk
+# (Buildroot manual section 6.1.3)
+./buildroot/utils/config --file $O/.config --disable INIT_BUSYBOX \
+ --enable INIT_NONE \
+ --disable SYSTEM_BIN_SH_BUSYBOX \
+ --disable TARGET_ROOTFS_TAR
+
+# Additionally, disable OpenPower packages and
+# ROOTFS stuff that we won't need
+./buildroot/utils/config --file $O/.config --disable OPENPOWER_PLATFORM \
+ --undefine ROOTFS_USERS_TABLES \
+ --undefine ROOTFS_OVERLAY \
+ --undefine ROOTFS_POST_BUILD_SCRIPT \
+ --undefine ROOTFS_POST_FAKEROOT_SCRIPT \
+ --undefine ROOTFS_POST_IMAGE_SCRIPT \
+ --undefine ROOTFS_POST_SCRIPT_ARGS
+
op-build O=$O olddefconfig
op-build O=$O sdk
diff --git a/openpower/scripts/update-defconfigs.sh b/openpower/scripts/update-defconfigs.sh
old mode 100644
new mode 100755
index c82900c..f51fc8f
--- a/openpower/scripts/update-defconfigs.sh
+++ b/openpower/scripts/update-defconfigs.sh
@@ -10,6 +10,9 @@
echo $PLATFORM
ODIR=`mktemp -d`
op-build O=$ODIR $PLATFORM_DEFCONFIG
+ if [ $# -gt 0 ]; then
+ buildroot/utils/config --file $ODIR/.config "$@"
+ fi
op-build O=$ODIR olddefconfig
op-build O=$ODIR savedefconfig
rm -rf $ODIR