blob: 39ad15e8599341be4a0c01262349c86653a8a9cd [file] [log] [blame]
Brian Silvercb565552014-12-11 12:51:36 -06001################################################################################
2#
Stewart Smith03671c02017-02-17 14:57:57 +11003# occ for POWER9
Brian Silvercb565552014-12-11 12:51:36 -06004#
5################################################################################
6
Stewart Smith2f718e42018-05-02 01:47:29 -05007OCC_VERSION = $(call qstrip,$(BR2_OCC_VERSION))
8OCC_SITE = $(call github,open-power,occ,$(OCC_VERSION))
Matt Ploetzeaf71dc2016-09-01 18:28:19 -05009
Brian Silvercb565552014-12-11 12:51:36 -060010OCC_LICENSE = Apache-2.0
William Bryan849c6692017-03-24 14:44:06 -050011
Stewart Smith03671c02017-02-17 14:57:57 +110012OCC_LICENSE_FILES = LICENSE
Brian Silvercb565552014-12-11 12:51:36 -060013
14OCC_INSTALL_IMAGES = YES
15OCC_INSTALL_TARGET = NO
16
17OCC_STAGING_DIR = $(STAGING_DIR)/occ
18
Stewart Smith03671c02017-02-17 14:57:57 +110019OCC_IMAGE_BIN_PATH = obj/image.bin
Matt Ploetzeaf71dc2016-09-01 18:28:19 -050020
Stewart Smith03671c02017-02-17 14:57:57 +110021OCC_DEPENDENCIES = host-binutils host-ppe42-gcc
Stewart Smith6af76632018-04-27 06:45:42 +100022ifeq ($(BR2_OCC_GPU_BIN_BUILD),y)
Stewart Smith03671c02017-02-17 14:57:57 +110023 OCC_DEPENDENCIES += hostboot-binaries
Stewart Smith6af76632018-04-27 06:45:42 +100024endif
Matt Ploetzeaf71dc2016-09-01 18:28:19 -050025
Stewart Smith03671c02017-02-17 14:57:57 +110026define OCC_BUILD_CMDS
Bill Hoffafbd4fbf2017-10-10 20:41:22 -050027 if [ "$(BR2_OCC_GPU_BIN_BUILD)" == "y" ]; then \
Bill Hoffa11a23f22017-10-03 07:58:12 -050028 cd $(@D)/src && \
Bill Hoffafbd4fbf2017-10-10 20:41:22 -050029 make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib GPE1_BIN_IMAGE_PATH=$(STAGING_DIR)/hostboot_binaries/ OPOCC_GPU_SUPPORT=1 all; \
Bill Hoffa11a23f22017-10-03 07:58:12 -050030 else \
31 cd $(@D)/src && \
32 make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib all; \
33 fi;
Matt Ploetzeaf71dc2016-09-01 18:28:19 -050034endef
Stewart Smith03671c02017-02-17 14:57:57 +110035OCC_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9)
Brian Silvercb565552014-12-11 12:51:36 -060036
37define OCC_INSTALL_IMAGES_CMDS
38 mkdir -p $(STAGING_DIR)/occ
Matt Ploetzeaf71dc2016-09-01 18:28:19 -050039 cp $(@D)/$(OCC_IMAGE_BIN_PATH) $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME)
Brian Silvercb565552014-12-11 12:51:36 -060040endef
41
42$(eval $(generic-package))