blob: c865510345ff185b276c7a85a3f7b852a9b7a7e5 [file] [log] [blame]
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05001################################################################################
2#
3# hostboot
4#
5################################################################################
hostboot81485302018-01-05 14:20:53 -06006HOSTBOOT_VERSION_BRANCH_MASTER_P8 ?= d3025f5d7ddd0723946bb54fcb471d2bf1fd2da4
hostboot599fe042018-04-16 01:09:22 -05007HOSTBOOT_VERSION_BRANCH_MASTER ?= 15777e178a40228e43bb981942ef0661956e08f8
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05008
Matt Ploetz3a184dd2016-08-26 17:21:06 -05009HOSTBOOT_VERSION ?= $(if $(BR2_OPENPOWER_POWER9),$(HOSTBOOT_VERSION_BRANCH_MASTER),$(HOSTBOOT_VERSION_BRANCH_MASTER_P8))
Nick Bofferding7b463b12014-11-07 14:27:33 -060010HOSTBOOT_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_VERSION))
Brian Silver015b5912014-08-07 15:50:15 -050011
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050012HOSTBOOT_LICENSE = Apache-2.0
Stewart Smithb16ba5b2017-01-10 12:55:55 +110013HOSTBOOT_LICENSE_FILES = LICENSE
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050014HOSTBOOT_DEPENDENCIES = host-binutils
15
16HOSTBOOT_INSTALL_IMAGES = YES
17HOSTBOOT_INSTALL_TARGET = NO
18
19HOSTBOOT_ENV_VARS=$(TARGET_MAKE_ENV) \
Joel Stanley5ab5fdb2016-10-31 23:10:24 +103020 CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hostboot/$(BR2_HOSTBOOT_CONFIG_FILE) \
Stephen Cpreke7254c72015-02-19 14:33:38 -060021 OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
Matt Ploetz3a184dd2016-08-26 17:21:06 -050022 HOSTBOOT_VERSION=`cat $(HOSTBOOT_VERSION_FILE)`
23
24define HOSTBOOT_APPLY_PATCHES
25 if [ "$(BR2_OPENPOWER_POWER9)" == "y" ]; then \
Joel Stanley5ab5fdb2016-10-31 23:10:24 +103026 $(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 Ploetz3a184dd2016-08-26 17:21:06 -050029 fi; \
30 fi; \
31 if [ "$(BR2_OPENPOWER_POWER8)" == "y" ]; then \
Joel Stanley5ab5fdb2016-10-31 23:10:24 +103032 $(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 Ploetz3a184dd2016-08-26 17:21:06 -050035 fi; \
36 fi;
37endef
38
39HOSTBOOT_POST_PATCH_HOOKS += HOSTBOOT_APPLY_PATCHES
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050040
41define HOSTBOOT_BUILD_CMDS
Brian Silver6a3264f2014-07-07 13:04:22 -050042 $(HOSTBOOT_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)'
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050043endef
44
45define HOSTBOOT_INSTALL_IMAGES_CMDS
Stephen Cprek2cf08e22016-07-13 10:38:12 -050046 cd $(@D) && source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050047endef
48
49$(eval $(generic-package))