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)) |
Ilya Smirnov | d56cef7 | 2021-06-23 09:34:37 -0500 | [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 | HCODE_P10_LICENSE = Apache-2.0 |
| 10 | |
| 11 | HCODE_P10_INSTALL_IMAGES = YES |
| 12 | HCODE_P10_INSTALL_TARGET = NO |
| 13 | |
| 14 | HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries |
| 15 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 16 | HW_IMAGE_BIN_PATH = output/images/hw_image |
| 17 | HW_IMAGE_BIN_NAME = p10.hw_image.bin |
| 18 | HCODE_IMAGE_BIN_NAME = p10.ref_image.bin |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 19 | |
| 20 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) |
| 21 | PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH) |
| 22 | PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi- |
| 23 | |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 24 | ################################### |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 25 | # P10 Compilation |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 26 | |
Klaus Heinrich Kiwi | d255124 | 2020-07-16 16:59:04 -0300 | [diff] [blame] | 27 | ifeq ($(BR2_PACKAGE_OPENPOWER_PNOR_P10),y) |
| 28 | BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_P10_BINARY_IONV_FILENAME) |
| 29 | else |
| 30 | BINARY_IONV_FILENAME=$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) |
| 31 | endif |
| 32 | |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 33 | 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] | 34 | LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 35 | CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \ |
| 36 | PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 37 | SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 38 | RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \ |
Klaus Heinrich Kiwi | d255124 | 2020-07-16 16:59:04 -0300 | [diff] [blame] | 39 | CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BINARY_IONV_FILENAME) \ |
Bill Hoffa | fbcb711 | 2019-12-13 13:59:49 -0600 | [diff] [blame] | 40 | CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1 |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 41 | |
| 42 | define HCODE_P10_INSTALL_IMAGES_CMDS |
| 43 | mkdir -p $(STAGING_DIR)/hcode |
Bill Hoffa | 5db414e | 2019-11-22 11:03:45 -0600 | [diff] [blame] | 44 | $(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] | 45 | endef |
| 46 | |
| 47 | define HCODE_P10_BUILD_CMDS |
Nicholas E Bofferding | f5c8057 | 2021-01-05 08:50:08 -0600 | [diff] [blame] | 48 | $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) ' |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 49 | endef |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 50 | |
| 51 | $(eval $(generic-package)) |