blob: c97d54aaf5771409efe8708c5cef1dd71d38a9fc [file] [log] [blame]
Richard J. Knight3f0e29c2017-10-13 10:39:01 -05001################################################################################
2#
3# HCODE
4#
5################################################################################
6
Stewart Smith5fb8a332018-04-26 18:11:38 +10007HCODE_VERSION = $(call qstrip,$(BR2_HCODE_VERSION))
Richard J. Knight3f0e29c2017-10-13 10:39:01 -05008HCODE_SITE = $(call github,open-power,hcode,$(HCODE_VERSION))
9
10HCODE_LICENSE = Apache-2.0
11
12HCODE_INSTALL_IMAGES = YES
13HCODE_INSTALL_TARGET = NO
14
15HCODE_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries
16
17HW_IMAGE_BIN_PATH=output/images/hw_image
18HW_IMAGE_BIN=p9n.hw_image.bin
19HCODE_IMAGE_BIN = p9n.ref_image.bin
20
Mike Baiocchi3652aea2019-05-07 10:13:21 -050021HW_AXONE_IMAGE_BIN=p9a.hw_image.bin
22HCODE_AXONE_IMAGE_BIN = p9a.ref_image.bin
23
Richard J. Knight3f0e29c2017-10-13 10:39:01 -050024CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
25PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
26PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
27
28HCODE_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
36define 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 Baiocchi3652aea2019-05-07 10:13:21 -050039 $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_AXONE_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_AXONE_IMAGE_BIN)
Richard J. Knight3f0e29c2017-10-13 10:39:01 -050040endef
41
42define HCODE_BUILD_CMDS
43 $(HCODE_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
44endef
45
46$(eval $(generic-package))