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)) |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [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 | # TODO: Need to comment out above line and enable next two lines |
| 10 | # once buildable P10 HCODE is available in GHE |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 11 | HCODE_P10_SITE ?= git@github.ibm.com:open-power/hcode.git |
| 12 | HCODE_P10_SITE_METHOD ?= git |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 13 | HCODE_P10_LICENSE = Apache-2.0 |
| 14 | |
| 15 | HCODE_P10_INSTALL_IMAGES = YES |
| 16 | HCODE_P10_INSTALL_TARGET = NO |
| 17 | |
| 18 | HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries |
| 19 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 20 | HW_IMAGE_BIN_PATH = output/images/hw_image |
| 21 | HW_IMAGE_BIN_NAME = p10.hw_image.bin |
| 22 | HCODE_IMAGE_BIN_NAME = p10.ref_image.bin |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 23 | |
| 24 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) |
| 25 | PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH) |
| 26 | PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi- |
| 27 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 28 | ################################### |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 29 | # P10 Compilation |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 30 | |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 31 | 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] | 32 | LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 33 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \ |
| 34 | PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 35 | SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 36 | RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \ |
| 37 | CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 38 | CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1 |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 39 | |
| 40 | define HCODE_P10_INSTALL_IMAGES_CMDS |
| 41 | mkdir -p $(STAGING_DIR)/hcode |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 42 | $(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] | 43 | endef |
| 44 | |
| 45 | define HCODE_P10_BUILD_CMDS |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 46 | $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) ' |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 47 | endef |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 48 | |
| 49 | $(eval $(generic-package)) |