Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # HCODE for P10 |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
| 7 | HCODE_P10_VERSION = $(call qstrip,$(BR2_HCODE_P10_VERSION)) |
Ilya Smirnov | d56cef7 | 2021-06-23 09:34:37 -0500 | [diff] [blame] | 8 | HCODE_P10_SITE ?= $(call github,open-power,hcode,$(HCODE_P10_VERSION)) |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 9 | HCODE_P10_LICENSE = Apache-2.0 |
| 10 | |
| 11 | HCODE_P10_INSTALL_IMAGES = YES |
| 12 | HCODE_P10_INSTALL_TARGET = NO |
| 13 | |
| 14 | HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries |
| 15 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 16 | HW_IMAGE_BIN_PATH = output/images/hw_image |
| 17 | HW_IMAGE_BIN_NAME = p10.hw_image.bin |
| 18 | HCODE_IMAGE_BIN_NAME = p10.ref_image.bin |
premjha2@in.ibm.com | 5ac3366 | 2023-03-27 01:38:50 -0500 | [diff] [blame] | 19 | QME20_TREXSTRING_PATH=hcode/qme_p10dd20/ |
| 20 | XGPE20_TREXSTRING_PATH=hcode/xgpe_p10dd20/ |
| 21 | PGPE20_TREXSTRING_PATH=hcode/pgpe_p10dd20/ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 22 | |
| 23 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) |
| 24 | PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH) |
| 25 | PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi- |
| 26 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 27 | ################################### |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 28 | # P10 Compilation |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 29 | |
Klaus Heinrich Kiwi | d255124 | 2020-07-16 16:59:04 -0300 | [diff] [blame] | 30 | ifeq ($(BR2_PACKAGE_OPENPOWER_PNOR_P10),y) |
| 31 | BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_P10_BINARY_IONV_FILENAME) |
| 32 | else |
| 33 | BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) |
| 34 | endif |
| 35 | |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 36 | HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \ |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 37 | LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 38 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \ |
| 39 | PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 40 | SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 41 | RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \ |
Klaus Heinrich Kiwi | d255124 | 2020-07-16 16:59:04 -0300 | [diff] [blame] | 42 | CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BINARY_IONV_FILENAME) \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 43 | CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1 |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 44 | |
premjha2@in.ibm.com | 5ac3366 | 2023-03-27 01:38:50 -0500 | [diff] [blame] | 45 | |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 46 | define HCODE_P10_INSTALL_IMAGES_CMDS |
| 47 | mkdir -p $(STAGING_DIR)/hcode |
premjha2@in.ibm.com | 5ac3366 | 2023-03-27 01:38:50 -0500 | [diff] [blame] | 48 | mkdir -p $(STAGING_DIR)/$(QME20_TREXSTRING_PATH) |
| 49 | mkdir -p $(STAGING_DIR)/$(XGPE20_TREXSTRING_PATH) |
| 50 | mkdir -p $(STAGING_DIR)/$(PGPE20_TREXSTRING_PATH) |
| 51 | $(INSTALL) $(@D)/output/images/qme_p10dd20/trexStringFile $(STAGING_DIR)/$(QME20_TREXSTRING_PATH) |
| 52 | $(INSTALL) $(@D)/output/images/xgpe_p10dd20/trexStringFile $(STAGING_DIR)/$(XGPE20_TREXSTRING_PATH) |
| 53 | $(INSTALL) $(@D)/output/images/pgpe_p10dd20/trexStringFile $(STAGING_DIR)/$(PGPE20_TREXSTRING_PATH) |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 54 | $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME) |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 55 | endef |
| 56 | |
| 57 | define HCODE_P10_BUILD_CMDS |
Nicholas E Bofferding | f5c8057 | 2021-01-05 08:50:08 -0600 | [diff] [blame] | 58 | $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) ' |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 59 | endef |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 60 | |
premjha2@in.ibm.com | 5ac3366 | 2023-03-27 01:38:50 -0500 | [diff] [blame] | 61 | |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 62 | $(eval $(generic-package)) |