blob: 7d15d28d993c1941d52ae26b0c6dc0a25f3be18a [file] [log] [blame]
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05001################################################################################
2#
3# hostboot
4#
5################################################################################
hostboote88868d2016-12-01 00:07:25 -06006HOSTBOOT_VERSION_BRANCH_MASTER_P8 ?= e28b28fa9995ab3039b44f2c200fdbbc58313677
hostboot9c0522c2016-12-23 00:07:30 -06007HOSTBOOT_VERSION_BRANCH_MASTER ?= abc4a878dc90b34f48ec66554776717490fd2efb
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
13HOSTBOOT_DEPENDENCIES = host-binutils
14
15HOSTBOOT_INSTALL_IMAGES = YES
16HOSTBOOT_INSTALL_TARGET = NO
17
18HOSTBOOT_ENV_VARS=$(TARGET_MAKE_ENV) \
19 CONFIG_FILE=$(BR2_EXTERNAL)/configs/hostboot/$(BR2_HOSTBOOT_CONFIG_FILE) \
Stephen Cpreke7254c72015-02-19 14:33:38 -060020 OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
Matt Ploetz3a184dd2016-08-26 17:21:06 -050021 HOSTBOOT_VERSION=`cat $(HOSTBOOT_VERSION_FILE)`
22
23define HOSTBOOT_APPLY_PATCHES
24 if [ "$(BR2_OPENPOWER_POWER9)" == "y" ]; then \
25 $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL)/package/hostboot/p9Patches \*.patch; \
26 if [ -d $(BR2_EXTERNAL)/custom/patches/hostboot/p9Patches ]; then \
27 $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL)/custom/patches/hostboot/p9Patches \*.patch; \
28 fi; \
29 fi; \
30 if [ "$(BR2_OPENPOWER_POWER8)" == "y" ]; then \
31 $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL)/package/hostboot/p8Patches \*.patch; \
32 if [ -d $(BR2_EXTERNAL)/custom/patches/hostboot/p8Patches ]; then \
33 $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL)/custom/patches/hostboot/p8Patches \*.patch; \
34 fi; \
35 fi;
36endef
37
38HOSTBOOT_POST_PATCH_HOOKS += HOSTBOOT_APPLY_PATCHES
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050039
40define HOSTBOOT_BUILD_CMDS
Brian Silver6a3264f2014-07-07 13:04:22 -050041 $(HOSTBOOT_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)'
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050042endef
43
44define HOSTBOOT_INSTALL_IMAGES_CMDS
Stephen Cprek2cf08e22016-07-13 10:38:12 -050045 cd $(@D) && source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050046endef
47
48$(eval $(generic-package))