blob: 3d3eda620788688264383650c2836e22982dda9c [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
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050019
20CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
21PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
22PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
23
Bill Hoffa5db414e2019-11-22 11:03:45 -060024###################################
Bill Hoffafbcb7112019-12-13 13:59:49 -060025# P10 Compilation
Bill Hoffa5db414e2019-11-22 11:03:45 -060026
Klaus Heinrich Kiwid2551242020-07-16 16:59:04 -030027ifeq ($(BR2_PACKAGE_OPENPOWER_PNOR_P10),y)
28BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_P10_BINARY_IONV_FILENAME)
29else
30BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_BINARY_IONV_FILENAME)
31endif
32
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050033HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
Bill Hoffa5db414e2019-11-22 11:03:45 -060034 LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050035 CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
36 PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Bill Hoffafbcb7112019-12-13 13:59:49 -060037 SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050038 RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
Klaus Heinrich Kiwid2551242020-07-16 16:59:04 -030039 CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BINARY_IONV_FILENAME) \
Bill Hoffafbcb7112019-12-13 13:59:49 -060040 CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050041
42define HCODE_P10_INSTALL_IMAGES_CMDS
43 mkdir -p $(STAGING_DIR)/hcode
Bill Hoffa5db414e2019-11-22 11:03:45 -060044 $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050045endef
46
47define HCODE_P10_BUILD_CMDS
Nicholas E Bofferdingf5c80572021-01-05 08:50:08 -060048 $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050049endef
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050050
51$(eval $(generic-package))