"absystem" feature doesn't work in yocto

Which system do you use? Android, Ubuntu, OOWOW or others?

Official Khadas Yocto SDK

Please describe your issue below:

When I added DISTRO_FEATURES:append = " absystem" in conf/local.conf to enbale A/B partition in yocto for OTA. I have u-boot errors when complie with bitbake amlogic-yocto or bitbake u-boot. It seems defconfig can not be found or be parsed.

Post a console log of your issue below:

DEBUG: Executing python function externalsrc_compile_prefunc
NOTE: u-boot: compiling from external source tree /vims-yocto-sdk/sources/aml-comp/uboot
DEBUG: Python function externalsrc_compile_prefunc finished
DEBUG: Executing shell function do_compile
/vims-yocto-sdk/build/tmp/work/mesong12b_kvim3_k5.15-poky-linux/u-boot/v2015.01+git999-r1/temp/run.do_compile.3950: 152: [: /vims-yocto-sdk/sources/aml-comp/uboot/bl33/v2015/board/amlogic/defconfigs/: unexpected operator
Using /vims-yocto-sdk/sources/aml-comp/uboot/bl33/v2015/board/amlogic/defconfigs/ as base
cat: /vims-yocto-sdk/sources/aml-comp/uboot/bl33/v2015/board/amlogic/defconfigs/: Is a directory
WARNING: exit code 1 from a shell command.

I think there is an error in function do_compile:prepend () in /meta-meson/recipes-bsp/u-boot/u-boot_2015.01.bb

FINAL_DEFCONFIG_PATH = “${S}/bl33/v2015/board/amlogic/defconfigs”
DEFCONFIG = “${UBOOT_TYPE%_config}_defconfig”
do_compile:prepend () {
cfg_files=$(find ${WORKDIR} -maxdepth 1 -name “*.cfg”)
if [ -n “$cfg_files” ]; then
UBOOT_TYPE=“${UBOOT_MACHINE}”
if [ ! -f ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG}.temp ]; then
mv ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG} ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG}.temp
fi

    KCONFIG_CONFIG=${FINAL_DEFCONFIG_PATH}/${DEFCONFIG} ${WORKDIR}/merge_config.sh -m -r ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG}.temp ${cfg_files}
fi

}

I tried to modify DEFCONFIG or put it after UBOOT_TYPE="${UBOOT_MACHINE}". It does not work.

@numbqq Do you have any idea about this?

I identified an issue in the do_compile:prepend() function within /meta-meson/recipes-bsp/u-boot/u-boot_2015.01.bb. When absystem is not enabled, the function does not enter the conditional block because no .cfg files are present, so everything works as expected. However, once absystem is enabled, a .cfg file absystem.cfg appears, causing the function to enter this block, which then leads to a failure due to incorrect handling of variables like UBOOT_TYPE and DEFCONFIG, or defconfg not found.

if [ -n “$cfg_files” ]; then
UBOOT_TYPE=“${UBOOT_MACHINE}”
if [ ! -f ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG}.temp ]; then
mv ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG} ${FINAL_DEFCONFIG_PATH}/${DEFCONFIG}.temp
fi

However, the absystem.cfg file contains only one line:

CONFIG_AB_SYSTEM=y

Since it’s a simple enable flag, I can try to manually activate this configuration directly within U-Boot instead of relying on the merge process.

@numbqq Do you have any feedback about this issue? Thanks a lot

Hello @JJ1997

We not checked A/B system at this moment maybe is has issues.