blob: f35a363c6568a910e7de2e7d424b648a280b7adb [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
21CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
22PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
23PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
24
25HCODE_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
26 LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib OPENPOWER_BUILD=1\
27 CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
28 PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
29 RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
30 CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \
31 CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV)
32
33define HCODE_INSTALL_IMAGES_CMDS
34 mkdir -p $(STAGING_DIR)/hcode
35 $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN)
36endef
37
38define HCODE_BUILD_CMDS
39 $(HCODE_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
40endef
41
42$(eval $(generic-package))