Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # openpower_pnor |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 7 | # remove the quotes from the XML/Targeting package as |
| 8 | # make doesn't care for quotes in the dependencies. |
| 9 | XML_PACKAGE=$(subst $\",,$(BR2_OPENPOWER_XML_PACKAGE)) |
Brian Silver | 137a00a | 2014-11-11 12:09:53 -0600 | [diff] [blame] | 10 | |
Bill Hoffa | 3ebdb3a | 2015-01-16 13:47:38 -0600 | [diff] [blame] | 11 | OPENPOWER_PNOR_VERSION ?= f2dd4340228d1287a2622faffdfecebce9a321dd |
Nick Bofferding | b82aaef | 2014-11-07 14:29:18 -0600 | [diff] [blame] | 12 | OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION)) |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 13 | |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 14 | OPENPOWER_PNOR_LICENSE = Apache-2.0 |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 15 | OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries $(XML_PACKAGE) skiboot host-openpower-ffs occ |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 16 | |
| 17 | OPENPOWER_PNOR_INSTALL_IMAGES = YES |
| 18 | OPENPOWER_PNOR_INSTALL_TARGET = NO |
| 19 | |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 20 | HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/ |
| 21 | HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/ |
| 22 | OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/ |
| 23 | |
| 24 | define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS |
| 25 | mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR) |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 26 | |
Brian Silver | 137a00a | 2014-11-11 12:09:53 -0600 | [diff] [blame] | 27 | $(TARGET_MAKE_ENV) $(@D)/update_image.pl \ |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 28 | -op_target_dir $(HOSTBOOT_IMAGE_DIR) \ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 29 | -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \ |
| 30 | -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \ |
| 31 | -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \ |
| 32 | -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \ |
Brian Silver | 137a00a | 2014-11-11 12:09:53 -0600 | [diff] [blame] | 33 | -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \ |
| 34 | -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \ |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 35 | -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \ |
| 36 | -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 37 | |
| 38 | mkdir -p $(STAGING_DIR)/pnor/ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 39 | $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \ |
| 40 | -xml_layout_file $(@D)/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) \ |
| 41 | -pnor_filename $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) \ |
| 42 | -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \ |
| 43 | -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \ |
| 44 | -outdir $(STAGING_DIR)/pnor/ \ |
| 45 | -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \ |
| 46 | -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \ |
| 47 | -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \ |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 48 | -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 49 | -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 50 | |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 51 | $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 52 | endef |
| 53 | |
| 54 | $(eval $(generic-package)) |