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 | |
Patrick Williams | a624fc2 | 2015-03-26 10:21:05 -0500 | [diff] [blame] | 11 | OPENPOWER_PNOR_VERSION ?= 3748ff041448a3909d5ffc5e62befcfcb597c0c1 |
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 |
Michael Neuling | 94f8ab1 | 2015-02-11 14:01:28 +1100 | [diff] [blame] | 15 | OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries $(XML_PACKAGE) skiboot host-openpower-ffs occ capp-ucode |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 16 | |
Joel Stanley | 2aff5ba | 2015-02-01 14:49:18 +1030 | [diff] [blame] | 17 | ifeq ($(BR2_TARGET_SKIBOOT_EMBED_PAYLOAD),n) |
| 18 | |
| 19 | ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) |
| 20 | OPENPOWER_PNOR_DEPENDENCIES += linux26-rebuild-with-initramfs |
| 21 | else |
| 22 | OPENPOWER_PNOR_DEPENDENCIES += linux |
| 23 | endif |
| 24 | |
| 25 | endif |
| 26 | |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 27 | OPENPOWER_PNOR_INSTALL_IMAGES = YES |
| 28 | OPENPOWER_PNOR_INSTALL_TARGET = NO |
| 29 | |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 30 | HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/ |
| 31 | HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/ |
| 32 | OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/ |
Stephen Cprek | e7254c7 | 2015-02-19 14:33:38 -0600 | [diff] [blame] | 33 | OPENPOWER_VERSION_DIR = $(STAGING_DIR)/openpower_version |
| 34 | |
| 35 | # Subpackages we want to include in the version info (do not include openpower-pnor) |
| 36 | OPENPOWER_VERSIONED_SUBPACKAGES = hostboot occ skiboot hostboot-binaries $(XML_PACKAGE) capp-ucode |
| 37 | OPENPOWER_PNOR = openpower-pnor |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 38 | |
| 39 | define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS |
| 40 | mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR) |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 41 | |
Brian Silver | 137a00a | 2014-11-11 12:09:53 -0600 | [diff] [blame] | 42 | $(TARGET_MAKE_ENV) $(@D)/update_image.pl \ |
Brian Silver | 015b591 | 2014-08-07 15:50:15 -0500 | [diff] [blame] | 43 | -op_target_dir $(HOSTBOOT_IMAGE_DIR) \ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 44 | -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \ |
| 45 | -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \ |
| 46 | -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \ |
| 47 | -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \ |
Brian Silver | 137a00a | 2014-11-11 12:09:53 -0600 | [diff] [blame] | 48 | -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \ |
| 49 | -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \ |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 50 | -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \ |
Michael Neuling | 94f8ab1 | 2015-02-11 14:01:28 +1100 | [diff] [blame] | 51 | -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \ |
Stephen Cprek | e7254c7 | 2015-02-19 14:33:38 -0600 | [diff] [blame] | 52 | -capp_binary_filename $(BINARIES_DIR)/$(BR2_CAPP_UCODE_BIN_FILENAME) \ |
| 53 | -openpower_version_filename $(OPENPOWER_PNOR_VERSION_FILE) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 54 | |
| 55 | mkdir -p $(STAGING_DIR)/pnor/ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 56 | $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \ |
| 57 | -xml_layout_file $(@D)/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) \ |
| 58 | -pnor_filename $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) \ |
| 59 | -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \ |
| 60 | -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \ |
| 61 | -outdir $(STAGING_DIR)/pnor/ \ |
| 62 | -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \ |
Joel Stanley | 2aff5ba | 2015-02-01 14:49:18 +1030 | [diff] [blame] | 63 | -bootkernel $(BINARIES_DIR)/$(LINUX_IMAGE_NAME) \ |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 64 | -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \ |
| 65 | -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \ |
Brian Silver | cb56555 | 2014-12-11 12:51:36 -0600 | [diff] [blame] | 66 | -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \ |
Stephen Cprek | e7254c7 | 2015-02-19 14:33:38 -0600 | [diff] [blame] | 67 | -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \ |
| 68 | -openpower_version_filename $(OPENPOWER_PNOR_VERSION_FILE) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 69 | |
Brian Silver | 131189b | 2014-11-10 08:11:22 -0600 | [diff] [blame] | 70 | $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR) |
Bill Hoffa | 5f93f1d | 2014-06-26 21:02:48 -0500 | [diff] [blame] | 71 | endef |
| 72 | |
| 73 | $(eval $(generic-package)) |
Stephen Cprek | e7254c7 | 2015-02-19 14:33:38 -0600 | [diff] [blame] | 74 | # Generate openPOWER pnor version string by combining subpackage version string files |
| 75 | $(eval $(call OPENPOWER_VERSION,$(OPENPOWER_PNOR))) |