Merge pull request #2331 from kgdeepak/ima-update

Add trace-node to Nimbus DD2 dts file
diff --git a/ci/Dockerfile/ubuntu1604 b/ci/Dockerfile/ubuntu1604
index 46f6801..2aaa647 100644
--- a/ci/Dockerfile/ubuntu1604
+++ b/ci/Dockerfile/ubuntu1604
@@ -7,4 +7,4 @@
   build-essential g++ git bison flex unzip \
   cpio vim-common lsb-release \
   libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \
-  wget bc libssl-dev
+  wget bc libssl-dev python-matplotlib python-numpy graphviz eatmydata
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
index 839d30a..0ab53bf 100755
--- a/ci/build-all-defconfigs.sh
+++ b/ci/build-all-defconfigs.sh
@@ -8,18 +8,24 @@
 
 DEFCONFIGS=();
 
-while getopts "o:p:r" opt; do
+SDK_DIR=""
+
+while getopts "o:p:rs:" opt; do
   case $opt in
     o)
       echo "Output directory: $OPTARG"
       OUTDIR="$OPTARG"
       ;;
+    s)
+      echo "SDK is in: $OPTARG"
+      SDK_DIR=$OPTARG
+      ;;
     p)
       echo "Platforms to build: $OPTARG"
       PLATFORM_LIST="$OPTARG"
       ;;
     r)
-      echo "Build legal-info for release"
+      echo "Build legal-info etc for release"
       BUILD_INFO=1
       ;;
     \?)
@@ -61,26 +67,35 @@
 	export BR2_DL_DIR=${DL_DIR}
 fi
 
+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
-        rm -rf output/*
-        op-build $i
-        echo 'BR2_CCACHE=y' >> output/.config
-        echo "BR2_CCACHE_DIR=\"$CCACHE_DIR\"" >> output/.config
-        echo 'BR2_CCACHE_INITIAL_SETUP=""' >> output/.config
-
-        op-build olddefconfig
-        op-build
+	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
+	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
+	    # 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
+	fi
+        op-build O=$O olddefconfig
+        op-build O=$O
         r=$?
-
-        if [ ${BUILD_INFO} = 1 ] && [ $r = 0 ]; then
-                op-build legal-info
-                mv output/legal-info ${OUTDIR}/$i-legal-info
-        fi
-
-        mkdir ${OUTDIR}/$i-images
-        mv output/images/* ${OUTDIR}/$i-images/
-        mv output/.config ${OUTDIR}/$i-images/.config
-        lsb_release -a > ${OUTDIR}/$i-images/lsb_release
+	if [ ${BUILD_INFO} = 1 ] && [ $r = 0 ]; then
+	    op-build O=$O legal-info
+	    op-build O=$O graph-build
+	    op-build O=$O graph-size
+	    op-build O=$O graph-depends
+	fi
+	lsb_release -a > $O/lsb_release
         if [ $r -ne 0 ]; then
         	exit $r
         fi
diff --git a/ci/build-sdk.sh b/ci/build-sdk.sh
new file mode 100755
index 0000000..8267af3
--- /dev/null
+++ b/ci/build-sdk.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -ex
+set -eo pipefail
+
+if [ -z "$1" ]; then
+	echo "No build distro specified"
+	exit 1;
+fi
+
+if [ -z "$2" ]; then
+	echo "No defconfig to build SDK from specified"
+	exit 1;
+fi
+
+if [ -z "$CCACHE_DIR" ]; then
+	CCACHE_DIR=`pwd`/.op-build_ccache
+fi
+
+shopt -s expand_aliases
+source op-build-env
+
+if [ -n "$DL_DIR" ]; then
+	unset BR2_DL_DIR
+	export BR2_DL_DIR=${DL_DIR}
+fi
+
+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
+op-build O=$O olddefconfig
+op-build O=$O sdk
diff --git a/ci/build.sh b/ci/build.sh
index b313291..012aaef 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -2,8 +2,19 @@
 
 CONTAINERS="ubuntu1604 fedora27"
 
-while getopts ":ab:hp:c:r" opt; do
+
+SDK_ONLY=0
+
+while getopts ":ab:hp:c:rs:S" opt; do
   case $opt in
+    s)
+      echo "SDK Cache dir"
+      SDK_CACHE="$OPTARG"
+      ;;
+    S)
+      echo "Build SDK Only"
+      SDK_ONLY=1
+      ;;
     a)
       echo "Build firmware images for all the platforms"
       PLATFORMS=""
@@ -26,6 +37,8 @@
       echo "-a          Build firmware images for all the platform defconfig's."
       echo "-b DIR      Bind DIR to container."
       echo "-p          List of comma separated platform names to build images for particular platforms."
+      echo "-s DIR      SDK cache dir."
+      echo "-S          Build SDK only"
       echo "-c          Container to run in"
       echo "Example:DOCKER_PREFIX=sudo ./ci/build.sh -a"
       echo -e "\tDOCKER_PREFIX=sudo ./ci/build.sh -p firestone"
@@ -62,12 +75,12 @@
          -t $1 $2
 }
 
-env
+function toolchain_hash
+{
+    echo -n 'toolchain-'$((git submodule ; cd openpower/configs/; cat `ls -1 |grep '_defconfig$'|sort`)|sha1sum |sed -e 's/ .*//')
+}
 
