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.

Linux/66AK2H12: Bitbake complains about expansion error

Part Number: 66AK2H12

Tool/software: Linux

Hi,

I am trying to build Linux using Yocto following the guide at http://processors.wiki.ti.com/index.php/Processor_SDK_Building_The_SDK

I am getting what I have pasted below. Also, what is not visible in that console output is that after running bitbake, there exists a directory named ${OEBASE} in the directory where I run bitbake. I am quite sure that's a sign of variable expansion not working somewhere, but I am not sure if what bitbake is complaining about is the same problem.

Any ideas what to do?

/yocto/tisdk/build$ MACHINE=k2hk-evm bitbake -p -P arago-core-tisdk-image
NOTE: Your conf/bblayers.conf has been automatically updated.
NOTE: Your conf/bblayers.conf has been automatically updated.
WARNING: Can't get the filesystem id of: ${OEBASE}/build/arago-tmp-external-linaro-toolchain
WARNING: /yocto/tisdk/sources/meta-ti/recipes-ti/devtools/ti-cgt6x_8.2.2.bb: ti-cgt6x-8.2.2 ONLY supports hardfp mode for now                                                                | ETA:  0:00:57
WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_4.9.bb: Exception during build_dependencies for PKG_kernel-base                                                  | ETA:  0:00:55
WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_4.9.bb: Error during finalise of /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_4.9.bb
ERROR: ExpansionError during parsing /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_4.9.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable PKG_kernel-base, expression was kernel-${@legitimize_package_name('${@get_kernelversion_headers('${OEBASE}/build/arago-tmp-external-linaro-toolchain/work/arago-linux-gnueabi/linux-ti-staging/4.9.59+gitAUTOINC+a75d8e9305-a.arago5.tisdk16/build')}')} which triggered exception SyntaxError: invalid syntax (PKG_kernel-base, line 1)

WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.9.bb: Exception during build_dependencies for PKG_kernel-base
WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.9.bb: Error during finalise of /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.9.bb
WARNING: /yocto/tisdk/sources/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_1.14.3699939.bb: ti-sgx-ddk-um-1.14.3699939 ONLY supports hardfp mode for now
WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.9.bb: Exception during build_dependencies for PKG_kernel-base
WARNING: /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.9.bb: Error during finalise of /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.9.bb
Processed parsing statistics saved to profile-parse.log.processed

Summary: There were 9 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Raw profiling information saved to profile.log and processed statistics to profile.log.processed

This is what I did to get the SDK:

/yocto$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk

/yocto/tisdk$ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-04.02.00.09-config.txt

  • Hi,

    The above wiki page is outdated. You need to follow this guide:
    software-dl.ti.com/.../Overview_Building_the_SDK.html

    As for the ${OEBASE} directory, you are correct. The error log points the origin of this problem:
    ERROR: ExpansionError during parsing /yocto/tisdk/sources/meta-ti/recipes-kernel/linux/linux-ti-staging_4.9.bb
    Traceback (most recent call last):
    bb.data_smart.ExpansionError: Failure expanding variable PKG_kernel-base, expression was kernel-${@legitimize_package_name('${@get_kernelversion_headers('${OEBASE}/build/arago-tmp-external-linaro-toolchain/work/arago-linux-gnueabi/linux-ti-staging/4.9.59+gitAUTOINC+a75d8e9305-a.arago5.tisdk16/build')}')} which triggered exception SyntaxError: invalid syntax (PKG_kernel-base, line 1)

    Not sure what, but I think this is a problem with your environment or host setup. Can you do the build again following the link I gave? Basically you need to execute:

    "For Ubuntu 14.04 and 16.04, please run the following:

    $ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386

    By default Ubuntu uses “dash” as the default shell for /bin/sh. You must reconfigure to use bash by running the following command:

    sudo dpkg-reconfigure dash

    Be sure to select “No” when you are asked to use dash as the default system shell."

    Then:
    "Cross-Compile Toolchain

    Run the following commands to install the Linaro Toolchain.

    $ wget releases.linaro.org/.../gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
    $ tar -Jxvf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME
    $ wget releases.linaro.org/.../gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
    $ tar -Jxvf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz -C $HOME"

    And finally build the Yocto filesystem:
    "$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
    $ cd tisdk
    $ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-<version>-config.txt
    $ cd build
    $ . conf/setenv
    $ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf
    $ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu
    $ MACHINE=am57xx-evm bitbake arago-base-tisdk-image"

    Best Regards,
    Yordan