This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] PROCESSOR-SDK-AM62A:如何在 TI SDK 10.00.02源代码上启用签名

Guru**** 2457760 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1482146/processor-sdk-am62a-how-to-enable-the-signature-on-ti-sdk-10-00-02-source-code

器件型号:PROCESSOR-SDK-AM62A

工具与软件:

您好:

    我使用的是 am62axx-evm TI 10.00.02 Yocto 源代码、而不是 SDK 环境。   现在我要启用 fitImage 和 ramdisk。  

    通过代码,我发现, 也许这个文件  ./oe-core/meta/classes-recipe/kernel-fitimage.bbclass 是签名的主要代码.

    但是生成的默认版本  fitImage-its-am62axx-evm 文件的内容就像这样

    

   那么如何从源代码中启用 fitImage 的签名。

   BTW,我想添加 ramdisk 到签名,如何做.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Feng:

    歌唱工作的方式就是 对设备树配置进行签名;各个组件都受到哈希验证的保护。 您可以看到、查看默认的 Yocto 生成的映像(用于 HS-Yocto FS 器件)...

    a0797059@jiji:~/tisdk/am62axx-evm/build/deploy-ti/images/am62axx-evm (master)
    $ dtc -I dtb fitImage | cut -c -80 -
    <...snip...>
            configurations {
                    default = "conf-ti_k3-am62a7-sk.dtb";
    
                    conf-ti_k3-am62a7-sk.dtb {
                            description = "1 Linux kernel, FDT blob";
                            kernel = "kernel-1";
                            fdt = "fdt-ti_k3-am62a7-sk.dtb";
    
                            hash-1 {
                                    algo = "sha512";
                            };
    
                            signature-1 {
                                    hashed-strings = <0x00 0x8e>;
                                    hashed-nodes = "/\0/configurations/conf-ti_k3-am62a7-sk.dtb\0/images/kernel-
                                    timestamp = <0x67364d78>;
                                    signer-version = "2024.01";
                                    signer-name = "mkimage";
                                    value = <0x4772d0d 0x9699adcf 0x29dbad9f 0xe9a68677 0xc83e8aef 0x65e96e7a 0x
                                    algo = "sha512,rsa4096";
                                    key-name-hint = "custMpk";
                                    padding = "pkcs-1.5";
                                    sign-images = "kernel\0fdt";
                            };
                    };
    <...snip...>

    您还可以通过修改以下文件来控制签名过程(默认:启用)以及使用的密钥(默认:TI 密钥)...

    $ grep SIGN ../sources/meta-ti/meta-ti-bsp/conf/machine/include/k3.inc
    UBOOT_SIGN_ENABLE = "1"
    UBOOT_SIGN_KEYNAME ?= "custMpk"
    UBOOT_SIGN_KEYDIR ?= "${TI_SECURE_DEV_PKG}/keys"
    FIT_SIGN_ALG ?= "rsa4096"

    如果您要对 ramdisks 等进行签名、则可以像对现有配置/工件所做的那样更新设备树文件。

    此致、Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

        感谢您的答复。 那么、哪个代码路径可以替换我的自定义签名密钥?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Feng:

    [报价用户 id="644803" url="~/support/processors-group/processors/f/processors-forum/1482146/processor-sdk-am62a-how-to-enable-the-signature-on-ti-sdk-10-00-02-source-code/5693113 #5693113"]     感谢您的答复。 那么、使用哪种代码路径来替换我的自定义签名密钥?

    您可以直接编辑  sources/meta-ti/meta-ti-bsp/conf/machine/include/k3.inc 以便"快速"解决方案、或者最好添加更新的内容 uBoot_sign_keyname 和  uBoot_sign_KEYDIR 对您的定义 conf/local.conf 文件 .

    此致、Andreas