【问题标题】:u-boot hangs after enabling secured boot : on overo启用安全启动后 u-boot 挂起:在 overo 上
【发布时间】:2016-05-05 11:19:55
【问题描述】:

我试图在 u-boot 中为 gumstix overostorm 启用安全启动。 基于http://www.denx-cs.de/doku/?q=m28verifiedboot

我用SD卡准备好后,u-boot无法启动并给出以下错误信息。

U-Boot SPL 2015.07 (Apr 28 2016 - 13:53:06)
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
reading u-boot.img
spl_load_image_fat: error reading image u-boot.img, err - -1
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

================

这是我正在使用的 u-boot.dts 文件。

/dts-v1/;

/ {
        model = "Keys";

        signature {
                key-dev {
                        required = "conf";
                        algo = "sha1,rsa2048";
                        key-name-hint = "my_key";
                };
        };
};

生成u-boot.dtb, dtc -p 0x1000 /work/u-boot.dts -O dtb -o /work/u-boot.dtb

这些是我添加到 include/configs/omap3_overo.h 的配置文件

 #define CONFIG_OF_CONTROL
 #define CONFIG_OF_SEPARATE
 #define CONFIG_FIT
 #define CONFIG_FIT_SIGNATURE
 #define CONFIG_RSA
 #define CONFIG_FIT_VERBOSE

我正在使用以下行编译 u-boot:

使 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-EXT_DTB=/work/u-boot.dtb all -j4

如果您对如何调试此问题有任何想法,请告诉我。

====================

有更新。

  1. 将 u-boot-dtb.img 名称更改为 u-boot.img。
  2. 然后板子可以启动,但是当我尝试使用 bootm 时会显示以下消息。

**

Overo # 
## Loading kernel from FIT Image at 82000000 ...
   Using 'conf@1' configuration
   Verifying Hash Integrity ... sha1,rsa2048:my_keyRSA: Can't find Modular Exp implementation
RSA: Can't find Modular Exp implementation
- Failed to verify required signature 'key-my_key'
Bad Data Hash
ERROR: can't get kernel image!
Overo #

**

如 doc/uImage.FIT/beaglebone_vboot.txt 中所述,我尝试了脚本 - tools/fit_check_sign,其输出正常。能够验证签名。

所以仍然不知道,确切的问题是什么,为什么我会收到上述错误消息。 我搜索了 UCLASS_MOD_EXP, /* RSA Mod Exp device */,但找不到太多信息。

什么是 RSA Mod Exp 设备以及如何确保我拥有该设备?

对调试的任何输入都会非常有帮助。

编辑:

diff include/configs/omap3_overo.h ../../u-boot2015.07/include/configs/omap3_overo.h 
        191a192,199
        > 
        > #define CONFIG_OF_CONTROL                                                               
        > #define CONFIG_OF_SEPARATE  
        > #define CONFIG_FIT
        > #define CONFIG_FIT_SIGNATURE
        > #define CONFIG_RSA
        > #define CONFIG_FIT_VERBOSE
        >

【问题讨论】:

    标签: bootloader u-boot gumstix


    【解决方案1】:

    嗯,第一个要解决的问题就在这里:

    reading u-boot.img
    spl_load_image_fat: error reading image u-boot.img, err - -1
    

    那么你的 SD 卡有 u-boot.img 吗?请注意,您链接到的示例 NOT 执行 SPL,而是执行旧样式(但仍然有效且受支持)的 imximage 格式,因为它在 i.MX 上并且您使用的是 OMAP3 平台.在这种情况下,阅读 doc/uImage.FIT/beaglebone_vboot.txt 对您非常有帮助,因为 am335x(在 beaglebone 板上找到)是 OMAP3 部件的演变,而不是不同的 SoC 供应商(例如 i.MX 与 OMAP3 是)。

    编辑: 现在我们正在加载正确的文件,在 v2015.07 中,这些文件尚未迁移到 Kconfig。您是否启用了 CONFIG_RSA?看看在各种配置头和树的其余部分中的 ENABLE_VBOOT 下做了什么,你需要做类似的事情。

    【讨论】:

    • 我根据您来自 doc/uImage.FIT/beaglebone_vboot.txt 的反馈编辑了这个问题。但仍然面临启动问题
    • 我已经更新了我的答案,但也请发布您的 omap3_overo.h 配置文件的差异。
    • 我已经添加了差异并且我也在使用 CONFIG_RSA。现在正在调查其他 VBOOT 文件..
    • 嗨,Tom,我正在试验 CONFIG_RSA。工作组合是 configs/omap3_overo_defconfig 中的 CONFIG_RSA=y CONFIG_DM=y 和 #define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE #define CONFIG_OF_SEPARATE #define CONFIG_FIT #define CONFIG_FIT_SIGNATURE #define CONFIG_FIT_VERBOSE in include/configs/omap3_overo.h 我还使用了 EXT_DTB 选项进行制作。现在它可以很好地用于 gumstix overo 的验证启动。我认为重要的一点是将 CONFIG_RSA 放在 defconfig 而不是 omap3_config.h 中,这将启用 RSA 设备。感谢您的帮助。
    猜你喜欢
    • 2020-04-22
    • 2015-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-30
    • 2019-04-03
    • 2020-08-25
    • 1970-01-01
    相关资源
    最近更新 更多