This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: AM62XX-EVM: Yocto processor sdk linux build with "POKY" distro

Part Number: AM625

Hello Experts,

We want to build a yocto image with "POKY" distro instead of "ARAGO" for AM62xx-EVM.

We follow the steps mention in https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_03_00_19/exports/docs/linux/Overview_Building_the_SDK.html

Run the following config:

./oe-layertool-setup.sh -f configs/poky-dunfell-config.txt

However, got the following error:

MACHINE=am62xx-evm bitbake core-image-base
NOTE: Your conf/bblayers.conf has been automatically updated.
NOTE: Your conf/bblayers.conf has been automatically updated.
NOTE: Started PRServer with DBfile: /home/embedded/anil/ti_yocto/tisdk_temp/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 45783, PID: 18075
Parsing recipes: 100% |##################################################################################################| Time: 0:00:11
Parsing of 1062 .bb files complete (0 cached, 1062 parsed). 3328 targets, 441 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'python3-cryptography-native' (but /home/embedded/anil/ti_yocto/tisdk_temp/sources/meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb DEPENDS on or otherwise requires it). Close matches:
python3-pycryptodome-native
python3-pycryptodomex-native
python3-rpm-native
ERROR: Required build target 'core-image-base' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-base', 'virtual/bootloader', 'optee-os', 'python3-cryptography-native']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


From the error log, I can see that it required meta-python so I also tried adding
meta-openembedded,git://git.openembedded.org/meta-openembedded,dunfell,8ff12bf,layers=meta-networking:meta-python:meta-oe:meta-gnome:meta-filesystems
in the above config file.

By adding those layers, I am able to start the build and it works fine for other packages as well except "meta-ti/recipes-kernel/linux/linux-ti-staging_5.10.bb:do_compile" and "meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb:do_compile".

further debugging, I am also able to resolve linux-ti-stagging error by adding "KERNEL_CLASSES += "kernel-fitimage" in local.conf

However, optee-os error still there. and not found any solutions. Please see attached file for yocto build logs.

poky-distro-build-error.txt

Can someone please guide me through the correct steps?

Thanks and Regards,

