| """Resign step class for building OTA's.""" |
| |
| from __future__ import absolute_import |
| from helpers import branch_utils |
| from slave import base_step |
| from slave.step import ota_step |
| |
| SOURCE_BINARY_PATH = ('out/target/product/{product}-{variant}/obj/PACKAGING/' |
| 'target_files_intermediates/' |
| '{product}-target_files-{buildset}.zip') |
| |
| SOURCE_FACTORY_PATH = ('out/target/product/{product}-{variant}/factory/' |
| '{image_type}/hostboot-target-files.zip') |
| |
| SOURCE_USBSTICK_PATH = ('out/target/product/{product}-{variant}/factory/' |
| '{image_type}/usbstick-target-files.zip') |
| |
| DESTINATION_USBSTICK_IMAGE_PATH = ('{output_dir}/factory/{product}-' |
| '{image_type}-{variant}-{buildset}.img') |
| |
| SOURCE_FACTORY_TOOL_PATH = ('out/target/product/{product}-{variant}/' |
| 'factory-{tool_type}-{product}-{version}.{ext}') |
| |
| RUNIN2_PROFILE_PATH = ('out/target/product/{product}-{variant}/' |
| 'factory/profile/') |
| |
| FCT_ZIP_PATH = ('out/target/product/{product}-{variant}/factory/' |
| '{product}-fct-{buildset}.zip') |
| |
| AMLOGIC_RESIGN_COMMAND = [ |
| './vendor/amlogic/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| BREZZA_RESIGN_COMMAND = [ |
| './vendor/qualcomm/brezza/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| ELAINE_RESIGN_COMMAND = [ |
| './vendor/amlogic/elaine/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| |
| ESTELLE_RESIGN_COMMAND = [ |
| './vendor/amlogic/estelle/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| KORLAN_RESIGN_COMMAND = [ |
| './vendor/amlogic/korlan/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| LUMIA_RESIGN_COMMAND = [ |
| './vendor/amlogic/lumia/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| SWIFT_RESIGN_COMMAND = [ |
| './vendor/amlogic/swift/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| GQ_RESIGN_COMMAND = [ |
| './vendor/amlogic/gq/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| NEWMAN_RESIGN_COMMAND = [ |
| './vendor/amlogic/newman/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| NQ_RESIGN_COMMAND = [ |
| './vendor/amlogic/nq/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| SIROCCO_RESIGN_COMMAND = [ |
| './vendor/qualcomm/sirocco/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| SPENCER_RESIGN_COMMAND = [ |
| './vendor/amlogic/spencer/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| A049_RESIGN_COMMAND = [ |
| './vendor/amlogic/a049/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| SPRINKLES_RESIGN_COMMAND = [ |
| './vendor/amlogic/korlan/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| TQ_RESIGN_COMMAND = [ |
| './vendor/amlogic/tq/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| MARVELL_RESIGN_COMMAND = [ |
| './vendor/marvell/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| VALENS_UNAND_COMMAND = [ |
| './vendor/marvell/valens/build/tools/mk-fct-unand.sh' |
| ] |
| |
| VENTO_UNAND_COMMAND = [ |
| './vendor/marvell/vento/build/tools/mk-fct-unand.sh' |
| ] |
| |
| VENUS_RESIGN_COMMAND = [ |
| './vendor/amlogic/venus/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| BSV3_RESIGN_COMMAND = [ |
| './vendor/amlogic/bsv3/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| BLA4_RESIGN_COMMAND = [ |
| './vendor/amlogic/bla4/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| _2RS4_RESIGN_COMMAND = [ |
| './vendor/amlogic/2rs4/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| XUA4_RESIGN_COMMAND = [ |
| './vendor/amlogic/xua4/build/tools/releasetools/ota_from_target_files', |
| '-v', |
| ] |
| |
| ASSISTANTDEFAULT_RESIGN = { |
| 'command': ['cp'], |
| 'source_binary_path': '{dist_dir}/{product}-ota-{buildset}.zip', |
| 'include_params': False, |
| 'variants': [{'board': 'assistantdefault-b1'}], |
| } |
| |
| BIGGIE_RESIGN = { |
| 'command': AMLOGIC_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'biggie-b1'}, |
| {'board': 'biggie-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'biggie-b3'}, |
| {'board': 'biggie-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| BIGGIE_FACTORY = { |
| 'command': AMLOGIC_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'biggie-b1', 'usb_host_package': None}, |
| {'board': 'biggie-b3', 'usb_host_package': None}, |
| {'board': 'biggie-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| BOWIE_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'bowie-p0'}, |
| {'board': 'bowie-p0', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| BOWIE_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'bowie-p0', 'usb_host_package': None}, |
| ], |
| } |
| |
| BOWIE_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'bowie-p0', 'usb_stick_image': None}, |
| ], |
| } |
| |
| BREZZA_RESIGN = { |
| 'command': BREZZA_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'brezza-p0'}, |
| {'board': 'brezza-p0', 'omaha_channel': 'beta-channel'}, |
| {'board': 'brezza-p1'}, |
| {'board': 'brezza-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'brezza-p2'}, |
| {'board': 'brezza-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'brezza-b1'}, |
| {'board': 'brezza-b1', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| BREZZA_FACTORY = { |
| 'command': BREZZA_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'brezza-p1', 'usb_host_package': None}, |
| {'board': 'brezza-p2', 'usb_host_package': None}, |
| ], |
| } |
| |
| BREZZA_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['runin2_package', 'provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| BREZZA_USBSTICK = { |
| 'command': BREZZA_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'brezza-p2', 'usb_stick_image': None}, |
| ], |
| } |
| |
| CAPRICA_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'caprica-b1': '1.31', |
| 'caprica-b2': '1.31', |
| 'caprica-b3': '1.31', |
| }, |
| 'variants': [ |
| {'board': 'caprica-b1', 'tz': 'on'}, |
| {'board': 'caprica-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'caprica-b2', 'tz': 'on'}, |
| {'board': 'caprica-b2', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'caprica-b3', 'tz': 'on'}, |
| {'board': 'caprica-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'caprica-b3', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| CAPRICA_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| # BG2 usbboot prebuilts do not have TZ support. |
| {'board': 'caprica-b1', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'caprica-b2', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'caprica-b3', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'caprica-b4', 'usb_host_package': None, 'tz': 'off'}, |
| ], |
| } |
| |
| CAPRICA_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'caprica-b1', 'usb_stick_image': None}, |
| {'board': 'caprica-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| CHORIZO_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'earth-b1': '1.12', |
| 'earth-b2': '1.13', |
| 'earth-b3': '1.15', |
| }, |
| 'variants': [ |
| {'board': 'earth-b1', 'tz': 'on'}, |
| {'board': 'earth-b2', 'tz': 'on'}, |
| {'board': 'earth-b2', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'earth-b2', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| {'board': 'earth-b3', 'tz': 'on'}, |
| {'board': 'earth-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'earth-b3', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| ELAINE_FUCHSIA_RESIGN = { |
| 'command': ELAINE_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'elaine-b3'}, |
| {'board': 'elaine-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| ELAINE_RESIGN = { |
| 'command': ELAINE_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'elaine-p2', 'always_resign': True}, |
| {'board': 'elaine-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'elaine-b1'}, |
| {'board': 'elaine-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'elaine-b3'}, |
| {'board': 'elaine-b3', 'omaha_channel': 'beta-channel'}, |
| {'board': 'elaine-b3', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| ELAINE_FACTORY = { |
| 'command': ELAINE_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'elaine-p2', 'usb_host_package': None}, |
| {'board': 'elaine-b1', 'usb_host_package': None}, |
| {'board': 'elaine-b3', 'usb_host_package': None}, |
| {'board': 'elaine-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| ELAINE_USBSTICK = { |
| 'command': ELAINE_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'elaine-b1', 'usb_stick_image': None}, |
| {'board': 'elaine-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| ESTELLE_FUCHSIA_RESIGN = { |
| 'command': ESTELLE_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'estelle-b3'}, |
| {'board': 'estelle-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| ESTELLE_RESIGN = { |
| 'command': ESTELLE_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'estelle-p2'}, |
| {'board': 'estelle-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'estelle-b1'}, |
| {'board': 'estelle-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'estelle-b3'}, |
| {'board': 'estelle-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| ESTELLE_FACTORY = { |
| 'command': ESTELLE_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'estelle-b1', 'usb_host_package': None}, |
| {'board': 'estelle-b3', 'usb_host_package': None}, |
| {'board': 'estelle-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| ESTELLE_USBSTICK = { |
| 'command': ESTELLE_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'estelle-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| EUREKA_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'eureka-b1', 'tz': 'on'}, |
| ], |
| } |
| |
| KORLAN_RESIGN = { |
| 'command': KORLAN_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'korlan-p2'}, |
| {'board': 'korlan-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'korlan-b1'}, |
| {'board': 'korlan-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'korlan-b3'}, |
| {'board': 'korlan-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| KORLAN_FACTORY = { |
| 'command': KORLAN_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'korlan-p2', 'usb_host_package': None}, |
| {'board': 'korlan-b1', 'usb_host_package': None}, |
| {'board': 'korlan-b3', 'usb_host_package': None}, |
| ], |
| } |
| |
| KORLAN_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['runin2_package', 'provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| KORLAN_USBSTICK = { |
| 'command': KORLAN_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'korlan-p2', 'usb_stick_image': None}, |
| {'board': 'korlan-b1', 'usb_stick_image': None}, |
| {'board': 'korlan-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| LUMIA_RESIGN = { |
| 'command': LUMIA_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'lumia-p0'}, |
| {'board': 'lumia-p0', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| LUMIA_FACTORY = { |
| 'command': LUMIA_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'lumia-p0', 'usb_host_package': None}, |
| ], |
| } |
| |
| SWIFT_RESIGN = { |
| 'command': SWIFT_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'swift-p1'}, |
| {'board': 'swift-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'swift-p2'}, |
| {'board': 'swift-p2', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| GTK_9EH4_RESIGN = { |
| 'command': SWIFT_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'swift-p1'}, |
| {'board': 'swift-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'swift-p2'}, |
| {'board': 'swift-p2', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| GTK_9EH4_FACTORY = { |
| 'command': SWIFT_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'swift-p1', 'usb_host_package': None}, |
| {'board': 'swift-p2', 'usb_host_package': None}, |
| ], |
| } |
| |
| GQ_RESIGN = { |
| 'command': GQ_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'gq-b1', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'gq-b1', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'gq-b3', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'gq-b3', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| ], |
| } |
| |
| GQ_FACTORY = { |
| 'command': GQ_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'gq-b1', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'gq-b3', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'gq-b4', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| ], |
| } |
| |
| GQ_USBSTICK = { |
| 'command': GQ_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'gq-b1', 'usb_stick_image': None}, |
| {'board': 'gq-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| MUSHROOM_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'joplin-b1': '1.23', |
| 'joplin-b3': '1.26', |
| }, |
| 'variants': [ |
| {'board': 'joplin-b1', 'tz': 'on'}, |
| {'board': 'joplin-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'joplin-b1', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| {'board': 'joplin-b3', 'tz': 'on'}, |
| {'board': 'joplin-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'joplin-b3', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| MUSHROOM_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| # BG2 usbboot prebuilts do not have TZ support. |
| {'board': 'joplin-b1', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'joplin-b3', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'joplin-b4', 'usb_host_package': None, 'tz': 'off'}, |
| ], |
| } |
| |
| MUSHROOM_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'joplin-b3', 'usb_stick_image': None} |
| ], |
| } |
| |
| NEWMAN_FUCHSIA_RESIGN = { |
| 'command': NEWMAN_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'newman-b3'}, |
| {'board': 'newman-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| NEWMAN_RESIGN = { |
| 'command': NEWMAN_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'newman-b1'}, |
| {'board': 'newman-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'newman-b3'}, |
| {'board': 'newman-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| NEWMAN_RESIGN_ENG = { |
| 'command': NEWMAN_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'newman-b1'}, |
| {'board': 'newman-b3'}, |
| ], |
| } |
| |
| NEWMAN_FACTORY = { |
| 'command': NEWMAN_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'newman-b1', 'usb_host_package': None}, |
| {'board': 'newman-b3', 'usb_host_package': None}, |
| {'board': 'newman-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| NEWMAN_USBSTICK = { |
| 'command': NEWMAN_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'newman-b1', 'usb_stick_image': None}, |
| {'board': 'newman-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| NQ_RESIGN = { |
| 'command': NQ_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'nq-b1', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'nq-b1', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'nq-b3', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'nq-b3', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| ], |
| } |
| |
| NQ_FACTORY = { |
| 'command': NQ_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'nq-b1', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'nq-b3', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| {'board': 'nq-b4', 'usb_host_package': None, |
| 'disabled_branches': ['1.48_shortlived_198292']}, |
| ], |
| } |
| |
| NQ_USBSTICK = { |
| 'command': NQ_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'nq-b1', 'usb_stick_image': None}, |
| {'board': 'nq-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| PEPPERONI_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'hendrix-b1': '1.14', |
| 'hendrix-b3': '1.15', |
| }, |
| 'variants': [ |
| {'board': 'hendrix-b1', 'tz': 'on'}, |
| {'board': 'hendrix-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'hendrix-b1', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| {'board': 'hendrix-b3', 'tz': 'on'}, |
| {'board': 'hendrix-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'hendrix-b3', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| PINEAPPLE_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'chirp-b1': '1.20', |
| 'chirp-b3': '1.21', |
| }, |
| 'variants': [ |
| {'board': 'chirp-b1', 'tz': 'on'}, |
| {'board': 'chirp-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'chirp-b1', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| {'board': 'chirp-b3', 'tz': 'on'}, |
| {'board': 'chirp-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'chirp-b3', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| PINEAPPLE_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| # BG2 usbboot prebuilts do not have TZ support. |
| {'board': 'chirp-b1', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'chirp-b3', 'usb_host_package': None, 'tz': 'off'}, |
| {'board': 'chirp-b4', 'usb_host_package': None, 'tz': 'off'}, |
| ], |
| } |
| |
| PINEAPPLE_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'chirp-b3', 'usb_stick_image': None} |
| ], |
| } |
| |
| PRINCE_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'prince-p2', 'tz': 'on'}, |
| {'board': 'prince-p2', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'prince-b1', 'tz': 'on', 'always_resign': True}, |
| {'board': 'prince-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'prince-b3', 'tz': 'on'}, |
| {'board': 'prince-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'} |
| ], |
| } |
| |
| PRINCE_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'prince-p2', 'usb_host_package': None}, |
| {'board': 'prince-b1', 'usb_host_package': None}, |
| {'board': 'prince-b3', 'usb_host_package': None}, |
| {'board': 'prince-b4', 'usb_host_package': None} |
| ], |
| } |
| |
| PRINCE_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'prince-p2', 'usb_stick_image': None}, |
| {'board': 'prince-b1', 'usb_stick_image': None}, |
| {'board': 'prince-b3', 'usb_stick_image': None} |
| ], |
| } |
| |
| # Make factory tools eg. provision package |
| PRINCE_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH |
| } |
| |
| # Use separate factory_tool config as spencer may build runin packages in CB |
| SPENCER_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['provision_package', 'runin2_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| VENUS_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['provision_package', 'runin2_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| BSV3_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| A049_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['provision_package', 'runin2_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| SALAMI_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'lexx-b3', 'tz': 'on'}, |
| ], |
| } |
| |
| SIROCCO_RESIGN = { |
| 'command': SIROCCO_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'sirocco-p1'}, |
| {'board': 'sirocco-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'sirocco-b1'}, |
| {'board': 'sirocco-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'sirocco-b3'}, |
| {'board': 'sirocco-b3', 'omaha_channel': 'beta-channel'}, |
| {'board': 'sirocco-b3', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| SIROCCO_FACTORY = { |
| 'command': SIROCCO_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'sirocco-p1', 'usb_host_package': None}, |
| {'board': 'sirocco-b1', 'usb_host_package': None}, |
| {'board': 'sirocco-b3', 'usb_host_package': None}, |
| ], |
| } |
| |
| SIROCCO_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['runin2_package', 'provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| SIROCCO_USBSTICK = { |
| 'command': SIROCCO_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'sirocco-b1', 'usb_stick_image': None}, |
| {'board': 'sirocco-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| SPENCER_RESIGN = { |
| 'command': SPENCER_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'spencer-p1'}, |
| {'board': 'spencer-p1u'}, |
| {'board': 'spencer-p2'}, |
| {'board': 'spencer-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'spencer-b1'}, |
| {'board': 'spencer-b1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'spencer-b3'}, |
| {'board': 'spencer-b3', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| SPENCER_FACTORY = { |
| 'command': SPENCER_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'spencer-p1', 'usb_host_package': None}, |
| {'board': 'spencer-p1u', 'usb_host_package': None}, |
| {'board': 'spencer-p2', 'usb_host_package': None}, |
| {'board': 'spencer-b1', 'usb_host_package': None}, |
| {'board': 'spencer-b3', 'usb_host_package': None}, |
| ], |
| } |
| |
| SPENCER_USBSTICK = { |
| 'command': SPENCER_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'spencer-p2', 'usb_stick_image': None}, |
| {'board': 'spencer-b1', 'usb_stick_image': None}, |
| {'board': 'spencer-b3', 'usb_stick_image': None}, |
| ], |
| } |
| |
| SPRINKLES_RESIGN = { |
| 'command': SPRINKLES_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'sprinkles-korlan'}, |
| {'board': 'sprinkles-korlan', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| SPRINKLES_FACTORY = { |
| 'command': SPRINKLES_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'sprinkles-korlan', 'usb_host_package': None}, |
| ], |
| } |
| |
| SPRINKLES_FACTORY_TOOL = { |
| 'command':['make'], |
| 'factory_tool_types': ['runin2_package', 'provision_package'], |
| 'source_tool_path': SOURCE_FACTORY_TOOL_PATH, |
| 'runin_profile_path': RUNIN2_PROFILE_PATH |
| } |
| |
| SPRINKLES_USBSTICK = { |
| 'command': SPRINKLES_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'sprinkles-korlan', 'usb_stick_image': None}, |
| ], |
| } |
| |
| STEAK_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'min_branches': { |
| 'luther-b1': '1.20', |
| 'luther-b2': '1.21', |
| }, |
| 'variants': [ |
| {'board': 'luther-b2', 'tz': 'on'}, |
| {'board': 'luther-b2', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'luther-b2', 'tz': 'on', 'omaha_channel': 'stable-channel'}, |
| ], |
| } |
| |
| STEAK_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| # bg4cdp USB boot host tool supports TZ |
| {'board': 'luther-b2', 'usb_host_package': None}, |
| {'board': 'luther-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| STEAK_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'luther-b2', 'usb_stick_image': None} |
| ], |
| } |
| |
| TQ_RESIGN = { |
| 'command': TQ_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'tq-p1'}, |
| {'board': 'tq-p2'}, |
| {'board': 'tq-p2', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| TQ_FACTORY = { |
| 'command': TQ_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'tq-p1', 'usb_host_package': None}, |
| {'board': 'tq-p2', 'usb_host_package': None}, |
| ], |
| } |
| |
| VALENS_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'valens-p2', 'tz': 'on'}, |
| {'board': 'valens-p2', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'valens-b1', 'tz': 'on'}, |
| {'board': 'valens-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'valens-b3', 'tz': 'on'}, |
| {'board': 'valens-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| VALENS_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'valens-p2', 'usb_host_package': None}, |
| {'board': 'valens-b1', 'usb_host_package': None}, |
| {'board': 'valens-b3', 'usb_host_package': None}, |
| {'board': 'valens-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| # uNAND step require fct zip created first |
| VALENS_UNAND = { |
| 'command': VALENS_UNAND_COMMAND, |
| 'factory_image_types': ['unand'], |
| 'source_binary_path': FCT_ZIP_PATH, |
| 'variants': [ |
| {'board': 'valens-p2'}, |
| {'board': 'valens-b1'}, |
| {'board': 'valens-b3'}, |
| {'board': 'valens-b4'}, |
| ], |
| } |
| |
| VALENS_USBSTICK = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'fctsecure', 'partdump'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'valens-b3', 'usb_stick_image': None} |
| ], |
| } |
| |
| VENTO_RESIGN = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'vento-p0', 'tz': 'on'}, |
| {'board': 'vento-p0', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'vento-b1', 'tz': 'on'}, |
| {'board': 'vento-b1', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| {'board': 'vento-b3', 'tz': 'on'}, |
| {'board': 'vento-b3', 'tz': 'on', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| VENTO_FACTORY = { |
| 'command': MARVELL_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'vento-p0', 'usb_host_package': None}, |
| {'board': 'vento-b1', 'usb_host_package': None}, |
| {'board': 'vento-b3', 'usb_host_package': None}, |
| {'board': 'vento-b4', 'usb_host_package': None}, |
| ], |
| } |
| |
| # uNAND step require fct zip created first |
| VENTO_UNAND = { |
| 'command': VENTO_UNAND_COMMAND, |
| 'factory_image_types': ['unand'], |
| 'source_binary_path': FCT_ZIP_PATH, |
| 'variants': [ |
| {'board': 'vento-p0'}, |
| {'board': 'vento-b1'}, |
| {'board': 'vento-b3'}, |
| {'board': 'vento-b4'}, |
| ], |
| } |
| |
| VENUS_RESIGN = { |
| 'command': VENUS_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'venus-p1'}, |
| {'board': 'venus-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'venus-p2'}, |
| {'board': 'venus-p2', 'omaha_channel': 'beta-channel'}, |
| {'board': 'venus-b1', |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| {'board': 'venus-b1', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| {'board': 'venus-b3', |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| {'board': 'venus-b3', 'omaha_channel': 'beta-channel', |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| ], |
| } |
| |
| VENUS_FACTORY = { |
| 'command': VENUS_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'venus-p1', 'usb_host_package': None}, |
| {'board': 'venus-p2', 'usb_host_package': None}, |
| {'board': 'venus-b1', 'usb_host_package': None, |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| {'board': 'venus-b3', 'usb_host_package': None, |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| ], |
| } |
| |
| VENUS_USBSTICK = { |
| 'command': VENUS_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'venus-p2', 'usb_stick_image': None}, |
| {'board': 'venus-b1', 'usb_stick_image': None, |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| {'board': 'venus-b3', 'usb_stick_image': None, |
| 'disabled_branches': ['1.57_shortlived_265478_vfctp2']}, |
| ], |
| } |
| |
| A049_RESIGN = { |
| 'command': A049_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'a049-p0'}, |
| ], |
| } |
| |
| A049_FACTORY = { |
| 'command': A049_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'a049-p0', 'usb_host_package': None}, |
| ], |
| } |
| |
| A049_USBSTICK = { |
| 'command': A049_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'a049-p0', 'usb_stick_image': None}, |
| ], |
| } |
| |
| BSV3_RESIGN = { |
| 'command': BSV3_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'bsv3-p1'}, |
| ], |
| } |
| |
| BSV3_FACTORY = { |
| 'command': BSV3_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'bsv3-p1', 'usb_host_package': None}, |
| ], |
| } |
| |
| BSV3_USBSTICK = { |
| 'command': BSV3_RESIGN_COMMAND, |
| 'factory_image_types': ['reflash', 'partdump', 'fctsecure'], |
| 'source_binary_path': SOURCE_USBSTICK_PATH, |
| 'destination_path_template': DESTINATION_USBSTICK_IMAGE_PATH, |
| 'variants': [ |
| {'board': 'bsv3-p1', 'usb_stick_image': None}, |
| ], |
| } |
| |
| BLA4_RESIGN = { |
| 'command': BLA4_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'bla4-p0'}, |
| {'board': 'bla4-p0', 'omaha_channel': 'beta-channel'}, |
| {'board': 'bla4-p1'}, |
| {'board': 'bla4-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': 'bla4-p2'}, |
| {'board': 'bla4-p2', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| BLA4_FACTORY = { |
| 'command': BLA4_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'bla4-p0', 'usb_host_package': None}, |
| {'board': 'bla4-p1', 'usb_host_package': None}, |
| {'board': 'bla4-p2', 'usb_host_package': None}, |
| ], |
| } |
| |
| _2RS4_RESIGN = { |
| 'command': _2RS4_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': '2rs4-p1'}, |
| {'board': '2rs4-p1', 'omaha_channel': 'beta-channel'}, |
| {'board': '2rs4-p2'}, |
| {'board': '2rs4-p2', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| _2RS4_FACTORY = { |
| 'command': _2RS4_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': '2rs4-p1', 'usb_host_package': None}, |
| {'board': '2rs4-p2', 'usb_host_package': None}, |
| ], |
| } |
| |
| XUA4_RESIGN = { |
| 'command': XUA4_RESIGN_COMMAND, |
| 'variants': [ |
| {'board': 'xua4-p1'}, |
| {'board': 'xua4-p1', 'omaha_channel': 'beta-channel'}, |
| ], |
| } |
| |
| XUA4_FACTORY = { |
| 'command': XUA4_RESIGN_COMMAND, |
| 'factory_image_types': ['fct'], |
| 'source_binary_path': SOURCE_FACTORY_PATH, |
| 'variants': [ |
| {'board': 'xua4-p1', 'usb_host_package': None}, |
| ], |
| } |
| |
| def get_resign_steps(build_name, resign_config, build_branch, |
| apply_dev_signing, **step_kwargs): |
| """Returns list of resign steps if any. |
| |
| Args: |
| build_name: Name of build (e.g. anchovy-eng, tvdefault-eng). |
| resign_config: dictionary with resign params. |
| build_branch: manifest branch for current buildset. |
| apply_dev_signing: Ingnore per-board dev_signing param if True. |
| **step_kwargs: kwargs for step constructor. |
| Returns: |
| List of OtaResignStep objects if any |
| """ |
| if not resign_config or 'command' not in resign_config: |
| return [] |
| |
| steps = [] |
| |
| min_branches = resign_config.get('min_branches', {}) |
| for variant in resign_config.get('variants', []): |
| if build_branch in variant.get('disabled_branches', []): |
| continue |
| params = variant.copy() |
| if 'disabled_branches' in params: |
| params.pop('disabled_branches') |
| product = params.get('board', '') |
| resign_variant = apply_dev_signing or params.get('always_resign', False) |
| if 'always_resign' in params: |
| params.pop('always_resign') |
| if not resign_variant: |
| continue |
| if branch_utils.is_branch_equal_to_or_later_than( |
| build_branch, min_branches.get(product, None)): |
| for factory_image_type in resign_config.get( |
| 'factory_image_types', [None]): |
| if factory_image_type == 'unand': |
| steps.append(OtaUnandStep( |
| build_name, command=resign_config['command'], |
| params=params, |
| source_binary_path=resign_config.get( |
| 'source_binary_path', FCT_ZIP_PATH), |
| **step_kwargs |
| )) |
| else: |
| steps.append(OtaResignStep( |
| build_name, command=resign_config['command'], |
| params=params, factory_image_type=factory_image_type, |
| source_binary_path=resign_config.get( |
| 'source_binary_path', SOURCE_BINARY_PATH), |
| destination_path_template=resign_config.get( |
| 'destination_path_template', None), |
| include_params=resign_config.get('include_params', True), |
| **step_kwargs |
| )) |
| |
| return steps |
| |
| |
| class OtaResignStep(ota_step.OtaStep): |
| """Resign step class for building OTA's.""" |
| |
| def __init__(self, build_name, |
| command, params, source_binary_path, include_params, |
| destination_path_template=None, name=None, |
| factory_image_type=None, **kwargs): |
| """Creates a OtaResignStep instance. |
| |
| Args: |
| build_name: Name of build (e.g. anchovy-eng, tvdefault-eng) |
| command: resign command, list |
| params: resign params, dictionary |
| source_binary_path: path to source binary, string |
| include_params: if True, params will be converted command flags/values |
| destination_path_template: string. If None, a default template is used. |
| name: user-visible name of this step. |
| factory_image_type: Type of factory image, None otherwise |
| **kwargs: Any additional args to pass to BaseStep. |
| """ |
| if not name: |
| name = 'resign ' |
| if factory_image_type: |
| name += factory_image_type + ' ' |
| name += params['board'] |
| |
| tz = '' |
| if params.get('tz') == 'off': |
| tz = '-no-tz' |
| name += ' no trustzone' |
| elif params.get('tz') == 'on': |
| name += ' trustzone' |
| |
| if 'omaha_channel' in params: |
| channel = '-' + params['omaha_channel'] |
| name += ' ' + params['omaha_channel'] |
| else: |
| channel = '' |
| |
| ota_step.OtaStep.__init__(self, build_name=build_name, name=name, **kwargs) |
| product, variant = self._build_name.split('-') |
| |
| if destination_path_template is None: |
| if factory_image_type: |
| destination_path_template = ('{output_dir}/factory/{product}-' |
| '{image_type}-{variant}-{buildset}.zip') |
| else: |
| destination_path_template = ('{output_dir}/{product}-ota-{variant}' |
| '{tz}{channel}-{buildset}.zip') |
| self._resign_command = command[:] |
| if include_params: |
| for flag in params.keys(): |
| param = params[flag] |
| if param: |
| self._resign_command += ['--' + flag, param] |
| else: |
| self._resign_command += ['--' + flag] |
| |
| self._resign_command.append(source_binary_path.format( |
| dist_dir=self._dist_dir(), |
| product=product, |
| variant=variant, |
| image_type=factory_image_type, |
| buildset=self.build_number)) |
| |
| self._resign_command.append(destination_path_template.format( |
| output_dir=self._ota_archive_output_dir(), product=product, |
| buildset=self.build_number, |
| image_type=factory_image_type, |
| variant=params['board'], channel=channel, tz=tz)) |
| |
| def run(self): |
| returncode, stdout, stderr = self.exec_subprocess(self._resign_command) |
| if returncode != 0: |
| self._error_processor(stdout, stderr) |
| |
| return returncode == 0 |
| |
| |
| class OtaUnandStep(OtaResignStep): |
| """Resign step class for building OTA's.""" |
| |
| # pylint: disable=super-init-not-called |
| def __init__(self, build_name, |
| command, params, source_binary_path, |
| name=None, **kwargs): |
| """Creates a OtaResignStep instance. |
| |
| Args: |
| build_name: Name of build (e.g. anchovy-eng, tvdefault-eng) |
| command: resign command, list |
| params: resign params, dictionary |
| source_binary_path: path to source binary, string |
| name: user-visible name of this step. |
| **kwargs: Any additional args to pass to BaseStep. |
| """ |
| if not name: |
| name = 'resign uNAND ' |
| name += params['board'] |
| |
| # pylint: disable=non-parent-init-called |
| ota_step.OtaStep.__init__(self, build_name=build_name, name=name, **kwargs) |
| |
| product, variant = self._build_name.split('-') |
| self._resign_command = command[:] |
| self._resign_command.append(params['board']) |
| self._resign_command.append(source_binary_path.format( |
| dist_dir=self._dist_dir(), |
| product=product, |
| variant=variant, |
| buildset=self.build_number)) |
| self._resign_command.append('{output_dir}/factory'.format( |
| output_dir=self._ota_archive_output_dir())) |