设为首页 加入收藏

TOP

痞子衡嵌入式:开启NXP-MCUBootUtility工具的HAB加密功能 - CST(中英双语)(二)
2019-09-01 23:09:20 】 浏览:92
Tags:痞子 嵌入式 开启 NXP-MCUBootUtility 工具 HAB 加密 功能 CST 中英 双语
quot;询问全部输入y,注意第一条命令执行后可能需要关闭控制台重新打开。所有命令正常执行结束后便完成了MSYS2的基础更新配置以及用于编译的标准包和gcc的安装。

jay@pc MSYS ~
$ pacman -Syu
$ pacman -Su
$ pacman -S –-needed base-devel
$ pacman -S mingw-w64-i686-gcc

3.2 Compile openssl under MinGW 在MinGW下编译openssl

  Then download the openssl source package on the website https://www.openssl.org/, it is recommended to select the 1.0.x version (1.1.x version seems to have issues). We choose openssl-1.0.2q.tar.gz here. After downloading, decompress it and place it in the \NXP-MCUBootUtility\tools\openssl directory. Open the MSYS2 MinGW 32-bit console from the Start menu.

  然后在网站 https://www.openssl.org/ 下载openssl的源码包,推荐选择1.0.x版本(1.1.x版本经测试有问题),这里选择的是openssl-1.0.2q.tar.gz,下载完成后将其解压放置到\NXP-MCUBootUtility\tools\openssl\目录下,从开始菜单里打开MSYS2 MinGW 32-bit控制台。

msys2StartMenuMingw32

  Use the cd command to checkout to the \NXP-MCUBootUtility\tools\openssl\openssl-1.0.2q directory and execute the following three commands in sequence. Note that the second command takes a little longer time (about 10 minutes). Please be patient.

  使用cd命令切换到\NXP-MCUBootUtility\tools\openssl\openssl-1.0.2q目录下,依次执行如下三条命令,注意第二条命令执行时间稍长(大约10分钟),请耐心等待。

jay@pc MINGW32 /d/NXP-MCUBootUtility/tools/openssl/openssl-1.0.2q
$ ./config
$ make
$ cp ms/applink.c include/openssl/

3.3 Generate cst.exe under MinGW 在MinGW下生成cst.exe

  Use the cd command to checkout to the \NXP-MCUBootUtility\tools\cst\code\back_end\src directory and execute the following two commands in sequence.

  继续在MSYS2 MinGW 32-bit控制台下操作,使用cd命令切换到\NXP-MCUBootUtility\tools\cst\code\back_end\src目录下,依次执行如下两条命令。

jay@pc MINGW32 /d/NXP-MCUBootUtility/tools/cst/code/back_end/src
$ gcc *.c -o cst.exe -I ../hdr -I ../../../../openssl/openssl-1.0.2q/include/ -L ../../../mingw32/lib/ -L ../../../../openssl/openssl-1.0.2q -lfrontend -lcrypto -lgdi32 -static
$ cp cst.exe ../../../mingw32/bin/

  At this point, the HAB encryption function is also activated. Open the NXP-MCUBootUtility and select the "HAB Encrypted Image Boot" mode in the Secure Boot Type and then enjoy it.

  至此NXP-MCUBootUtility的HAB加密功能也被激活了,打开NXP-MCUBootUtility软件,在Secure Boot Type里选择"HAB Encrypted Image Boot"模式试试吧。

enableHabEncryptFunc

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Page Cache与Page回写 下一篇rtthread移植到jz2440之BootLoader

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目