Clean build Yocto Error

Hi!

I am doing a build of torizoncore following this Build TorizonCore from Source With Yocto Project

and run Repo init

repo init -u https://git.toradex.com/toradex-manifest.git -b refs/tags/5.7.0 -m torizoncore/default.xml

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-tdx-linux"
MACHINE              = "verdin-imx8mm"
DISTRO               = "torizon-upstream"
DISTRO_VERSION       = "5.7.0-devel-20230217000644+build.0"
TUNE_FEATURES        = "aarch64"
TARGET_FPU           = ""
meta-toradex-torizon = "HEAD:35ee5073578e3a62891e5cfdc64aaf310e7c1f4c"
meta-toradex-distro  = "HEAD:cbde0286cb85bc445e70210b8df38f29b4784c08"
meta-toradex-bsp-common = "HEAD:029a663150449a5e71b84dd4000476754d525c8c"
meta-oe              
meta-networking      
meta-filesystems     
meta-python          
meta-perl            = "HEAD:8ff12bfffcf0840d5518788a53d88d708ad3aae0"
meta-virtualization  = "HEAD:f6b88c1d2f515ffac90457c0d649d6c805fff736"
meta-updater         = "HEAD:eba4b74e6e30fb70d26b3034d18ece4d331fca04"
meta-toradex-nxp     = "HEAD:ee63c90fde9fde0229bff9ac1c5cffe356fc4f41"
meta-freescale       = "HEAD:3cb29cff92568ea835ef070490f185349d712837"
meta-freescale-3rdparty = "HEAD:c52f64973cd4043a5e8be1c7e29bb9690eb4c3e5"
meta-yocto-bsp       
meta-poky            = "HEAD:7e0063a8546250c4c5b9454cfa89fff451a280ee"
meta-security        = "HEAD:c62970fda82acf75035243766ecd195243e0f82a"
meta                 = "HEAD:add860e1a69f848097bbc511137a62d5746e5019"

The error that shows me is the following

Initialising tasks: 100% |#######################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 357 Found 295 Missed 62 Current 1783 (82% match, 97% complete)
NOTE: Executing Tasks
ERROR: linux-toradex-5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0 do_kernel_localversion: Execution of 'Torizoncore_Driver/Build1/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0/temp/run.do_kernel_localversion.4020041' failed with exit code 2
ERROR: Logfile of failure stored in: Torizoncore_Driver/Build1/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0/temp/log.do_kernel_localversion.4020041
Log data follows:
| DEBUG: Executing shell function do_kernel_localversion
| Torizoncore_Driver/Build1/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0/temp/run.do_kernel_localversion.4020041: 121: cannot open MECH/Torizoncore_Driver/Build1/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0/defconfig: No such file
| WARNING: exit code 2 from a shell command.
| ERROR: Execution of 'Torizoncore_Driver/Build1/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.193+gitAUTOINC+cf62fa8fd9_f782992971-r0/temp/run.do_kernel_localversion.4020041' failed with exit code 2
ERROR: Task (Torizoncore_Driver/Build1/conf/../../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_kernel_localversion) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6346 tasks of which 6345 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 1 task failed:
  /Torizoncore_Driver/Build1/conf/../../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_kernel_localversion
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I hope you can help me

Best regards,

Ivan

Greetings @Isaga,

Did you run the setup-environment script successfully? Also did you set any environment variables or other configurations?

One issue I see is that your DISTRO is set to torizon-upstream. However, for the Verdin i.MX8MM this should just be torizon since this module uses the downstream kernel not the upstream. Seems like somehow the build environment was not correctly setup.

Best Regards,
Jeremias