blob: adff008209743f71bdac2474bd133ee6cbb1096c [file] [log] [blame]
Bill Hoffa5f93f1d2014-06-26 21:02:48 -05001################################################################################
2#
3# openpower_pnor
4#
5################################################################################
6
Brian Silver137a00a2014-11-11 12:09:53 -06007
8OPENPOWER_PNOR_VERSION ?= 121e1ff744eb87b2bcfa277f5eb10511fd78019e
Nick Bofferdingb82aaef2014-11-07 14:29:18 -06009OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050010OPENPOWER_PNOR_LICENSE = Apache-2.0
Brian Silver1b205ee2014-07-11 14:05:57 -050011OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries openpower-targeting skiboot host-openpower-ffs
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050012
13OPENPOWER_PNOR_INSTALL_IMAGES = YES
14OPENPOWER_PNOR_INSTALL_TARGET = NO
15
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050016OPENPOWER_TARGETING_DIR=$(STAGING_DIR)/openpower_targeting/
17HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/
18HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/
19OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
20
21define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
22 mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
Brian Silver137a00a2014-11-11 12:09:53 -060023 $(TARGET_MAKE_ENV) $(@D)/update_image.pl \
Brian Silver131189b2014-11-10 08:11:22 -060024 -op_target_dir $(STAGING_DIR)/openpower_targeting/ \
25 -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
26 -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
27 -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \
28 -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
Brian Silver137a00a2014-11-11 12:09:53 -060029 -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \
30 -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
31 -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050032
33 mkdir -p $(STAGING_DIR)/pnor/
Brian Silver131189b2014-11-10 08:11:22 -060034 $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \
35 -xml_layout_file $(@D)/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) \
36 -pnor_filename $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) \
37 -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
38 -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
39 -outdir $(STAGING_DIR)/pnor/ \
40 -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \
41 -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
42 -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
43 -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050044
Brian Silver131189b2014-11-10 08:11:22 -060045 $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR)
Bill Hoffa5f93f1d2014-06-26 21:02:48 -050046endef
47
48$(eval $(generic-package))