Need to close OPTEE
# cd flexbuild_lsdk2108/
# vim configs/sdk.yml, and change OPTEE:y to OPTEE:n
root@fbubuntu optee_os]$ source setup.env && flex-builder -i mkfw -a arm64 -m ls1046ardb sd
...
Building optee_os ...
make[4]: Entering directory '/home/simonk/flexbuild-public-with-patches-scrap/components/apps/security/optee_os'
core/arch/arm/plat-ls/link.mk:7: warning: overriding recipe for target 'out/arm-plat-ls/core/tee-raw.bin'
core/arch/arm/kernel/link.mk:230: warning: ignoring old recipe for target 'out/arm-plat-ls/core/tee-raw.bin'
CHK out/arm-plat-ls/conf.mk
CHK out/arm-plat-ls/include/generated/conf.h
CC out/arm-plat-ls/core/include/generated/.asm-defines.s
In file included from <command-line>:
./out/arm-plat-ls/include/generated/conf.h:119:25: warning: "CFG_TEE_CORE_NB_CORE" is not defined, evaluates to 0 [-Wundef]
119 | #define CFG_NUM_THREADS CFG_TEE_CORE_NB_CORE
| ^~~~~~~~~~~~~~~~~~~~
core/arch/arm/include/mm/pgt_cache.h:45:5: note: in expansion of macro 'CFG_NUM_THREADS'
45 | #if CFG_NUM_THREADS < 2
| ^~~~~~~~~~~~~~~
In file included from core/arch/arm/plat-ls/./platform_config.h:33,
from core/arch/arm/include/mm/core_mmu.h:18,
from core/arch/arm/kernel/thread_private.h:12,
from core/arch/arm/kernel/asm-defines.c:12:
core/arch/arm/include/mm/generic_ram_layout.h:132:2: error: #error CFG_SHMEM_START mandates CFG_SHMEM_SIZE
132 | #error CFG_SHMEM_START mandates CFG_SHMEM_SIZE
| ^~~~~
make[4]: *** [mk/compile.mk:246: out/arm-plat-ls/core/include/generated/.asm-defines.s] Error 1
make[4]: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap/components/apps/security/optee_os'
make[3]: *** [/home/simonk/flexbuild-public-with-patches-scrap/packages/apps/security/optee.mk:14: optee_os] Error 2
make[3]: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap/packages/apps'
make[2]: *** [Makefile:25: optee_os] Error 2
make[2]: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap'
make -s -j12 fip pbl PLAT=ls1046apscb BOOT_MODE=sd RCW=/home/simonk/flexbuild-public-with-patches-scrap/build/firmware/rcw/ls1046apscb/NN_FNSNPPPP_1133_8888/rcw_1600_sdboot.bin BL33=/home/simonk/flexbuild-public-with-patches-scrap/build/firmware/u-boot/ls1046apscb/uboot_ls1046apscb_tfa.bin BL32=/home/simonk/flexbuild-public-with-patches-scrap/components/apps/security/optee_os/out/arm-plat-ls/core/tee_ls1046apsc.bin SPD=opteed
make[2]: Entering directory '/home/simonk/flexbuild-public-with-patches-scrap/components/firmware/atf'
Including services/spd/opteed/opteed.mk
board PAth = plat/nxp/soc-ls1046a/ls1046apscb
setting chssis
Makefile:1121: *** 'BL32=/home/simonk/flexbuild-public-with-patches-scrap/components/apps/security/optee_os/out/arm-plat-ls/core/tee_ls1046apsc.bin' was specified, but '/home/simonk/flexbuild-public-with-patches-scrap/components/apps/security/optee_os/out/arm-plat-ls/core/tee_ls1046apsc.bin' does not exist. Stop.
make[2]: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap/components/firmware/atf'
cp: cannot stat 'build/ls1046apscb/release/bl2_sd*.pbl': No such file or directory
make[1]: *** [atf.mk:11: atf] Error 1
make[1]: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap/packages/firmware'
make: *** [Makefile:19: atf] Error 2
make: Leaving directory '/home/simonk/flexbuild-public-with-patches-scrap'
If changing OPTEE:y to OPTEE:n in configs/sdk.yml, the package optee_os shouldn't be built any more.
In addition, why your flex-builder project folder is flexbuild-public-with-patches-scrap not flexbuild_lsdk2108? Are you using LSDK 21.08?