Update SBE code for P9
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index 159b9c7..5c18681 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -22,3 +22,4 @@
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-gcc/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/zaius-xml/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ima-catalog/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sbe/Config.in"
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 72fcc64..da38f96 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -8,7 +8,7 @@
# make doesn't care for quotes in the dependencies.
XML_PACKAGE=$(subst $\",,$(BR2_OPENPOWER_XML_PACKAGE))
-OPENPOWER_PNOR_VERSION ?= 52b1b91ea5ea7651688802f72d168139c29c4780
+OPENPOWER_PNOR_VERSION ?= 86474de814334341cc6146174b6aee9afe0e5547
OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
OPENPOWER_PNOR_LICENSE = Apache-2.0
@@ -45,6 +45,7 @@
HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/
HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/
+SBE_BINARY_DIR = $(STAGING_DIR)/sbe_binaries/
OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
OPENPOWER_VERSION_DIR = $(STAGING_DIR)/openpower_version
@@ -52,6 +53,11 @@
OPENPOWER_VERSIONED_SUBPACKAGES = skiboot hostboot linux petitboot $(XML_PACKAGE) occ hostboot-binaries capp-ucode
OPENPOWER_PNOR = openpower-pnor
+ifeq ($(BR2_OPENPOWER_POWER9),y)
+ OPENPOWER_PNOR_DEPENDENCIES += sbe
+ OPENPOWER_VERSIONED_SUBPACKAGES += sbe
+endif
+
define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
@@ -64,6 +70,7 @@
-targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
-targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \
-sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
+ -sbe_binary_dir $(SBE_BINARY_DIR) \
-sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
-wink_binary_filename $(BR2_HOSTBOOT_BINARY_WINK_FILENAME) \
-occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \
diff --git a/openpower/package/sbe/Config.in b/openpower/package/sbe/Config.in
new file mode 100644
index 0000000..cd9e84f
--- /dev/null
+++ b/openpower/package/sbe/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_SBE
+ bool "sbe"
+ default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
+ select BR2_CPP
+ help
+ Project to build the sbe firmware codebase
diff --git a/openpower/package/sbe/sbe.mk b/openpower/package/sbe/sbe.mk
new file mode 100644
index 0000000..fbb7c09
--- /dev/null
+++ b/openpower/package/sbe/sbe.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# SBE
+#
+################################################################################
+
+SBE_VERSION ?= c9fea2e9662bdef548ea4742106b721386240ffe
+SBE_SITE ?= $(call github,open-power,sbe,$(SBE_VERSION))
+
+SBE_LICENSE = Apache-2.0
+SBE_DEPENDENCIES = host-ppe42-gcc
+
+SBE_INSTALL_IMAGES = YES
+SBE_INSTALL_TARGET = NO
+
+define SBE_BUILD_CMDS
+ bash -c 'cd $(@D) && make LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)'
+endef
+
+define SBE_INSTALL_IMAGES_CMDS
+ $(INSTALL) -D $(@D)/images/p9_ipl_build $(HOST_DIR)/usr/bin/
+ python $(@D)/src/build/sbeOpDistribute.py --sbe_binary_dir=$(STAGING_DIR)/sbe_binaries --img_dir=$(@D)/images
+ cp $(@D)/src/build/sbeOpDistribute.py $(STAGING_DIR)/sbe_binaries/
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/scripts/release-notes b/openpower/scripts/release-notes
index 2bf1b90..bdf2d4a 100755
--- a/openpower/scripts/release-notes
+++ b/openpower/scripts/release-notes
@@ -7,6 +7,9 @@
'hostboot' => { REPO => "http://github.com/open-power/hostboot" ,
DIR => "openpower/package/hostboot",
PACKAGE => "HOSTBOOT" },
+ 'sbe' => { REPO => "http://github.com/open-power/sbe" ,
+ DIR => "openpower/package/sbe",
+ PACKAGE => "SBE" },
'skiboot' => { REPO => "http://github.com/open-power/skiboot" ,
DIR => "openpower/package/skiboot",
PACKAGE => "SKIBOOT" },