Richard J. Knight | 3f0e29c | 2017-10-13 10:39:01 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # HCODE |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Stewart Smith | 5fb8a33 | 2018-04-26 18:11:38 +1000 | [diff] [blame] | 7 | HCODE_VERSION = $(call qstrip,$(BR2_HCODE_VERSION)) |
Richard J. Knight | 3f0e29c | 2017-10-13 10:39:01 -0500 | [diff] [blame] | 8 | HCODE_SITE = $(call github,open-power,hcode,$(HCODE_VERSION)) |
| 9 | |
| 10 | HCODE_LICENSE = Apache-2.0 |
| 11 | |
| 12 | HCODE_INSTALL_IMAGES = YES |
| 13 | HCODE_INSTALL_TARGET = NO |
| 14 | |
| 15 | HCODE_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries |
| 16 | |
| 17 | HW_IMAGE_BIN_PATH=output/images/hw_image |
| 18 | HW_IMAGE_BIN=p9n.hw_image.bin |
| 19 | HCODE_IMAGE_BIN = p9n.ref_image.bin |
| 20 | |
Mike Baiocchi | 3652aea | 2019-05-07 10:13:21 -0500 | [diff] [blame] | 21 | HW_AXONE_IMAGE_BIN=p9a.hw_image.bin |
| 22 | HCODE_AXONE_IMAGE_BIN = p9a.ref_image.bin |
| 23 | |
Richard J. Knight | 3f0e29c | 2017-10-13 10:39:01 -0500 | [diff] [blame] | 24 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) |
| 25 | PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH) |
| 26 | PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi- |
| 27 | |
| 28 | HCODE_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \ |
| 29 | LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib OPENPOWER_BUILD=1\ |
| 30 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \ |
| 31 | PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
| 32 | RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \ |
| 33 | CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \ |
| 34 | CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) |
| 35 | |
| 36 | define HCODE_INSTALL_IMAGES_CMDS |
| 37 | mkdir -p $(STAGING_DIR)/hcode |
| 38 | $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN) |
Mike Baiocchi | 3652aea | 2019-05-07 10:13:21 -0500 | [diff] [blame] | 39 | $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_AXONE_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_AXONE_IMAGE_BIN) |
Richard J. Knight | 3f0e29c | 2017-10-13 10:39:01 -0500 | [diff] [blame] | 40 | endef |
| 41 | |
| 42 | define HCODE_BUILD_CMDS |
| 43 | $(HCODE_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) ' |
| 44 | endef |
| 45 | |
| 46 | $(eval $(generic-package)) |