Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # hostboot |
| 4 | # |
| 5 | ################################################################################ |
hostboot | 89cd7e1 | 2017-02-14 00:07:50 -0600 | [diff] [blame] | 6 | HOSTBOOT_VERSION_BRANCH_MASTER_P8 ?= fe5c556993ce24fae1f70f6be9a071fbd89e616c |
hostboot | ddfda76 | 2017-02-28 00:07:18 -0600 | [diff] [blame^] | 7 | HOSTBOOT_VERSION_BRANCH_MASTER ?= 74c9defa9de6733109203d0eadb5684891ffe5a0 |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 8 | |
Matt Ploetz | 3a184dd | 2016-08-26 17:21:06 -0500 | [diff] [blame] | 9 | HOSTBOOT_VERSION ?= $(if $(BR2_OPENPOWER_POWER9),$(HOSTBOOT_VERSION_BRANCH_MASTER),$(HOSTBOOT_VERSION_BRANCH_MASTER_P8)) |
Nick Bofferding | 7b463b1 | 2014-11-07 14:27:33 -0600 | [diff] [blame] | 10 | HOSTBOOT_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_VERSION)) |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 11 | |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 12 | HOSTBOOT_LICENSE = Apache-2.0 |
Stewart Smith | b16ba5b | 2017-01-10 12:55:55 +1100 | [diff] [blame] | 13 | HOSTBOOT_LICENSE_FILES = LICENSE |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 14 | HOSTBOOT_DEPENDENCIES = host-binutils |
| 15 | |
| 16 | HOSTBOOT_INSTALL_IMAGES = YES |
| 17 | HOSTBOOT_INSTALL_TARGET = NO |
| 18 | |
| 19 | HOSTBOOT_ENV_VARS=$(TARGET_MAKE_ENV) \ |
Joel Stanley | 5ab5fdb | 2016-10-31 23:10:24 +1030 | [diff] [blame] | 20 | CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hostboot/$(BR2_HOSTBOOT_CONFIG_FILE) \ |
Stephen Cprek | e7254c7 | 2015-02-19 14:33:38 -0600 | [diff] [blame] | 21 | OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \ |
Matt Ploetz | 3a184dd | 2016-08-26 17:21:06 -0500 | [diff] [blame] | 22 | HOSTBOOT_VERSION=`cat $(HOSTBOOT_VERSION_FILE)` |
| 23 | |
| 24 | define HOSTBOOT_APPLY_PATCHES |
| 25 | if [ "$(BR2_OPENPOWER_POWER9)" == "y" ]; then \ |
Joel Stanley | 5ab5fdb | 2016-10-31 23:10:24 +1030 | [diff] [blame] | 26 | $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/hostboot/p9Patches \*.patch; \ |
| 27 | if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p9Patches ]; then \ |
| 28 | $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p9Patches \*.patch; \ |
Matt Ploetz | 3a184dd | 2016-08-26 17:21:06 -0500 | [diff] [blame] | 29 | fi; \ |
| 30 | fi; \ |
| 31 | if [ "$(BR2_OPENPOWER_POWER8)" == "y" ]; then \ |
Joel Stanley | 5ab5fdb | 2016-10-31 23:10:24 +1030 | [diff] [blame] | 32 | $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/hostboot/p8Patches \*.patch; \ |
| 33 | if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p8Patches ]; then \ |
| 34 | $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p8Patches \*.patch; \ |
Matt Ploetz | 3a184dd | 2016-08-26 17:21:06 -0500 | [diff] [blame] | 35 | fi; \ |
| 36 | fi; |
| 37 | endef |
| 38 | |
| 39 | HOSTBOOT_POST_PATCH_HOOKS += HOSTBOOT_APPLY_PATCHES |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 40 | |
| 41 | define HOSTBOOT_BUILD_CMDS |
Brian Silver | 6a3264f | 2014-07-07 13:04:22 -0500 | [diff] [blame] | 42 | $(HOSTBOOT_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)' |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 43 | endef |
| 44 | |
| 45 | define HOSTBOOT_INSTALL_IMAGES_CMDS |
Stephen Cprek | 2cf08e2 | 2016-07-13 10:38:12 -0500 | [diff] [blame] | 46 | cd $(@D) && source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/ |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 47 | endef |
| 48 | |
| 49 | $(eval $(generic-package)) |