<?xml version="1.0" encoding="UTF-8"?>
<!--
===============================================================================

  Copyright (c) 2013-2017 Qualcomm Technologies, Inc.
  All Rights Reserved.
  Confidential and Proprietary - Qualcomm Technologies, Inc.

===============================================================================
-->

<tns:secimage xmlns:tns="http://www.qualcomm.com/secimage"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.qualcomm.com/secimage ../xsd/secimage.xsd">

    <metadata>
        <chipset>qm215</chipset>
        <version>2.0</version>
    </metadata>

    <!--
       See documentation on general_properties below.
    -->
    <general_properties>
        <selected_signer>local</selected_signer>
        <selected_encryptor></selected_encryptor>
        <selected_cert_config>qti_presigned_certs</selected_cert_config>
        <cass_capability>secboot_sha2_root</cass_capability>

        <key_size>2048</key_size>
        <exponent>65537</exponent>

        <mrc_index>0</mrc_index>
        <num_root_certs>1</num_root_certs>

        <!-- JTAG_ID
        qm215: 0x001060E1

        -->

        <msm_part>0x001060E1</msm_part>
        <oem_id>0x0000</oem_id>
        <model_id>0x0000</model_id>
        <debug>nop</debug>

        <max_cert_size>2048</max_cert_size>
        <num_certs_in_certchain>3</num_certs_in_certchain>

        <UIE_key>default</UIE_key>
    </general_properties>

    <!--
        ***general_properties***

        The default properties for all images. These properties may be overridden
        per image in the 'images' section below as needed.

        Supported signer are:
        local: use local signer with test keys
        csms: generate tosign file for csms upload (first run)
              package csms output zip to form signed image (second run)
        cass: use cass signer with production key

        Supported encryptor are:
        ssd_encryption: legacy encryption for OTA, supports MBN and ELF images.
        unified_encryption_2_0: supports ELF images. Image must be signed to encrypt

        Capability selected the signing key used. Currently,
        the following two capabilities are supported. OEM IDs
        are restricted to 0 or 1.

        OEM may obtain additional capabilities from CASS support.

        secboot_sha2_root : Use SHA256 signed root cert.
                            Same as the CSMS SHA256 signed root cert.
        secboot_sha1_root : Use SHA1 signed root cert.
                            Same as the CSMS SHA1 signed root cert.

        If SHA256 is selected, the PK_HASH_IN_FUSE needs to be blown,
        and the ROOT CERT HASH below needs to be blown in OEM PK HASH:
        7be49b72f9e4337223ccb84d6eccca4e61ce16e3602ac2008cb18b75babe6d09

        msm_part: jtag_id for signing. (in hex)
        oem_id: oem_id for signing. (in hex)
        model_id: model_id for signing. (in hex)
        debug: debug_id for signing. (in hex)
        exponent: exponent value used in attestation key generation.

        max_cert_size: Maximum size (in bytes) of one certificate.
        key_size: Size (in bits) of the key used for signing.
        num_certs_in_certchain: Number of certificates in the certificate chain.
        num_root_certs: Number of root certificates in the certificate chain.
    -->

    <parsegen>
        <!--
        Parsegen information by default will be read from parsegen_config.xml.
        Additional image_id's can be included here or existing image_id's may be overwritten
        to be generated with the default image_ids.
        -->
        <image_types_list>
                <image_type id='elf_wrapped_mbn'>
                <!-- Type of file format -->
                <file_type>ewm</file_type>
                <ewm_properties>
                    <image_entry>0x0C700000</image_entry>
                    <relocatable>true</relocatable>
                </ewm_properties>
                <elf_properties>
                    <has_hash_table>false</has_hash_table>
                    <image_type>0</image_type>
                </elf_properties>
                <mbn_properties>
                    <header_size>80</header_size>
                </mbn_properties>
            </image_type>
        </image_types_list>
    </parsegen>

    <!-- Signing configurations used by secimage. -->
    <signing>
        <signer_attributes>
            <!--
                Use of CASS signer will require additional license agreement
                and contract. Hardware token is required for access.
            -->
            <cass_signer_attributes>
                <!--
                    keystore_type: PKCS11 (hardware token)
                    token_password: User will be prompted if password
                                    is an empty string
                    token_driver_home: Safenet driver location
                -->
                <user_identity>
                    <keystore_type>PKCS11</keystore_type>
                    <token_password></token_password>
                    <token_driver_home>
                        <windows>C:/WINDOWS/SYSTEM32/eTpkcs11.dll</windows>
                        <linux>/usr/lib/libeTPkcs11.so</linux>
                    </token_driver_home>
                </user_identity>
            </cass_signer_attributes>
        </signer_attributes>
    </signing>

    <post_process>
        <pil_splitter>$(META_BUILD)/common/tools/misc/pil-splitter.py</pil_splitter>
    </post_process>

    <data_provisioning>
        <base_path>./../../resources/data_prov_assets/</base_path>
    </data_provisioning>

    <images_list>
         <image sign_id="dbgp_ap" image_type="elf_has_ht" output_file_name="dp_AP_signed.mbn" cert_config="qti_presigned_certs">
            <general_properties_overrides>
                <sw_id>0x0000000000000200</sw_id>
            </general_properties_overrides>
            <meta_build_location>NA</meta_build_location>
        </image>

        <image sign_id="dbgp_msa" image_type="elf_has_ht" output_file_name="dp_MSA_signed.mbn" cert_config="qti_presigned_certs">
            <general_properties_overrides>
                <sw_id>0x0000000000000200</sw_id>
            </general_properties_overrides>
            <meta_build_location>NA</meta_build_location>
        </image>
    </images_list>

</tns:secimage>