-if [ -d output-images ]; then
-	echo 'output-images already exists!';
-	exit 1;
-fi
+env
 
 for distro in $CONTAINERS;
 do
@@ -108,13 +121,26 @@
 ${DL_DIR_ENV}
 ${CCACHE_DIR_ENV}
 EOF
-)
+		  )
 	$DOCKER_PREFIX docker build --network=host -t openpower/op-build-$distro - <<< "${Dockerfile}"
-	mkdir -p output-images/$distro
-	run_docker openpower/op-build-$distro "./ci/build-all-defconfigs.sh -o output-images/$distro -p $PLATFORMS ${release_args}"
-	if [ $? = 0 ]; then
-		mv *-images output-$distro/
+	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
+	    fi
+	    sdk_args="-s $SDK_DIR/host"
 	else
+	    sdk_args=""
+	fi
+
+	if [ $SDK_ONLY == 0 ]; then
+	    run_docker openpower/op-build-$distro "./ci/build-all-defconfigs.sh -o `pwd`/output-$distro -p $PLATFORMS ${release_args} ${sdk_args}"
+	fi
+
+	if [ $? != 0 ]; then
 		exit $?;
 	fi
 done;
diff --git a/doc/release-notes/v2.0.4.rst b/doc/release-notes/v2.0.4.rst
index 85721dd..a8f7af6 100644
--- a/doc/release-notes/v2.0.4.rst
+++ b/doc/release-notes/v2.0.4.rst
@@ -70,12 +70,12 @@
 
 `Repository <https://github.com/open-power/hostboot>`__
 
-.. _patches-1:
+.. _v2.0.4-patches-1:
 
 Patches
 ~~~~~~~
 
-.. _commits-1:
+.. _v2.0.4-commits-1:
 
 Commits
 ~~~~~~~
@@ -164,12 +164,12 @@
 
 `Repository <https://github.com/open-power/occ>`__
 
-.. _patches-2:
+.. _v2.0.4-patches-2:
 
 Patches
 ~~~~~~~
 
-.. _commits-2:
+.. _v2.0.4-commits-2:
 
 Commits
 ~~~~~~~
@@ -192,12 +192,12 @@
 
 `Repository <https://github.com/open-power/sbe>`__
 
-.. _patches-3:
+.. _v2.0.4-patches-3:
 
 Patches
 ~~~~~~~
 
-.. _commits-3:
+.. _v2.0.4-commits-3:
 
 Commits
 ~~~~~~~
@@ -231,12 +231,12 @@
 
 `Repository <https://github.com/open-power/skiboot>`__
 
-.. _patches-4:
+.. _v2.0.4-patches-4:
 
 Patches
 ~~~~~~~
 
-.. _commits-4:
+.. _v2.0.4-commits-4:
 
 Commits
 ~~~~~~~
diff --git a/doc/release-notes/v2.0.6.rst b/doc/release-notes/v2.0.6.rst
index 498f37e..44e58d3 100644
--- a/doc/release-notes/v2.0.6.rst
+++ b/doc/release-notes/v2.0.6.rst
@@ -113,12 +113,12 @@
 
 `Repository <https://github.com/open-power/hostboot>`__
 
-.. _patches-1:
+.. _v2.0.6-patches-1:
 
 Patches
 ~~~~~~~
 
-.. _commits-1:
+.. _v2.0.6-commits-1:
 
 Commits
 ~~~~~~~
@@ -197,12 +197,12 @@
 
 `Repository <https://github.com/open-power/occ>`__
 
-.. _patches-2:
+.. _v2.0.6-patches-2:
 
 Patches
 ~~~~~~~
 
