blob: 2d941286cefdeb8a53c1df3caf9e6656dcda863f [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))
Bill Hoffa5db414e2019-11-22 11:03:45 -06008#HCODE_P10_SITE ?= $(call github,open-power,hcode,$(HCODE_P10_VERSION))
Nick Bofferdingf390b6f2019-10-08 11:55:42 -05009# TODO: Need to comment out above line and enable next two lines
10# once buildable P10 HCODE is available in GHE
Bill Hoffa5db414e2019-11-22 11:03:45 -060011HCODE_P10_SITE ?= git@github.ibm.com:open-power/hcode.git
12HCODE_P10_SITE_METHOD ?= git
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050013HCODE_P10_LICENSE = Apache-2.0
14
15HCODE_P10_INSTALL_IMAGES = YES
16HCODE_P10_INSTALL_TARGET = NO
17
18HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries
19
Bill Hoffa5db414e2019-11-22 11:03:45 -060020HW_IMAGE_BIN_PATH = output/images/hw_image
21HW_IMAGE_BIN_NAME = p10.hw_image.bin
22HCODE_IMAGE_BIN_NAME = p10.ref_image.bin
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050023
24CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
25PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
26PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
27
Bill Hoffa5db414e2019-11-22 11:03:45 -060028###################################
Bill Hoffafbcb7112019-12-13 13:59:49 -060029# P10 Compilation
Bill Hoffa5db414e2019-11-22 11:03:45 -060030
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050031HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
Bill Hoffa5db414e2019-11-22 11:03:45 -060032 LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050033 CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
34 PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Bill Hoffafbcb7112019-12-13 13:59:49 -060035 SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050036 RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
37 CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \
Bill Hoffafbcb7112019-12-13 13:59:49 -060038 CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050039
40define HCODE_P10_INSTALL_IMAGES_CMDS
41 mkdir -p $(STAGING_DIR)/hcode
Bill Hoffa5db414e2019-11-22 11:03:45 -060042 $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050043endef
44
45define HCODE_P10_BUILD_CMDS
Bill Hoffa5db414e2019-11-22 11:03:45 -060046 $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050047endef
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050048
49$(eval $(generic-package))