Anil Patel

  • Hi Anil,

    I've not tried this, it may or may not be something we support. Give me a few days to look into this and get back here.

    Regards, Andreas

  • Thank you Andreas. Appreciate your response.

    Please let me know when you found something.

    Thanks and Regards,

    Anil Patel

  • Anil,

    some update here. I discussed with the team and they confirmed we do not currently support building the vanilla 'poky' distribution despite the presence of that config file making one think we might. This being said I'm limited in terms of how much time/energy I can devote here to help debug this. Nevertheless I set this up and tried a build and saw the same issue you saw. For the particular error you reported it's actually pretty easy to fix. One of the dependencies of OPTEE-related recipes needs to be updated using a newer drop-in replacement. See below changes to meta-ti to move past that build issue (There's actually a related commit in one of the other branches doing such a substitution also stating what I said, so I know it should be a valid fix)

    $ git diff
    diff --git a/recipes-security/optee/optee-examples_%.bbappend b/recipes-security/optee/optee-examples_%.bbappend
    index 9941b345..b9ff4167 100644
    --- a/recipes-security/optee/optee-examples_%.bbappend
    +++ b/recipes-security/optee/optee-examples_%.bbappend
    @@ -2,4 +2,4 @@ PV_ti-soc = "3.17.0+git${SRCPV}"
     SRCREV_ti-soc = "65fc74309e12189ad5b6ce3ffec37c8011088a5a"
     SRC_URI_ti-soc = "git://github.com/linaro-swg/optee_examples.git;protocol=https"
    
    -DEPENDS_append_ti-soc = " python3-cryptography-native"
    +DEPENDS_append_ti-soc = " python3-pycryptodome-native"
    diff --git a/recipes-security/optee/optee-os_%.bbappend b/recipes-security/optee/optee-os_%.bbappend
    index e7de5157..008dffb3 100644
    --- a/recipes-security/optee/optee-os_%.bbappend
    +++ b/recipes-security/optee/optee-os_%.bbappend
    @@ -2,7 +2,7 @@ PV_ti-soc = "3.18.0+git${SRCPV}"
     SRCREV_ti-soc = "8e155bae3a5eb9d1a3ed9260bd7281a7a35f5086"
     SRC_URI_ti-soc = "git://github.com/OP-TEE/optee_os.git;protocol=https"
    
    -DEPENDS_append_ti-soc = " python3-cryptography-native"
    +DEPENDS_append_ti-soc = " python3-pycryptodome-native"
    
     EXTRA_OEMAKE_append_k3 = "${@ 'CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
    
    diff --git a/recipes-security/optee/optee-test_%.bbappend b/recipes-security/optee/optee-test_%.bbappend
    index d81ae521..b15f967a 100644
    --- a/recipes-security/optee/optee-test_%.bbappend
    +++ b/recipes-security/optee/optee-test_%.bbappend
    @@ -2,4 +2,4 @@ PV_ti-soc = "3.17.0+git${SRCPV}"
     SRCREV_ti-soc = "8a698baf9e8e010e4d8d52e6aded42dfc31e5b25"
     SRC_URI_ti-soc = "git://github.com/OP-TEE/optee_test.git;protocol=https"
    
    -DEPENDS_append_ti-soc = " python3-cryptography-native"
    +DEPENDS_append_ti-soc = " python3-pycryptodome-native"

    However continuing the build eventually you'll find the Linux kernel build failing because of a missing 'fitImage' target, something like this:

    <snip>
    |   KSYMS   .tmp_vmlinux.kallsyms2.S
    |   AS      .tmp_vmlinux.kallsyms2.S
    |   LD      vmlinux
    |   SORTTAB vmlinux
    |   SYSMAP  System.map
    |   OBJCOPY arch/arm64/boot/Image
    | NOTE: make -j 15 HOSTCC=gcc  -isystem/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-
    native/usr/include -O2 -pipe -L/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/u
    sr/lib                         -L/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native
    /lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-stagi
    ng/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linu
    x/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/lib                         -Wl,-rpath,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-po
    ky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am
    62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/a07
    97059/tisdk/poky-dunfell-test/build/arago-tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc  -E HOSTCXX=g++  -isystem/home/a0797059/tisdk/poky-dunfell-test/build/ara
    go-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/include -O2 -pipe -L/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/w
    ork/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/lib                         -L/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp
    /work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-
    link,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/lib
         -Wl,-rpath-link,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/lib
                     -Wl,-rpath,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native/usr/
    lib                         -Wl,-rpath,/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-
    native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/sysroots-uninative/x86_64-linux/lib/ld-li
    nux-x86-64.so.2 fitImage CC=aarch64-poky-linux-gcc   -fuse-ld=bfd -fmacro-prefix-map=/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10
    .140+gitAUTOINC+ceb5ccdfa5-r0b=/usr/src/debug/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b                      -fdebug-prefix-map=/home/a0797059/tisdk/poky-dunfell-test/build/arago
    -tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b=/usr/src/debug/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b                      -fdebug-prefix-m
    ap=/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot=                      -fdebug-prefix
    -map=/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/recipe-sysroot-native=  -fdebug-prefix-map=/home/
    a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work-shared/am62xx-evm/kernel-sourc
    e=/usr/src/kernel -fdebug-prefix-map=/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work-shared/am62xx-evm/kernel-build-artifacts=/usr/src/kernel   LD=aarch64-poky-linux-ld.bfd   L
    OADADDR=0x80008000 DTC_FLAGS=-@
    | make[1]: *** No rule to make target 'fitImage'.  Stop.
    | make: *** [/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work-shared/am62xx-evm/kernel-source/Makefile:185: __sub-make] Error 2
    | ERROR: oe_runmake failed
    | WARNING: /home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/temp/run.do_compile.102155:1 exit 1 from 'e
    xit 1'
    | ERROR: Execution of '/home/a0797059/tisdk/poky-dunfell-test/build/arago-tmp/work/am62xx_evm-poky-linux/linux-ti-staging/5.10.140+gitAUTOINC+ceb5ccdfa5-r0b/temp/run.do_compile.102155' fai
    led with exit code 1
    ERROR: Task (/home/a0797059/tisdk/poky-dunfell-test/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_5.10.bb:do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 2674 tasks of which 661 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 1 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 0 seconds
    
    Summary: 1 task failed:
    <snip>

    I don't know how to fix this quickly but debugging this would involve getting our standard Arago-based distribution to build and the searching through the Yocto source trees for anything related to 'fitImage' and port over appropriate changes. What I do know is that boot image creation/wrapping is a little on the complex side for our AM6x devices, so I expect this effort not to be very straightforward. However if sufficiently motivated you should be able to work through this.

    Usually I'd recommend starting with our Arago-based distribution as a known-good starting point, and stripping things out or at least modeling after it for anything custom you may want to do.

    Regards, Andreas

  • Thank you Andreas for the details explanation.

    Really appreciate your effort on this.

    Previously I tried with "fitimage" issue by modifying bbclass related to that, similar to meta-arago. However, not able to resolved as it required more time. 

    I will try with "Arago" distro as of now as TI is not officially supported "POKY" and will make custom changes on top of it.

    Thanks and Regards,

    Anil Patel.