-.. _commits-2:
+.. _v2.0.6-commits-2:
 
 Commits
 ~~~~~~~
@@ -217,14 +217,14 @@
 
 `Repository <https://github.com/open-power/petitboot>`__
 
-.. _patches-3:
+.. _v2.0.6-patches-3:
 
 Patches
 ~~~~~~~
 
 -  `petitboot-01-autotools-Add-autopoint-generated-files.patch <https://github.com/open-power/op-build/tree/HEAD/openpower/package/petitboot/petitboot-01-autotools-Add-autopoint-generated-files.patch>`__
 
-.. _commits-3:
+.. _v2.0.6-commits-3:
 
 Commits
 ~~~~~~~
@@ -234,12 +234,12 @@
 
 `Repository <https://github.com/open-power/sbe>`__
 
-.. _patches-4:
+.. _v2.0.6-patches-4:
 
 Patches
 ~~~~~~~
 
-.. _commits-4:
+.. _v2.0.6-commits-4:
 
 Commits
 ~~~~~~~
diff --git a/doc/release-notes/v2.0.8.rst b/doc/release-notes/v2.0.8.rst
index 813772e..24a03e2 100644
--- a/doc/release-notes/v2.0.8.rst
+++ b/doc/release-notes/v2.0.8.rst
@@ -51,12 +51,12 @@
 
 `Repository <https://github.com/open-power/hostboot>`__
 
-.. _patches-1:
+.. _v2.0.8-patches-1:
 
 Patches
 ~~~~~~~
 
-.. _commits-1:
+.. _v2.0.8-commits-1:
 
 Commits
 ~~~~~~~
diff --git a/doc/release-notes/v2.1-rc1.rst b/doc/release-notes/v2.1-rc1.rst
index 4ade51d..098ec95 100644
--- a/doc/release-notes/v2.1-rc1.rst
+++ b/doc/release-notes/v2.1-rc1.rst
@@ -175,12 +175,12 @@
 
 `Repository <https://github.com/open-power/hostboot>`__
 
-.. _patches-1:
+.. _v2.1-rc1-patches-1:
 
 Patches
 ~~~~~~~
 
-.. _commits-1:
+.. _v2.1-rc1-commits-1:
 
 Commits
 ~~~~~~~
@@ -837,12 +837,12 @@
 
 `Repository <https://github.com/open-power/occ>`__
 
-.. _patches-2:
+.. _v2.1-rc1-patches-2:
 
 Patches
 ~~~~~~~
 
-.. _commits-2:
+.. _v2.1-rc1-commits-2:
 
 Commits
 ~~~~~~~
@@ -869,14 +869,14 @@
 
 `Repository <https://github.com/open-power/petitboot>`__
 
-.. _patches-3:
+.. _v2.1-rc1-patches-3:
 
 Patches
 ~~~~~~~
 
 -  `petitboot-01-autotools-Add-autopoint-generated-files.patch <https://github.com/open-power/op-build/tree/HEAD/openpower/package/petitboot/petitboot-01-autotools-Add-autopoint-generated-files.patch>`__
 
-.. _commits-3:
+.. _v2.1-rc1-commits-3:
 
 Commits
 ~~~~~~~
@@ -886,12 +886,12 @@
 
 `Repository <https://github.com/open-power/sbe>`__
 
-.. _patches-4:
+.. _v2.1-rc1-patches-4:
 
 Patches
 ~~~~~~~
 
-.. _commits-4:
+.. _v2.1-rc1-commits-4:
 
 Commits
 ~~~~~~~
@@ -951,12 +951,12 @@
 
 `Repository <https://github.com/open-power/skiboot>`__
 
-.. _patches-5:
+.. _v2.1-rc1-patches-5:
 
 Patches
 ~~~~~~~
 
-.. _commits-5:
+.. _v2.1-rc1-commits-5:
 
 Commits
 ~~~~~~~
@@ -1119,12 +1119,12 @@
 
 `Repository <https://github.com/open-power/zaius-xml>`__
 
-.. _patches-6:
+.. _v2.1-rc1-patches-6:
 
 Patches
 ~~~~~~~
 
-.. _commits-6:
+.. _v2.1-rc1-commits-6:
 
 Commits
 ~~~~~~~
diff --git a/doc/release-notes/v2.1.rst b/doc/release-notes/v2.1.rst
index 7189c7f..d296d80 100644
--- a/doc/release-notes/v2.1.rst
+++ b/doc/release-notes/v2.1.rst
@@ -192,12 +192,12 @@
 
 `Repository <https://github.com/open-power/hostboot>`__
 
