i.MX8 ULP EVK - core-image-minimal-secure-boot build problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8 ULP EVK - core-image-minimal-secure-boot build problem

Jump to solution
1,906 Views
ddresser
Contributor III

Hello,
I am trying to build a minimal secure boot exmple for an i.MX8 ULP EVK board using these commands


# repo init -uhttps://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.23-2.0.0_security-reference-design.xml
# DISTRO=fsl-imx-wayland MACHINE=imx8ulp-lpddr4-evk source imx-setup-release.sh -b buil
echo "CST_PATH = \"/my/path/to/cst-3.4.1\"" >> conf/local.conf
# bitbake core-image-minimal-secure-boo


I have generated the certs and keys with CST.


I am seeing this error:


ERROR: cargo-native-1.75.0-r0 do_compile: ExecutionError('/home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/temp/run.do_compile.19360', 101, None, None)
ERROR: Logfile of failure stored in: /home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/temp/log.do_compile.19360
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: Using rust targets from /home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/rust-targets/
| NOTE: cargo = /home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/cargo-1.74.0-x86_64-unknown-linux-gnu/bin/cargo
| NOTE: /home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/cargo-1.74.0-x86_64-unknown-linux-gnu/bin/cargo build -v --frozen --target x86_64-unknown-linux-gnu --release --manifest-path=/home/ddresser/src/imx-yocto-bsp-secureboot/build/tmp/work/x86_64-linux/cargo-native/1.75.0/rustc-1.75.0-src/src/tools/cargo//Cargo.toml
| error: could not execute process `rustc -vV` (never executed)
|
| Caused by:
|  Exec format error (os error
| WARNING: exit code 101 from a shell command.
ERROR: Task (virtual:native:/home/ddresser/src/imx-yocto-bsp-secureboot/sources/poky/meta/recipes-devtools/rust/cargo_1.75.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2232 tasks of which 2231 didn't need to be rerun and 1 failed.Summary: 1 task failed:
 virtual:native:/home/ddresser/src/imx-yocto-bsp-secureboot/sources/poky/meta/recipes-devtools/rust/cargo_1.75.0.bb:do_compile


I have tried cleaning and rebuilding cargo-native and rust with the same results. Any suggestions are appreciated. Thanks.

0 Kudos
Reply
1 Solution
1,850 Views
ddresser
Contributor III

I resolved this by updating the repo manifest.  I submitted a pull request with a fix.

https://github.com/nxp-https://github.com/nxp-imx/imx-manifest/pull/8/imx-manifest/pull/8 

View solution in original post

5 Replies
1,851 Views
ddresser
Contributor III

I resolved this by updating the repo manifest.  I submitted a pull request with a fix.

https://github.com/nxp-https://github.com/nxp-imx/imx-manifest/pull/8/imx-manifest/pull/8 

1,839 Views
Harvey021
NXP TechSupport
NXP TechSupport

Thanks for the note, will inform the owner to have an update.

You can also work with other BSP - like the one for reference - L6.6.36_2.1.0-DOCS 

 

Regards

Harvey

 

Regards

Harvey

 

0 Kudos
Reply
1,873 Views
ddresser
Contributor III

FYI, running the command as it appears in the doc gives this:

ddresser@elmore:~/src/imx-yocto-bsp-secureboot$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.52-2.2.0_security-reference-design.xml

Downloading Repo source from https://gerrit.googlesource.com/git-repo

fatal: manifest 'imx-6.6.52-2.2.0_security-reference-design.xml' not available

fatal: manifest imx-6.6.52-2.2.0_security-reference-design.xml not found

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

Repo command failed: UpdateManifestError

        Unable to sync manifest imx-6.6.52-2.2.0_security-reference-design.xml

0 Kudos
Reply
1,873 Views
ddresser
Contributor III

Thanks for the response.  Yes, I have tried that.

I am using the process:

10.9.1.3 Yocto setup for secure boot build

from https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf 

I am able to build the non-secure boot process from the same document successfully.

I just noticed that the document specifies the `imx-6.6.52-2.2.0_security-reference-design.xml` on the `imx-linux-scarthgap` branch

repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap - m imx-6.6.52-2.2.0_security-reference-design.xml

However, that branch has this version of the file:

imx-6.6.23-2.0.0_security-reference-design.xml`

I see references to the 6.6.52 version in the commit notes, but don't see that file.

0 Kudos
Reply
1,886 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hello,

Have you tried to bitbake -c cleanll cargo; bitbake cargo?

And assume that your host to build is version of Ubuntu 22.04 and all packages for host setup not missed.

 

Regards

Harvey

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2031862%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031862%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EI%20am%20trying%20to%20build%20a%20minimal%20secure%20boot%20exmple%20for%20an%20i.MX8%20ULP%20EVK%20board%20using%20these%20commands%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%23%20repo%20init%20-u%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20nofollow%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%3C%2FA%3E%20-b%20imx-linux-scarthgap%20-m%20imx-6.6.23-2.0.0_security-reference-design.xml%3CBR%20%2F%3E%23%20DISTRO%3Dfsl-imx-wayland%20MACHINE%3Dimx8ulp-lpddr4-evk%20source%20imx-setup-release.sh%20-b%20buil%3CBR%20%2F%3Eecho%20%22CST_PATH%20%3D%20%5C%22%2Fmy%2Fpath%2Fto%2Fcst-3.4.1%5C%22%22%20%26gt%3B%26gt%3B%20conf%2Flocal.conf%3CBR%20%2F%3E%23%20bitbake%20core-image-minimal-secure-boo%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20have%20generated%20the%20certs%20and%20keys%20with%20CST.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20am%20seeing%20this%20error%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EERROR%3C%2FSTRONG%3E%3A%20cargo-native-1.75.0-r0%20do_compile%3A%20ExecutionError('%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Ftemp%2Frun.do_compile.19360'%2C%20101%2C%20None%2C%20None)%3CBR%20%2F%3E%3CSTRONG%3EERROR%3C%2FSTRONG%3E%3A%20Logfile%20of%20failure%20stored%20in%3A%20%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Ftemp%2Flog.do_compile.19360%3CBR%20%2F%3ELog%20data%20follows%3A%3CBR%20%2F%3E%7C%20DEBUG%3A%20Executing%20shell%20function%20do_compile%3CBR%20%2F%3E%7C%20NOTE%3A%20Using%20rust%20targets%20from%20%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Frust-targets%2F%3CBR%20%2F%3E%7C%20NOTE%3A%20cargo%20%3D%20%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Fcargo-1.74.0-x86_64-unknown-linux-gnu%2Fbin%2Fcargo%3CBR%20%2F%3E%7C%20NOTE%3A%20%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Fcargo-1.74.0-x86_64-unknown-linux-gnu%2Fbin%2Fcargo%20build%20-v%20--frozen%20--target%20x86_64-unknown-linux-gnu%20--release%20--manifest-path%3D%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fbuild%2Ftmp%2Fwork%2Fx86_64-linux%2Fcargo-native%2F1.75.0%2Frustc-1.75.0-src%2Fsrc%2Ftools%2Fcargo%2F%2FCargo.toml%3CBR%20%2F%3E%7C%20error%3A%20could%20not%20execute%20process%20%60rustc%20-vV%60%20(never%20executed)%3CBR%20%2F%3E%7C%3CBR%20%2F%3E%7C%20Caused%20by%3A%3CBR%20%2F%3E%7C%26nbsp%3B%20Exec%20format%20error%20(os%20error%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%7C%20WARNING%3A%20exit%20code%20101%20from%20a%20shell%20command.%3CBR%20%2F%3E%3CSTRONG%3EERROR%3C%2FSTRONG%3E%3A%20Task%20(virtual%3Anative%3A%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fsources%2Fpoky%2Fmeta%2Frecipes-devtools%2Frust%2Fcargo_1.75.0.bb%3Ado_compile)%20failed%20with%20exit%20code%20'1'%3CBR%20%2F%3E%3CSTRONG%3ENOTE%3C%2FSTRONG%3E%3A%20Tasks%20Summary%3A%20Attempted%202232%20tasks%20of%20which%202231%20didn't%20need%20to%20be%20rerun%20and%201%20failed.Summary%3A%201%20task%20failed%3A%3CBR%20%2F%3E%26nbsp%3Bvirtual%3Anative%3A%2Fhome%2Fddresser%2Fsrc%2Fimx-yocto-bsp-secureboot%2Fsources%2Fpoky%2Fmeta%2Frecipes-devtools%2Frust%2Fcargo_1.75.0.bb%3Ado_compile%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20have%20tried%20cleaning%20and%20rebuilding%20cargo-native%20and%20rust%20with%20the%20same%20results.%20Any%20suggestions%20are%20appreciated.%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2032737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2032737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20for%20the%20note%2C%20will%20inform%20the%20owner%20to%20have%20an%20update.%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20work%20with%20other%20BSP%20-%20like%20the%20one%20for%20reference%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fsupporting-information%2FL6.6.36_2.1.0-DOCS.zip%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EL6.6.36_2.1.0-DOCS%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3EHarvey%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3EHarvey%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2032685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2032685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20resolved%20this%20by%20updating%20the%20repo%20manifest.%26nbsp%3B%20I%20submitted%20a%20pull%20request%20with%20a%20fix.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%2Fpull%2F8%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%2Fpull%2F8%2Fimx-manifest%2Fpull%2F8%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2032474%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2032474%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFYI%2C%20running%20the%20command%20as%20it%20appears%20in%20the%20doc%20gives%20this%3A%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3Eddresser%40elmore%3A~%2Fsrc%2Fimx-yocto-bsp-secureboot%24%20repo%20init%20-u%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%3C%2FA%3E%20-b%20imx-linux-scarthgap%20-m%20imx-6.6.52-2.2.0_security-reference-design.xml%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3EDownloading%20Repo%20source%20from%20%3CA%20href%3D%22https%3A%2F%2Fgerrit.googlesource.com%2Fgit-repo%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgerrit.googlesource.com%2Fgit-repo%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3Efatal%3A%20manifest%20'imx-6.6.52-2.2.0_security-reference-design.xml'%20not%20available%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3Efatal%3A%20manifest%20imx-6.6.52-2.2.0_security-reference-design.xml%20not%20found%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3ERepo%20command%20failed%3A%20UpdateManifestError%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3EUnable%20to%20sync%20manifest%20imx-6.6.52-2.2.0_security-reference-design.xml%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2032464%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2032464%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20for%20the%20response.%26nbsp%3B%20Yes%2C%20I%20have%20tried%20that.%3C%2FP%3E%3CP%3EI%20am%20using%20the%20process%3A%3C%2FP%3E%3CP%3E10.9.1.3%20Yocto%20setup%20for%20secure%20boot%20build%3C%2FP%3E%3CP%3Efrom%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FIMX_LINUX_USERS_GUIDE.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FIMX_LINUX_USERS_GUIDE.pdf%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20able%20to%20build%20the%20non-secure%20boot%20process%20from%20the%20same%20document%20successfully.%3C%2FP%3E%3CP%3EI%20just%20noticed%20that%20the%20document%20specifies%20the%20%60imx-%3CSTRONG%3E6.6.52-2.2.0%3C%2FSTRONG%3E_security-reference-design.xml%60%20on%20the%20%60imx-linux-scarthgap%60%20branch%3C%2FP%3E%3CP%3Erepo%20init%20-u%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Fimx-manifest%3C%2FA%3E%20-b%20imx-linux-scarthgap%20-%20m%20imx-6.6.52-2.2.0_security-reference-design.xml%3C%2FP%3E%3CP%3EHowever%2C%20that%20branch%20has%20this%20version%20of%20the%20file%3A%3C%2FP%3E%3CP%3Eimx-%3CSTRONG%3E6.6.23-2.0.0%3C%2FSTRONG%3E_security-reference-design.xml%60%3C%2FP%3E%3CP%3EI%20see%20references%20to%20the%206.6.52%20version%20in%20the%20commit%20notes%2C%20but%20don't%20see%20that%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2032330%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX8%20ULP%20EVK%20-%20core-image-minimal-secure-boot%20build%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2032330%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EHave%20you%20tried%20to%20bitbake%20-c%20cleanll%20cargo%3B%20bitbake%20cargo%3F%3C%2FP%3E%0A%3CP%3EAnd%20assume%20that%20your%20host%20to%20build%20is%20version%20of%26nbsp%3BUbuntu%2022.04%20and%20all%20packages%20for%20host%20setup%20not%20missed.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3EHarvey%3C%2FP%3E%3C%2FLINGO-BODY%3E