启用安全启动后 u-boot 挂起 : on overo
u-boot hangs after enabling secured boot : on overo
我试图在 u-boot 中为 gumstix overo storm 启用安全启动。
基于 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 :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- EXT_DTB=/work/u-boot.dtb all -j4
如果您对如何调试此问题有任何想法,请告诉我。
===================
有更新。
- 将 u-boot-dtb.img 名称更改为 u-boot.img .
- 然后开发板可以启动,但是当我尝试使用 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
>
嗯,第一个要解决的问题是:
reading u-boot.img
spl_load_image_fat: error reading image u-boot.img, err - -1
那你的SD卡有u-boot.img吗?请注意,您 link 执行的示例 不 执行 SPL,而是执行旧样式(但仍然有效且受支持)imximage 格式,因为它在 i.MX 并且您使用的是 OMAP3 平台。在这种情况下,阅读 doc/uImage.FIT/beaglebone_vboot.txt 将对您非常有帮助,因为 am335x(在 beaglebone 板上发现的)是 OMAP3 部件的演变,而不是不同的 SoC 供应商(如 i.MX 对比 OMAP3 是).
编辑:
现在我们正在加载正确的文件,在 v2015.07 中这些文件还没有迁移到 Kconfig。您是否启用了 CONFIG_RSA?查看各种配置 headers 和树的其余部分 ENABLE_VBOOT 下做了什么,您将需要做类似的事情。
我试图在 u-boot 中为 gumstix overo storm 启用安全启动。 基于 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 :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- EXT_DTB=/work/u-boot.dtb all -j4
如果您对如何调试此问题有任何想法,请告诉我。
===================
有更新。
- 将 u-boot-dtb.img 名称更改为 u-boot.img .
- 然后开发板可以启动,但是当我尝试使用 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
>
嗯,第一个要解决的问题是:
reading u-boot.img
spl_load_image_fat: error reading image u-boot.img, err - -1
那你的SD卡有u-boot.img吗?请注意,您 link 执行的示例 不 执行 SPL,而是执行旧样式(但仍然有效且受支持)imximage 格式,因为它在 i.MX 并且您使用的是 OMAP3 平台。在这种情况下,阅读 doc/uImage.FIT/beaglebone_vboot.txt 将对您非常有帮助,因为 am335x(在 beaglebone 板上发现的)是 OMAP3 部件的演变,而不是不同的 SoC 供应商(如 i.MX 对比 OMAP3 是).
编辑: 现在我们正在加载正确的文件,在 v2015.07 中这些文件还没有迁移到 Kconfig。您是否启用了 CONFIG_RSA?查看各种配置 headers 和树的其余部分 ENABLE_VBOOT 下做了什么,您将需要做类似的事情。