-.. _patches-1:
+.. _v2.1-patches-1:
 
 Patches
 ~~~~~~~
 
-.. _commits-1:
+.. _v2.1-commits-1:
 
 Commits
 ~~~~~~~
@@ -866,12 +866,12 @@
 
 `Repository <https://github.com/open-power/occ>`__
 
-.. _patches-2:
+.. _v2.1-patches-2:
 
 Patches
 ~~~~~~~
 
-.. _commits-2:
+.. _v2.1-commits-2:
 
 Commits
 ~~~~~~~
@@ -898,12 +898,12 @@
 
 `Repository <https://github.com/open-power/op-build>`__
 
-.. _patches-3:
+.. _v2.1-patches-3:
 
 Patches
 ~~~~~~~
 
-.. _commits-3:
+.. _v2.1-commits-3:
 
 Commits
 ~~~~~~~
@@ -915,12 +915,12 @@
 
 `Repository <https://github.com/open-power/p9dsu-xml>`__
 
-.. _patches-4:
+.. _v2.1-patches-4:
 
 Patches
 ~~~~~~~
 
-.. _commits-4:
+.. _v2.1-commits-4:
 
 Commits
 ~~~~~~~
@@ -932,12 +932,12 @@
 
 `Repository <https://github.com/open-power/palmetto-xml>`__
 
-.. _patches-5:
+.. _v2.1-patches-5:
 
 Patches
 ~~~~~~~
 
-.. _commits-5:
+.. _v2.1-commits-5:
 
 Commits
 ~~~~~~~
@@ -949,14 +949,14 @@
 
 `Repository <https://github.com/open-power/petitboot>`__
 
-.. _patches-6:
+.. _v2.1-patches-6:
 
 Patches
 ~~~~~~~
 
 -  `petitboot-01-autotools-Add-autopoint-generated-files.patch <https://github.com/open-power/op-build/tree/v2.1/openpower/package/petitboot/petitboot-01-autotools-Add-autopoint-generated-files.patch>`__
 
-.. _commits-6:
+.. _v2.1-commits-6:
 
 Commits
 ~~~~~~~
@@ -966,12 +966,12 @@
 
 `Repository <https://github.com/open-power/pnor>`__
 
-.. _patches-7:
+.. _v2.1-patches-7:
 
 Patches
 ~~~~~~~
 
-.. _commits-7:
+.. _v2.1-commits-7:
 
 Commits
 ~~~~~~~
@@ -983,12 +983,12 @@
 
 `Repository <https://github.com/open-power/romulus-xml>`__
 
-.. _patches-8:
+.. _v2.1-patches-8:
 
 Patches
 ~~~~~~~
 
-.. _commits-8:
+.. _v2.1-commits-8:
 
 Commits
 ~~~~~~~
@@ -1000,12 +1000,12 @@
 
 `Repository <https://github.com/open-power/sbe>`__
 
-.. _patches-9:
+.. _v2.1-patches-9:
 
 Patches
 ~~~~~~~
 
-.. _commits-9:
+.. _v2.1-commits-9:
 
 Commits
 ~~~~~~~
@@ -1130,12 +1130,12 @@
 
 `Repository <https://github.com/open-power/skiboot>`__
 
-.. _patches-10:
+.. _v2.1-patches-10:
 
 Patches
 ~~~~~~~
 
-.. _commits-10:
+.. _v2.1-commits-10:
 
 Commits
 ~~~~~~~
@@ -1330,12 +1330,12 @@
 
 `Repository <https://github.com/open-power/zaius-xml>`__
 
-.. _patches-11:
+.. _v2.1-patches-11:
 
 Patches
 ~~~~~~~
 
-.. _commits-11:
+.. _v2.1-commits-11:
 
 Commits
 ~~~~~~~
