Merge pull request #1323 from bofferdn/secureboot-rc4

Secure Boot: Add machine-xml and PNOR support for signing
diff --git a/openpower/package/libflash/Config.in b/openpower/package/libflash/Config.in
index eb6f56d..3fb323f 100644
--- a/openpower/package/libflash/Config.in
+++ b/openpower/package/libflash/Config.in
@@ -2,3 +2,8 @@
 	bool "libflash"
 	help
 	  Build libflash shared library
+
+config BR2_PACKAGE_PFLASH
+	bool "pflash"
+	help
+	  Install pflash utility to target
diff --git a/openpower/package/libflash/libflash.mk b/openpower/package/libflash/libflash.mk
index 5417beb..d47edf7 100644
--- a/openpower/package/libflash/libflash.mk
+++ b/openpower/package/libflash/libflash.mk
@@ -17,22 +17,29 @@
 		     OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \
 		     SIZE="$(TARGET_CROSS)size"
 
+LIBFLASH_MAKE_ENV = \
+	SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
+	       $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS)
+
+
 define LIBFLASH_BUILD_CMDS
-	PREFIX=$(STAGING_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
-	       $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
-	       -C $(@D)/external/shared
+	PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared
+	$(if $(BR2_PACKAGE_PFLASH),
+		PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) \
+		       -C $(@D)/external/pflash)
 endef
 
 define LIBFLASH_INSTALL_STAGING_CMDS
-	PREFIX=$(STAGING_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
-	       $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
-	       -C $(@D)/external/shared install
+	PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
+	       install
 endef
 
 define LIBFLASH_INSTALL_TARGET_CMDS
-	PREFIX=$(TARGET_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
-	       $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
-	       -C $(@D)/external/shared install-lib
+	PREFIX=$(TARGET_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
+	       install-lib
+	$(if $(BR2_PACKAGE_PFLASH),
+		DESTDIR=$(TARGET_DIR) $(LIBFLASH_MAKE_ENV) \
+		       -C $(@D)/external/pflash install)
 endef
 
 $(eval $(generic-package))
diff --git a/openpower/package/petitboot/Config.in b/openpower/package/petitboot/Config.in
index e5769de..ef002b4 100644
--- a/openpower/package/petitboot/Config.in
+++ b/openpower/package/petitboot/Config.in
@@ -27,6 +27,7 @@
 	bool "petitboot-mtd"
 	depends on BR2_PACKAGE_PETITBOOT
 	select BR2_PACKAGE_LIBFLASH
+	select BR2_PACKAGE_PFLASH
 	help
 	  Adds Petitboot support for MTD devices
 
diff --git a/openpower/scripts/release-notes b/openpower/scripts/release-notes
index 138c28e..50b659f 100755
--- a/openpower/scripts/release-notes
+++ b/openpower/scripts/release-notes
@@ -124,6 +124,12 @@
     next if $p =~ /^zz$/;
     next if $p =~ /mambo/;
     next if $p =~ /redbud/;
+    next if $p =~ /pseries/;
+    next if $p =~ /witherspoon-redbud/;
+    if ($p =~ /witherspoon-sequoia/) {
+	    $p = "witherspoon";
+	    $witherspoon_insanity = 1;
+    }
     $repos->{"$p-xml"} = { REPO => "http://github.com/open-power/$p-xml" ,
 			   DIR => "openpower/package/$p-xml" };
 }
@@ -148,8 +154,11 @@
 
 if ($witherspoon_insanity) {
     $dbh->do("ALTER TABLE 'end_witherspoon-sequoia_manifest' RENAME to end_witherspoon_manifest");
+    $dbh->do("ALTER TABLE 'begin_witherspoon-sequoia_manifest' RENAME to begin_witherspoon_manifest");
     @end_platforms = grep { $_ != 'witherspoon-sequoia' } @end_platforms;
+    @begin_platforms = grep { $_ != 'witherspoon-sequoia' } @begin_platforms;
     push @end_platforms, 'witherspoon';
+    push @begin_platforms, 'witherspoon';
     push @common_platforms, 'witherspoon';
 }