Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 3 | # occ for POWER9 |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 4 | # |
| 5 | ################################################################################ |
| 6 | |
Stewart Smith | 2f718e4 | 2018-05-02 01:47:29 -0500 | [diff] [blame] | 7 | OCC_VERSION = $(call qstrip,$(BR2_OCC_VERSION)) |
| 8 | OCC_SITE = $(call github,open-power,occ,$(OCC_VERSION)) |
Matt Ploetz | eaf71dc | 2016-09-01 18:28:19 -0500 | [diff] [blame] | 9 | |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 10 | OCC_LICENSE = Apache-2.0 |
William Bryan | 849c669 | 2017-03-24 14:44:06 -0500 | [diff] [blame] | 11 | |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 12 | OCC_LICENSE_FILES = LICENSE |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 13 | |
| 14 | OCC_INSTALL_IMAGES = YES |
| 15 | OCC_INSTALL_TARGET = NO |
| 16 | |
| 17 | OCC_STAGING_DIR = $(STAGING_DIR)/occ |
| 18 | |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 19 | OCC_IMAGE_BIN_PATH = obj/image.bin |
Matt Ploetz | eaf71dc | 2016-09-01 18:28:19 -0500 | [diff] [blame] | 20 | |
Klaus Heinrich Kiwi | 3e6e835 | 2020-04-14 16:06:01 -0300 | [diff] [blame] | 21 | OCC_DEPENDENCIES = host-ppe42-gcc |
Stewart Smith | 6af7663 | 2018-04-27 06:45:42 +1000 | [diff] [blame] | 22 | ifeq ($(BR2_OCC_GPU_BIN_BUILD),y) |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 23 | OCC_DEPENDENCIES += hostboot-binaries |
Stewart Smith | 6af7663 | 2018-04-27 06:45:42 +1000 | [diff] [blame] | 24 | endif |
Matt Ploetz | eaf71dc | 2016-09-01 18:28:19 -0500 | [diff] [blame] | 25 | |
Klaus Heinrich Kiwi | 3e6e835 | 2020-04-14 16:06:01 -0300 | [diff] [blame] | 26 | ifeq ($(BR2_OCC_USE_ALTERNATE_GCC),y) |
| 27 | OCC_TARGET_CROSS = $(HOST_DIR)/alternate-toolchain/bin/$(GNU_TARGET_NAME)- |
| 28 | OCC_DEPENDENCIES += host-alternate-gcc |
| 29 | else |
| 30 | OCC_TARGET_CROSS = $(TARGET_CROSS) |
| 31 | OCC_DEPENDENCIES += host-binutils |
| 32 | endif |
| 33 | |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 34 | define OCC_BUILD_CMDS |
Bill Hoffa | fbd4fbf | 2017-10-10 20:41:22 -0500 | [diff] [blame] | 35 | if [ "$(BR2_OCC_GPU_BIN_BUILD)" == "y" ]; then \ |
Bill Hoffa | 11a23f2 | 2017-10-03 07:58:12 -0500 | [diff] [blame] | 36 | cd $(@D)/src && \ |
Klaus Heinrich Kiwi | 3e6e835 | 2020-04-14 16:06:01 -0300 | [diff] [blame] | 37 | make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(OCC_TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib GPE1_BIN_IMAGE_PATH=$(STAGING_DIR)/hostboot_binaries/ OPOCC_GPU_SUPPORT=1 all; \ |
Bill Hoffa | 11a23f2 | 2017-10-03 07:58:12 -0500 | [diff] [blame] | 38 | else \ |
| 39 | cd $(@D)/src && \ |
Klaus Heinrich Kiwi | 3e6e835 | 2020-04-14 16:06:01 -0300 | [diff] [blame] | 40 | make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(OCC_TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib all; \ |
Bill Hoffa | 11a23f2 | 2017-10-03 07:58:12 -0500 | [diff] [blame] | 41 | fi; |
Matt Ploetz | eaf71dc | 2016-09-01 18:28:19 -0500 | [diff] [blame] | 42 | endef |
Stewart Smith | 03671c0 | 2017-02-17 14:57:57 +1100 | [diff] [blame] | 43 | OCC_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9) |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 44 | |
| 45 | define OCC_INSTALL_IMAGES_CMDS |
| 46 | mkdir -p $(STAGING_DIR)/occ |
Matt Ploetz | eaf71dc | 2016-09-01 18:28:19 -0500 | [diff] [blame] | 47 | cp $(@D)/$(OCC_IMAGE_BIN_PATH) $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 48 | endef |
| 49 | |
| 50 | $(eval $(generic-package)) |