diff --git a/openpower/configs/barreleye_defconfig b/openpower/configs/barreleye_defconfig
index 354a54c..1bd0649 100644
--- a/openpower/configs/barreleye_defconfig
+++ b/openpower/configs/barreleye_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firenze_defconfig b/openpower/configs/firenze_defconfig
index 1a8b707..141ed0a 100644
--- a/openpower/configs/firenze_defconfig
+++ b/openpower/configs/firenze_defconfig
@@ -13,7 +13,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
index 72da89f..ff11c6a 100644
--- a/openpower/configs/firestone_defconfig
+++ b/openpower/configs/firestone_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/garrison_defconfig b/openpower/configs/garrison_defconfig
index 2e58c5a..9b157d5 100644
--- a/openpower/configs/garrison_defconfig
+++ b/openpower/configs/garrison_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
index d7f3e6f..319be3d 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/habanero_defconfig
@@ -15,7 +15,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/openpower_mambo_defconfig b/openpower/configs/openpower_mambo_defconfig
index f741646..86d7e71 100644
--- a/openpower/configs/openpower_mambo_defconfig
+++ b/openpower/configs/openpower_mambo_defconfig
@@ -11,7 +11,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/p9dsu_defconfig b/openpower/configs/p9dsu_defconfig
index e1dc84a..2e048ee 100644
--- a/openpower/configs/p9dsu_defconfig
+++ b/openpower/configs/p9dsu_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
index f53937d..0e71aef 100644
--- a/openpower/configs/palmetto_defconfig
+++ b/openpower/configs/palmetto_defconfig
@@ -13,7 +13,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/pseries_defconfig b/openpower/configs/pseries_defconfig
index 2c936d0..12cea02 100644
--- a/openpower/configs/pseries_defconfig
+++ b/openpower/configs/pseries_defconfig
@@ -13,7 +13,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/pseries_skiroot_defconfig"
diff --git a/openpower/configs/romulus_defconfig b/openpower/configs/romulus_defconfig
index 679d6a2..918bf0b 100644
--- a/openpower/configs/romulus_defconfig
+++ b/openpower/configs/romulus_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
@@ -41,7 +41,7 @@
 BR2_OPENPOWER_POWER9=y
 BR2_HOSTBOOT_CONFIG_FILE="romulus.config"
 BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE="romulus-xml"
-BR2_OPENPOWER_MACHINE_XML_VERSION="93456eecf03867095eed5d972278f48c034063d5"
+BR2_OPENPOWER_MACHINE_XML_VERSION="d91ade7643d6cabc0ba1d5c6f53d3f02c5b01fda"
 BR2_OPENPOWER_MACHINE_XML_FILENAME="romulus.xml"
 BR2_OPENPOWER_SYSTEM_XML_FILENAME="ROMULUS_hb.system.xml"
 BR2_OPENPOWER_MRW_XML_FILENAME="ROMULUS_hb.mrw.xml"
diff --git a/openpower/configs/vesnin_defconfig b/openpower/configs/vesnin_defconfig
index 9167472..280c3b5 100644
--- a/openpower/configs/vesnin_defconfig
+++ b/openpower/configs/vesnin_defconfig
@@ -13,7 +13,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index 929560a..a8367c0 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/witherspoon_dev_defconfig b/openpower/configs/witherspoon_dev_defconfig
index 2821a85..00fc1f1 100644
--- a/openpower/configs/witherspoon_dev_defconfig
+++ b/openpower/configs/witherspoon_dev_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/zaius_defconfig b/openpower/configs/zaius_defconfig
index f1426cd..aa0b727 100644
--- a/openpower/configs/zaius_defconfig
+++ b/openpower/configs/zaius_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/zz_defconfig b/openpower/configs/zz_defconfig
index 4ded3b9..e8b5046 100644
--- a/openpower/configs/zz_defconfig
+++ b/openpower/configs/zz_defconfig
@@ -13,7 +13,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.6"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/linux/0002-Release-OpenPower-kernel.patch b/openpower/linux/0002-Release-OpenPower-kernel.patch
index 47b05eb..108a4aa 100644
--- a/openpower/linux/0002-Release-OpenPower-kernel.patch
+++ b/openpower/linux/0002-Release-OpenPower-kernel.patch
@@ -1,6 +1,6 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Joel Stanley <joel@jms.id.au>
-Date: Mon, 20 Aug 2018 11:13:08 +0930
+Date: Thu, 6 Sep 2018 13:27:02 +1000
 Subject: [PATCH 2/2] Release OpenPower kernel
 
 Signed-off-by: Joel Stanley <joel@jms.id.au>
@@ -9,13 +9,13 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index e2bd815f24eb..8ee63eaae1b9 100644
+index 62524f4d42ad..02a592984725 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -2,7 +2,7 @@
  VERSION = 4
  PATCHLEVEL = 18
- SUBLEVEL = 3
+ SUBLEVEL = 6
 -EXTRAVERSION =
 +EXTRAVERSION = -openpower1
  NAME = Merciless Moray
