blob: bea360c131b3e58654cbf58e5aa8cebc07c97127 [file] [log] [blame]
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05001################################################################################
2#
3# openpower_pnor
4#
5################################################################################
6
Patrick Williams7541e922014-11-11 07:47:01 -06007OPENPOWER_PNOR_VERSION ?= aa4f2ef89ed6b0e12cbadc076f2e748fe7c2a3bc
Nick Bofferdingb82aaef2014-11-07 14:29:18 -06008OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05009OPENPOWER_PNOR_LICENSE = Apache-2.0
Brian Silver1b205ee2014-07-11 14:05:57 -050010OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries openpower-targeting skiboot host-openpower-ffs
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050011
12OPENPOWER_PNOR_INSTALL_IMAGES = YES
13OPENPOWER_PNOR_INSTALL_TARGET = NO
14
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050015OPENPOWER_TARGETING_DIR=$(STAGING_DIR)/openpower_targeting/
16HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/
17HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/
18OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
19
20define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
21 mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
Brian Silver131189b2014-11-10 08:11:22 -060022 $(TARGET_MAKE_ENV) $(@D)/update_image_$(BR2_OPENPOWER_CONFIG_NAME).pl \
23 -op_target_dir $(STAGING_DIR)/openpower_targeting/ \
24 -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
25 -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
26 -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \
27 -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
28 -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050029
30 mkdir -p $(STAGING_DIR)/pnor/
Brian Silver131189b2014-11-10 08:11:22 -060031 $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \
32 -xml_layout_file $(@D)/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) \
33 -pnor_filename $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) \
34 -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
35 -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
36 -outdir $(STAGING_DIR)/pnor/ \
37 -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \
38 -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
39 -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
40 -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050041
Brian Silver131189b2014-11-10 08:11:22 -060042 $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050043endef
44
45$(eval $(generic-package))