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

  Copyright (c) 2013-2016 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">

    <!--This is for IPQ401x Dakota targets-->
    <metadata>
        <chipset>401x</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>qc_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>

        <!--IPQ4018: 0x009780E1
            IPQ4019: 0x009790E1-->
        <msm_part>0x009790E1</msm_part>
        <oem_id>0x0000</oem_id>
        <model_id>0x0000</model_id>
        <debug>0x0000000000000002</debug>

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

    <!--
        ***general_properties***

        The default properties for all images. These properties maybe 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.
        -->
    </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="sbl1_emmc" name="sbl1_emmc.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
                <!--
                <crash_dump>0x0000000000000000</crash_dump>
                -->
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:sbl1_emmc_mbn)</meta_build_location>
        </image>

        <image sign_id="sbl1_nand" name="sbl1_nand.mbn" image_type="elf_preamble">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
                <!--
                <crash_dump>0x0000000000000000</crash_dump>
                -->
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:sbl1_nand_mbn)</meta_build_location>
        </image>

        <image sign_id="sbl1_nor" name="sbl1_nor.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
                <!--
                <crash_dump>0x0000000000000000</crash_dump>
                -->
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:sbl1_nor_mbn)</meta_build_location>
        </image>

        <image sign_id="mprg" name="MPRG40xx.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:MPRG40xx_mbn)</meta_build_location>
        </image>

        <image sign_id="enandprg" name="ENANDPRG40xx.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:ENANDPRG40xx_mbn)</meta_build_location>
        </image>

        <image sign_id="enorprg" name="ENORPRG40xx.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000000</sw_id>
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:ENORPRG40xx_mbn)</meta_build_location>
        </image>

        <image sign_id="tz" name="tzbsp_no_xpu.mbn" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000007</sw_id>
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:tzbsp_no_xpu)</meta_build_location>
        </image>

        <image sign_id="appsbl" name="openwrt-ipq40xx-u-boot-stripped.elf" image_type="elf_has_ht">
            <general_properties_overrides>
                <sw_id>0x0000000000000009</sw_id>
            </general_properties_overrides>
            <meta_build_location>$(FILE_TYPE:file_ref, ATTR:cmn_file_var, VAR:openwrt-ipq40xx-u-boot-stripped_elf)</meta_build_location>
        </image>
    </images_list>

</tns:secimage>
