blob: 469b98f2c0a346552fbabd648c4135c869e96383 [file] [log] [blame]
Nick Bofferdingf390b6f2019-10-08 11:55:42 -05001################################################################################
2#
3# HCODE for P10
4#
5################################################################################
6
7HCODE_P10_VERSION = $(call qstrip,$(BR2_HCODE_P10_VERSION))
Ilya Smirnovd56cef72021-06-23 09:34:37 -05008HCODE_P10_SITE ?= $(call github,open-power,hcode,$(HCODE_P10_VERSION))
Nick Bofferdingf390b6f2019-10-08 11:55:42 -05009HCODE_P10_LICENSE = Apache-2.0
10
11HCODE_P10_INSTALL_IMAGES = YES
12HCODE_P10_INSTALL_TARGET = NO
13
14HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries
15
Bill Hoffa5db414e2019-11-22 11:03:45 -060016HW_IMAGE_BIN_PATH = output/images/hw_image
17HW_IMAGE_BIN_NAME = p10.hw_image.bin
18HCODE_IMAGE_BIN_NAME = p10.ref_image.bin
premjha2@in.ibm.com5ac33662023-03-27 01:38:50 -050019QME20_TREXSTRING_PATH=hcode/qme_p10dd20/
20XGPE20_TREXSTRING_PATH=hcode/xgpe_p10dd20/
21PGPE20_TREXSTRING_PATH=hcode/pgpe_p10dd20/
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050022
23CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
24PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
25PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
26
Bill Hoffa5db414e2019-11-22 11:03:45 -060027###################################
Bill Hoffafbcb7112019-12-13 13:59:49 -060028# P10 Compilation
Bill Hoffa5db414e2019-11-22 11:03:45 -060029
Klaus Heinrich Kiwid2551242020-07-16 16:59:04 -030030ifeq ($(BR2_PACKAGE_OPENPOWER_PNOR_P10),y)
31BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_P10_BINARY_IONV_FILENAME)
32else
33BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_BINARY_IONV_FILENAME)
34endif
35
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050036HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
Bill Hoffa5db414e2019-11-22 11:03:45 -060037 LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050038 CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
39 PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Bill Hoffafbcb7112019-12-13 13:59:49 -060040 SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050041 RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
Klaus Heinrich Kiwid2551242020-07-16 16:59:04 -030042 CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BINARY_IONV_FILENAME) \
Bill Hoffafbcb7112019-12-13 13:59:49 -060043 CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050044
premjha2@in.ibm.com5ac33662023-03-27 01:38:50 -050045
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050046define HCODE_P10_INSTALL_IMAGES_CMDS
47 mkdir -p $(STAGING_DIR)/hcode
premjha2@in.ibm.com5ac33662023-03-27 01:38:50 -050048 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 Hoffa5db414e2019-11-22 11:03:45 -060054 $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050055endef
56
57define HCODE_P10_BUILD_CMDS
Nicholas E Bofferdingf5c80572021-01-05 08:50:08 -060058 $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050059endef
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050060
premjha2@in.ibm.com5ac33662023-03-27 01:38:50 -050061
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050062$(eval $(generic-package))