HCODE Build Infrastructure Changes for P10

  - Remove HCODE Binary Override Mechanism
  - Remove use of ECMD in build process
  - Add OPENPOWER_BUILD=1 back to HCODE compilation setup
  - Include patch to allow for override of SELF_REST_PREFIX in HCODE Makefiles
diff --git a/openpower/package/hcode-p10/hcode-p10.mk b/openpower/package/hcode-p10/hcode-p10.mk
index 10f2b59..2d94128 100644
--- a/openpower/package/hcode-p10/hcode-p10.mk
+++ b/openpower/package/hcode-p10/hcode-p10.mk
@@ -26,24 +26,16 @@
 PPE_PREFIX    ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
 
 ###################################
-# P10 Workaround
-ifeq ($(BR2_HOSTBOOT_BINARIES_USE_HCODE_BIN),y)
+# P10 Compilation
 
-define HCODE_P10_INSTALL_IMAGES_CMDS
-    mkdir -p $(STAGING_DIR)/hcode
-    $(INSTALL) -D $(STAGING_DIR)/hostboot_binaries/$(HCODE_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
-endef
-
-else
-
-#TODO In the future use OPENPOWER_BUILD=1 to avoid all IBM-internal make functionality (afs, etc)
 HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
 	LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
 	CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
 	PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
+        SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
 	RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
 	CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \
-	CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV)
+	CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1
 
 define HCODE_P10_INSTALL_IMAGES_CMDS
 	mkdir -p $(STAGING_DIR)/hcode
@@ -53,6 +45,5 @@
 define HCODE_P10_BUILD_CMDS
 	$(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
 endef
-endif
 
 $(eval $(generic-package))
diff --git a/openpower/package/hostboot-binaries/hostboot_binaries.mk b/openpower/package/hostboot-binaries/hostboot_binaries.mk
index bd22b3a..5402076 100644
--- a/openpower/package/hostboot-binaries/hostboot_binaries.mk
+++ b/openpower/package/hostboot-binaries/hostboot_binaries.mk
@@ -59,19 +59,8 @@
 endif
 
 ###################################
-# P10 Workaround
-ifeq ($(BR2_HOSTBOOT_BINARIES_USE_HCODE_BIN),y)
-
-HCODE_BIN_FILE=p10.ref_image.bin
-
-define HOSTBOOT_BINARIES_INSTALL_IMAGES_CMDS
-    $(INSTALL) -D $(@D)/gpu_gpe1.bin  $(STAGING_DIR)/hostboot_binaries/gpu_gpe1.bin
-    $(INSTALL) -D $(@D)/$(HCODE_BIN_FILE) $(STAGING_DIR)/hostboot_binaries/$(HCODE_BIN_FILE)
-    $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME)  $(STAGING_DIR)/hostboot_binaries/
-    $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) $(STAGING_DIR)/hostboot_binaries/
-endef
-
-else ifeq ($(BR2_OPENPOWER_POWER10),y)
+# P10:
+ifeq ($(BR2_OPENPOWER_POWER10),y)
 
 P10_RING_DYNAMIC_FILE=p10.hw.dynamic.bin
 P10_RING_OVERLAYS_FILE=p10.hw.overlays.bin