diff --git a/openpower/package/hcode/Config.in b/openpower/package/hcode/Config.in
index 461ac13..2b63240 100644
--- a/openpower/package/hcode/Config.in
+++ b/openpower/package/hcode/Config.in
@@ -31,7 +31,7 @@
 
 config BR2_HCODE_VERSION
 	string
-	default "hw090318a.930" if BR2_HCODE_LATEST_VERSION
+	default "hw090518a.930" if BR2_HCODE_LATEST_VERSION
 	default BR2_HCODE_CUSTOM_VERSION_VALUE \
 		if BR2_HCODE_CUSTOM_VERSION
 
diff --git a/openpower/package/hostboot-binaries/Config.in b/openpower/package/hostboot-binaries/Config.in
index cb7430d..3e4be2a 100644
--- a/openpower/package/hostboot-binaries/Config.in
+++ b/openpower/package/hostboot-binaries/Config.in
@@ -24,7 +24,7 @@
 
 config BR2_HOSTBOOT_BINARIES_VERSION
 	string
-	default "hw090318a.930" if BR2_HOSTBOOT_BINARIES_LATEST_VERSION
+	default "hw090518a.930" if BR2_HOSTBOOT_BINARIES_LATEST_VERSION
 	default BR2_HOSTBOOT_BINARIES_CUSTOM_VERSION_VALUE \
 		if BR2_HOSTBOOT_BINARIES_CUSTOM_VERSION
 
diff --git a/openpower/package/hostboot-p8/hostboot-p8.mk b/openpower/package/hostboot-p8/hostboot-p8.mk
index c50679e..9f6d45f 100644
--- a/openpower/package/hostboot-p8/hostboot-p8.mk
+++ b/openpower/package/hostboot-p8/hostboot-p8.mk
@@ -3,7 +3,7 @@
 # hostboot for POWER8
 #
 ################################################################################
-HOSTBOOT_P8_VERSION ?= d3025f5d7ddd0723946bb54fcb471d2bf1fd2da4
+HOSTBOOT_P8_VERSION ?= e74ef0f31e326658cb7165c205aa30978564b2df
 
 HOSTBOOT_P8_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_P8_VERSION))
 
diff --git a/openpower/package/hostboot/Config.in b/openpower/package/hostboot/Config.in
index 783fe5d..db21d3e 100644
--- a/openpower/package/hostboot/Config.in
+++ b/openpower/package/hostboot/Config.in
@@ -28,7 +28,7 @@
 
 config BR2_HOSTBOOT_VERSION
 	string
-	default "6c30bcf8975825c394a6eb6f687535a9c52c74e8" if BR2_HOSTBOOT_LATEST_VERSION
+	default "7c5afbddbf0a3f795ad8404319e09a3ff00b11b8" if BR2_HOSTBOOT_LATEST_VERSION
         default "876b79aacd9b14f4c3561e954daa0285747c9662" if BR2_HOSTBOOT_STABLE_VERSION
 	default BR2_HOSTBOOT_CUSTOM_VERSION_VALUE \
 		if BR2_HOSTBOOT_CUSTOM_VERSION
diff --git a/openpower/package/petitboot/petitboot.hash b/openpower/package/petitboot/petitboot.hash
index b357f1b..15dacfd 100644
--- a/openpower/package/petitboot/petitboot.hash
+++ b/openpower/package/petitboot/petitboot.hash
@@ -1 +1 @@
-sha256 85f866c861e72f7e1f73458be0f73fe6a9759fb015db237c69da0fdb001085ce  petitboot-1.9.0.tar.gz
+sha256 607551a13c286af7941fd52450106d8629b4f25e6125f5cbd67a359544b3cbe3  petitboot-1.9.1.tar.gz
diff --git a/openpower/package/petitboot/petitboot.mk b/openpower/package/petitboot/petitboot.mk
index dc1ca04..8e81094 100644
--- a/openpower/package/petitboot/petitboot.mk
+++ b/openpower/package/petitboot/petitboot.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PETITBOOT_VERSION = 1.9.0
+PETITBOOT_VERSION = 1.9.1
 PETITBOOT_SOURCE = petitboot-$(PETITBOOT_VERSION).tar.gz
 PETITBOOT_SITE ?= https://github.com/open-power/petitboot/releases/download/v$(PETITBOOT_VERSION)
 PETITBOOT_DEPENDENCIES = ncurses udev host-bison host-flex lvm2