How can I boot the Linux kernel with U-Boot when HAB is enabled?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I boot the Linux kernel with U-Boot when HAB is enabled?

ソリューションへジャンプ
1,084件の閲覧回数
spthx
Contributor II

I am using the i.MX8M Nano.
I have read the uboot-imx documentation and other related materials, and I am now able to boot U-Boot with secure boot and encrypted boot enabled.

Now, I am trying to manually load a pre-built kernel and DTB and boot using the booti command. However, I encountered the following error:

I suspect that the error is due to the kernel image not being signed.

u-boot=> fatload mmc 2:1 ${loadaddr} Image
28013056 bytes read in 144 ms (185.5 MiB/s)
u-boot=> fatload mmc 2:1 ${fdt_addr} imx8mn-ddr3l-evk.dtb
40155 bytes read in 9 ms (4.3 MiB/s)
u-boot=> booti ${loadaddr} - ${fdt_addr}

Authenticate image from DDR location 0x40400000...
bad magic magic=0xff length=0xffff version=0xff
bad length magic=0xff length=0xffff version=0xff
Bad version magic=0xff length=0xffff version=0xff
Error: Invalid IVT structure
Authenticate Image Fail, Please check


How can I boot the Linux kernel with U-Boot when HAB is enabled?
If signing is required, how should I sign the kernel?

Additionally, the method described in the earlier guide seems to assume a standalone environment.
How can I generate an HAB-compatible image within Yocto?

Best regards.

0 件の賞賛
返信
1 解決策
1,054件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Please have a reference to the <3. Authenticating additional boot images> of mx8m_secure_boot.txt for kernel signing.

About How can I generate an HAB-compatible image within Yocto?

-> Please have a reference to <10.9 Security reference design> of IMX_LINUX_USERS_GUIDE.pdf 

 

Regards

Harvey

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,055件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Please have a reference to the <3. Authenticating additional boot images> of mx8m_secure_boot.txt for kernel signing.

About How can I generate an HAB-compatible image within Yocto?

-> Please have a reference to <10.9 Security reference design> of IMX_LINUX_USERS_GUIDE.pdf 

 

Regards

Harvey

 

0 件の賞賛
返信
1,032件の閲覧回数
spthx
Contributor II

Hi @Harvey021,

Thanks for your help.
HAB authentication passes now, but I get a kernel panic.
Do you know what might be causing this?

Best Regards,

0 件の賞賛
返信
1,006件の閲覧回数
spthx
Contributor II
Resolved.
The reason was that bootargs was not configured.
%3CLINGO-SUB%20id%3D%22lingo-sub-2070990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHAB%E3%81%8C%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%ABU-Boot%E3%81%A7Linux%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2070990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ei.MX8M%20Nano%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3Euboot-imx%20%E3%81%AE%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%86%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%84%E3%81%9D%E3%81%AE%E4%BB%96%E3%81%AE%E9%96%A2%E9%80%A3%E8%B3%87%E6%96%99%E3%82%92%E8%AA%AD%E3%81%BF%E3%80%81%E3%82%BB%E3%82%AD%E3%83%A5%E3%82%A2%E3%83%96%E3%83%BC%E3%83%88%E3%81%A8%E6%9A%97%E5%8F%B7%E5%8C%96%E3%83%96%E3%83%BC%E3%83%88%E3%82%92%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%97%E3%81%A6%20U-Boot%20%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CP%3E%E7%8F%BE%E5%9C%A8%E3%80%81%E3%83%93%E3%83%AB%E3%83%89%E6%B8%88%E3%81%BF%E3%81%AE%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%81%A8DTB%E3%82%92%E6%89%8B%E5%8B%95%E3%81%A7%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%80%81booti%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E8%B5%B7%E5%8B%95%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%81%9F%E3%81%A0%E3%81%97%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%8C%E7%99%BA%E7%94%9F%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AF%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%81%8C%E7%BD%B2%E5%90%8D%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E3%81%93%E3%81%A8%E3%81%8C%E5%8E%9F%E5%9B%A0%E3%81%A7%E3%81%82%E3%82%8B%E3%81%A8%E6%80%9D%E3%82%8F%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3Eu-boot%3D%26gt%3B%20fatload%20mmc%202%3A1%20%24%7Bloadaddr%7D%20Image%0A28013056%20bytes%20read%20in%20144%20ms%20(185.5%20MiB%2Fs)%0Au-boot%3D%26gt%3B%20fatload%20mmc%202%3A1%20%24%7Bfdt_addr%7D%20imx8mn-ddr3l-evk.dtb%0A40155%20bytes%20read%20in%209%20ms%20(4.3%20MiB%2Fs)%0Au-boot%3D%26gt%3B%20booti%20%24%7Bloadaddr%7D%20-%20%24%7Bfdt_addr%7D%0A%0AAuthenticate%20image%20from%20DDR%20location%200x40400000...%0Abad%20magic%20magic%3D0xff%20length%3D0xffff%20version%3D0xff%0Abad%20length%20magic%3D0xff%20length%3D0xffff%20version%3D0xff%0ABad%20version%20magic%3D0xff%20length%3D0xffff%20version%3D0xff%0AError%3A%20Invalid%20IVT%20structure%0AAuthenticate%20Image%20Fail%2C%20Please%20check%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3EHAB%E3%81%8C%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%ABU-Boot%E3%81%A7Linux%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3CBR%20%2F%3E%E7%BD%B2%E5%90%8D%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%AA%E5%A0%B4%E5%90%88%E3%80%81%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%81%AB%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E7%BD%B2%E5%90%8D%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3CP%3E%E3%81%95%E3%82%89%E3%81%AB%E3%80%81%E5%89%8D%E3%81%AE%E3%82%AC%E3%82%A4%E3%83%89%E3%81%A7%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%9F%E6%96%B9%E6%B3%95%E3%81%AF%E3%80%81%E3%82%B9%E3%82%BF%E3%83%B3%E3%83%89%E3%82%A2%E3%83%AD%E3%83%B3%E7%92%B0%E5%A2%83%E3%82%92%E5%89%8D%E6%8F%90%E3%81%A8%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%82%88%E3%81%86%E3%81%A7%E3%81%99%E3%80%82%3CBR%20%2F%3EYocto%E5%86%85%E3%81%A7HAB%E4%BA%92%E6%8F%9B%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3CP%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%81%8A%E9%A1%98%E3%81%84%E3%81%84%E3%81%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2072414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20HAB%20%E3%81%8C%E6%9C%89%E5%8A%B9%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%20U-Boot%20%E3%81%A7%20Linux%20%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%81%84%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2072414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E8%A7%A3%E6%B1%BA%E3%80%82%3CBR%20%2F%3E%E3%81%9D%E3%81%AE%E7%90%86%E7%94%B1%E3%81%AF%E3%80%81bootargs%20%E3%81%8C%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%AA%E3%81%8B%E3%81%A3%E3%81%9F%E3%81%9F%E3%82%81%E3%81%A7%E3%81%99%E3%80%82%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E