Hi all, recently I encountered a problem about some environment params that we 
exported not being recognised and parsed properly when runnning the command " 
*bitbake -c populate_sdk_ext ipcam-image* ".  For comparison, " bitbake -c 
populate_sdk ipcam-image " can work perfectly.
Currently, I don't know how to dig out the root cause and resolve it 
accordingly. Any help from here is appreciated.

*1. The error messages are as following:*
ERROR: ipcam-image-1.0-r0 do_populate_sdk_ext: Failed to generate filtered task 
list for extensible SDK:
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
core-image-full-cmdline
core-image-sato
core-image-weston
meta-toolchain
meta-ide-support
You can also run generated qemu images with a command like 'runqemu qemux86-64'.
Other commonly useful commands are:
- 'devtool' and 'recipetool' handle common recipe tasks
- 'bitbake-layers' handles common layer tasks
- 'oe-pkgdata-util' handles common target package tasks
ERROR: bitbake failed:
Loading cache...done.
Loaded 0 entries from dependency cache.
Parsing recipes...ERROR: 
/yocto/system/sjhan/re_sdk/sdk_1.5/topdir/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/
 omc-ov2778-datas_1.0.0.bb : EXTERNALSRC must be an absolute path *
*...........................

*2. Take one recipe as example.*
*Because of the "EXTERNALSRC" in our recipes contain the environment params, so 
I added some printing informations* in " meta/classes/externalsrc.bbclass " 
*to* print the value of externalsrc after error messages *.
Then I found that some environment variables can be parsed but others cannot.*
Parsing recipes...ERROR: 
/yocto/system/sjhan/re_sdk/sdk_1.5/topdir/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/omc-ov2778-datas_1.0.0.bb:
 *EXTERNALSRC must be an absolute path* : ${ENV_TOP_DIR} /packages/idsp/data/ 
img_cv2x /OMC/ov2778

These are the content of this recipe: omc-ov2778-datas_1.0.0.bbappend.
inherit externalsrc
EXTERNALSRC = " ${ENV_TOP_DIR} /packages/idsp/data/ img_${AMBA_IMG_ARCH} 
/OMC/ov2778"
EXTERNALSRC_BUILD = 
"${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IMG_ARCH}/OMC/ov2778"
The environment params here are exported in ambaenv.bbclass. And we inherit 
this bbclass in omc-ov2778-datas_1.0.0.bb.
*3. Continue tracking.
I tried to trace the poky source code. The code execution flow is as below. I 
also put the code piece here about where the error occurred.*

* poky/meta/lib/oe/copy_buildsystem.py:    check_sstate_task_list(). In this 
function, it runs *bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, 
cwd=cwd, executable='/bin/bash')* , the *cmd* here is ". 
layers/poky/oe-init-build-env . ;PYTHONDONTWRITEBYTECODE=1 
BB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate ipcam-image 
meta-extsdk-toolchain:do_populate_sysroot -s -o 
/yocto/system/sjhan/re_sdk/sdk_1.5/ambarella/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/tasklist.txt
 -l 
/yocto/system/sjhan/re_sdk/sdk_1.5/ambarella/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/tasklist_bb_log.txt
 ".
* poky/scripts/oe-check-sstate:    check(). In this function, it runs *output = 
subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env)* , the *cmd* 
here is " ['bitbake', '--dry-run', '--runall=build', 'ipcam-image', 
'meta-extsdk-toolchain:do_populate_sysroot'] "

*Then, the error occured.

4. Other informations maybe help.
* I enter the directory 
tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk and 
rerun the command ". layers/poky/oe-init-build-env . " and " bitbake --dty-run 
--runall=build ipcam-image ", I can reproduce this issue.
If I don't rerun ". layers/poky/oe-init-build-env . " but just run " bitbake 
--dty-run --runall=build ipcam-image ", it can pass. *

*
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61886): https://lists.yoctoproject.org/g/yocto/message/61886
Mute This Topic: https://lists.yoctoproject.org/mt/103167520/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to