Merge pull request #92 from open-power/master
Merge fixes from master to master-next.
diff --git a/openpower/Config.in b/openpower/Config.in
index 19007fe..19a2859 100644
--- a/openpower/Config.in
+++ b/openpower/Config.in
@@ -8,4 +8,8 @@
endif
endmenu
+menu "Custom Packages"
+source "$BR2_EXTERNAL/custom/Config.in"
+endmenu
+
endmenu
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
index c9de842..c4b7a14 100644
--- a/openpower/configs/firestone_defconfig
+++ b/openpower/configs/firestone_defconfig
@@ -17,13 +17,14 @@
BR2_OPENPOWER_TARGETING_BIN_FILENAME="FIRESTONE_HB.targeting.bin"
BR2_OPENPOWER_TARGETING_ECC_FILENAME="FIRESTONE_HB.targeting.bin.ecc"
+BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
BR2_OPENPOWER_PNOR_FILENAME="firestone.pnor"
# skiboot requirements
BR2_TARGET_SKIBOOT=y
-BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=y
+BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
# petitboot requirements
BR2_ENABLE_LOCALE_PURGE=y
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
index 4ad8ee0..3e5056a 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/habanero_defconfig
@@ -17,13 +17,14 @@
BR2_OPENPOWER_TARGETING_BIN_FILENAME="HABANERO_HB.targeting.bin"
BR2_OPENPOWER_TARGETING_ECC_FILENAME="HABANERO_HB.targeting.bin.ecc"
+BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
BR2_OPENPOWER_PNOR_FILENAME="habanero.pnor"
# skiboot requirements
BR2_TARGET_SKIBOOT=y
-BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=y
+BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
# petitboot requirements
BR2_ENABLE_LOCALE_PURGE=y
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
index 9bde27f..4b2fc24 100644
--- a/openpower/configs/palmetto_defconfig
+++ b/openpower/configs/palmetto_defconfig
@@ -17,13 +17,14 @@
BR2_OPENPOWER_TARGETING_BIN_FILENAME="PALMETTO_HB.targeting.bin"
BR2_OPENPOWER_TARGETING_ECC_FILENAME="PALMETTO_HB.targeting.bin.ecc"
+BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutSingleSide.xml"
BR2_OPENPOWER_PNOR_FILENAME="palmetto.pnor"
# skiboot requirements
BR2_TARGET_SKIBOOT=y
-BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=y
+BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
# petitboot requirements
BR2_ENABLE_LOCALE_PURGE=y
diff --git a/openpower/custom/Config.in b/openpower/custom/Config.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openpower/custom/Config.in
diff --git a/openpower/custom/README b/openpower/custom/README
new file mode 100644
index 0000000..088575f
--- /dev/null
+++ b/openpower/custom/README
@@ -0,0 +1,16 @@
+This directory is for placing custom packages that can be kept separate from
+an upstream op-build. The purpose of this is to make pulling in upstream
+op-build updates much easier, since your customizations will not touch any
+files also modified by op-build changes.
+
+openpower/custom/configs # For machine configs (*_defconfig files)
+ /package # For additional packages.
+ /patches # For patching existing packages.
+
+It is recommended that the layout of the custom/configs and custom/package
+directories follow the layout of the openpower/ peers.
+
+The openpower/custom/patches directory should have subdirectories for each
+package desired to be patched and patch files contained inside. For example
+to add a patch to skiboot you would create:
+ openpower/custom/patches/skiboot/skiboot-0001-example.patch
diff --git a/openpower/custom/configs/.dont_delete_this b/openpower/custom/configs/.dont_delete_this
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openpower/custom/configs/.dont_delete_this
diff --git a/openpower/custom/package/.dont_delete_this b/openpower/custom/package/.dont_delete_this
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openpower/custom/package/.dont_delete_this
diff --git a/openpower/custom/patches/.dont_delete_this b/openpower/custom/patches/.dont_delete_this
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openpower/custom/patches/.dont_delete_this
diff --git a/openpower/external.mk b/openpower/external.mk
index 40f7eae..be628ba 100644
--- a/openpower/external.mk
+++ b/openpower/external.mk
@@ -1 +1,5 @@
include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))
+
+# Utilize user-defined custom directory.
+include $(sort $(wildcard $(BR2_EXTERNAL)/custom/*.mk))
+BR2_GLOBAL_PATCH_DIR += " $(BR2_EXTERNAL)/custom/patches "
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index e844bc1..c0a0dc1 100644
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -7,3 +7,4 @@
source "$BR2_EXTERNAL/package/openpower-pnor/Config.in"
source "$BR2_EXTERNAL/package/p8-pore-binutils/Config.in"
source "$BR2_EXTERNAL/package/occ/Config.in"
+source "$BR2_EXTERNAL/package/capp-ucode/Config.in"
diff --git a/openpower/package/capp-ucode/Config.in b/openpower/package/capp-ucode/Config.in
new file mode 100644
index 0000000..1bdbc23
--- /dev/null
+++ b/openpower/package/capp-ucode/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_CAPP_UCODE
+ bool "capp_capp"
+ default y if (BR2_OPENPOWER_PLATFORM && BR2_powerpc_power8)
+ help
+ Microcode for CAPP hardware
+
+config BR2_CAPP_UCODE_BIN_FILENAME
+ string "Name of CAPP UCODE image file"
+ help
+ String used to define name of the CAPP UCODE binary image file
diff --git a/openpower/package/capp-ucode/capp-ucode.mk b/openpower/package/capp-ucode/capp-ucode.mk
new file mode 100644
index 0000000..a295f60
--- /dev/null
+++ b/openpower/package/capp-ucode/capp-ucode.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# capp-ucode.mk
+#
+################################################################################
+CAPP_UCODE_VERSION ?= e5167a6f534ea3bdc2faef80dc37ee806a3f2eb1
+CAPP_UCODE_SITE ?= $(call github,open-power,capp-ucode,$(CAPP_UCODE_VERSION))
+PETITBOOT_LICENSE = Apache-2.0
+
+CAPP_UCODE_INSTALL_IMAGES = YES
+
+define CAPP_UCODE_BUILD_CMDS
+ cd $(@D) && ./build.sh
+endef
+
+define CAPP_UCODE_INSTALL_IMAGES_CMDS
+ $(INSTALL) $(@D)/cappucode.bin $(BINARIES_DIR)
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 15e4417..a7563d9 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -8,11 +8,21 @@
# make doesn't care for quotes in the dependencies.
XML_PACKAGE=$(subst $\",,$(BR2_OPENPOWER_XML_PACKAGE))
-OPENPOWER_PNOR_VERSION ?= 94389f62eabecf00ef129b4184bf4ba2bc9cd193
+OPENPOWER_PNOR_VERSION ?= 6523442e4ced0f5866654b715d6debbb8b88d890
OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
OPENPOWER_PNOR_LICENSE = Apache-2.0
-OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries $(XML_PACKAGE) skiboot host-openpower-ffs occ
+OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries $(XML_PACKAGE) skiboot host-openpower-ffs occ capp-ucode
+
+ifeq ($(BR2_TARGET_SKIBOOT_EMBED_PAYLOAD),n)
+
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+OPENPOWER_PNOR_DEPENDENCIES += linux26-rebuild-with-initramfs
+else
+OPENPOWER_PNOR_DEPENDENCIES += linux
+endif
+
+endif
OPENPOWER_PNOR_INSTALL_IMAGES = YES
OPENPOWER_PNOR_INSTALL_TARGET = NO
@@ -33,7 +43,8 @@
-targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \
-sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
-sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
- -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME)
+ -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \
+ -capp_binary_filename $(BINARIES_DIR)/$(BR2_CAPP_UCODE_BIN_FILENAME)
mkdir -p $(STAGING_DIR)/pnor/
$(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \
@@ -43,6 +54,7 @@
-scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
-outdir $(STAGING_DIR)/pnor/ \
-payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \
+ -bootkernel $(BINARIES_DIR)/$(LINUX_IMAGE_NAME) \
-sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
-sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
-occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \