blob: fa6016789e9ac239a1d0683e5df50f1400819b6a [file] [log] [blame]
Nick Bofferdingf390b6f2019-10-08 11:55:42 -05001################################################################################
2#
3# occ for power10
4#
5################################################################################
6
Nick Bofferding5b477702019-10-10 10:37:31 -05007OCC_P10_VERSION = $(call qstrip,$(BR2_OCC_P10_VERSION))
Ilya Smirnovd56cef72021-06-23 09:34:37 -05008OCC_P10_SITE ?= $(call github,open-power,occ,$(OCC_P10_VERSION))
Nick Bofferdingf390b6f2019-10-08 11:55:42 -05009
10OCC_P10_LICENSE = Apache-2.0
11
12OCC_P10_LICENSE_FILES = LICENSE
13
14OCC_P10_INSTALL_IMAGES = YES
15OCC_P10_INSTALL_TARGET = NO
16
17OCC_P10_STAGING_DIR = $(STAGING_DIR)/occ
18
19OCC_P10_IMAGE_BIN_PATH = obj/image.bin
20
21OCC_P10_DEPENDENCIES = host-binutils host-ppe42-gcc
Nick Bofferding5b477702019-10-10 10:37:31 -050022ifeq ($(BR2_OCC_P10_GPU_BIN_BUILD),y)
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050023 OCC_P10_DEPENDENCIES += hostboot-binaries
24endif
25
26define OCC_P10_BUILD_CMDS
Nick Bofferding5b477702019-10-10 10:37:31 -050027 if [ "$(BR2_OCC_P10_GPU_BIN_BUILD)" == "y" ]; then \
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050028 cd $(@D)/src && \
29 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; \
30 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;
34endef
35
36OCC_P10_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9)
37
38define OCC_P10_INSTALL_IMAGES_CMDS
39 mkdir -p $(STAGING_DIR)/occ
Nick Bofferding5b477702019-10-10 10:37:31 -050040 cp $(@D)/$(OCC_P10_IMAGE_BIN_PATH) $(OCC_P10_STAGING_DIR)/$(BR2_OCC_P10_BIN_FILENAME)
Nick Bofferdingf390b6f2019-10-08 11:55:42 -050041endef
42
43$(eval $(generic-package))