Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # occ for power10 |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Nick Bofferding | 5b47770 | 2019-10-10 10:37:31 -0500 | [diff] [blame] | 7 | OCC_P10_VERSION = $(call qstrip,$(BR2_OCC_P10_VERSION)) |
Ilya Smirnov | d56cef7 | 2021-06-23 09:34:37 -0500 | [diff] [blame^] | 8 | OCC_P10_SITE ?= $(call github,open-power,occ,$(OCC_P10_VERSION)) |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 9 | |
| 10 | OCC_P10_LICENSE = Apache-2.0 |
| 11 | |
| 12 | OCC_P10_LICENSE_FILES = LICENSE |
| 13 | |
| 14 | OCC_P10_INSTALL_IMAGES = YES |
| 15 | OCC_P10_INSTALL_TARGET = NO |
| 16 | |
| 17 | OCC_P10_STAGING_DIR = $(STAGING_DIR)/occ |
| 18 | |
| 19 | OCC_P10_IMAGE_BIN_PATH = obj/image.bin |
| 20 | |
| 21 | OCC_P10_DEPENDENCIES = host-binutils host-ppe42-gcc |
Nick Bofferding | 5b47770 | 2019-10-10 10:37:31 -0500 | [diff] [blame] | 22 | ifeq ($(BR2_OCC_P10_GPU_BIN_BUILD),y) |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 23 | OCC_P10_DEPENDENCIES += hostboot-binaries |
| 24 | endif |
| 25 | |
| 26 | define OCC_P10_BUILD_CMDS |
Nick Bofferding | 5b47770 | 2019-10-10 10:37:31 -0500 | [diff] [blame] | 27 | if [ "$(BR2_OCC_P10_GPU_BIN_BUILD)" == "y" ]; then \ |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 28 | 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; |
| 34 | endef |
| 35 | |
| 36 | OCC_P10_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9) |
| 37 | |
| 38 | define OCC_P10_INSTALL_IMAGES_CMDS |
| 39 | mkdir -p $(STAGING_DIR)/occ |
Nick Bofferding | 5b47770 | 2019-10-10 10:37:31 -0500 | [diff] [blame] | 40 | cp $(@D)/$(OCC_P10_IMAGE_BIN_PATH) $(OCC_P10_STAGING_DIR)/$(BR2_OCC_P10_BIN_FILENAME) |
Nick Bofferding | f390b6f | 2019-10-08 11:55:42 -0500 | [diff] [blame] | 41 | endef |
| 42 | |
| 43 | $(eval $(generic-package)) |