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.

AM5728: Guile libs support

Part Number: AM5728

Hello,

I am porting an app from x86 to AM57xx. The app depends on guile-2.0 libs. So I need to add guile-2.0-libs to the TI Processor SDK Linux image. The beagleboard X15 is used for this experiment. The SD card is created using the create-sdcard.sh from ti-processor-sdk-linux-am57xx-evm-05.02.00.10 based on the image tisdk-rootfs-image-am57xx-evm.

First approach - Get a prebuilt guile libs package to install it on the SD card
I downloaded the following deb for guile lib and the necessary dependent lib from Debian:
   guile-2.0-libs_2.0.11+1-9+deb8u1_armhf.deb, libgc1c2_7.2d-6.4_armhf.deb, libunistring0_0.9.3-5.2+b1_armhf.deb
Extract the deb content and copy them to the SD card, the guile lib has its own command-line app guile, so I just run it and got the following error:

root@am57xx-evm:~# /usr/lib/arm-linux-gnueabihf/guile-2.0/bin/guile
Throw without catch before boot:
Throw to key
Error while printing exception:
Key:
Failed to print exception.
Aborting.
Aborted (core dumped)

I actually tried the same guile lib deb on another SD card created from the Debian's 9.5 2018-10-07 4GB SD LXQT image for beagleboard X15 https://beagleboard.org/latest-images

The guile command-line app works fine on this SD card. So it looks like the guile lib from Debian may have some dependency and/or installation issue on the TI Arago image, but I can’t pinpoint the cause.
It may be necessary to use the TI SDK to build to guile lib from the source code.

Second Approach – build guile lib from source using TI SDK.

I try to find any existing recipe to build guile-2.0. I searched arago, yoctor and openembedded repositories, but couldn’t find a recipe for building guile for arm target. The closest one is the following guile_2.0.11.bb in Yocto index: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dizzy&id=894df445fa71a170397c6e0b4960a89ef20a4230

However this recipe is to build a “native” guile for host, not for target.

I am new to AM57xx and Arago/Yocto, any insight and direction will be appreciated.

Regards,

Steve

  • Hello Steve,

    You must have the cross-compiled ipk in <tisdk>/build/arago-tmp-external-linaro-toolchain/deploy/ipk/armv7ahf-neon/ directory. Can you search it there?

    Best regards,
    Kemal

  • Hi Kemal,

    Thanks for the support.

    I started from scratch to build the latest (06_00_00_07) full tisdk rootfs image using a newly built PC with native Ubuntu 18.04.3. I followed the instruction on http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Overview_Building_the_SDK.html

    git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
    cd tisdk
    ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-06.00.00.07-config.txt
    cd build
    . conf/setenv
    export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
    export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu
    MACHINE=am57xx-evm bitbake -k tisdk-rootfs-image

    After the full image is built successfully, I checked the tisdk/build/arago-tmp-external-arm-toolchain/deploy/ipk/armv7ahf-neon/ as you suggested, there is no "guile" related ipk.

    Then I ran the following command from tisdk/build/, but no match for any recipe for guile.

    MACHINE=am57xx-evm bitbake-layers show-recipes '*guile*'

    Also I searched in  tisdk/sources/ for any '*guile*'  file, no match.

    I downloaded the source tarball am57xx-evm-linux-sdk-arago-src-06.00.00.07.tar.xz from http://software-dl.ti.com/processor-sdk-linux/esd/AM57X/latest/index_FDS.html

    and checked the source_pkg_list.txt, there is no source package named after 'guile'.

    So it looks to me there is no cross-compiled guile lib in the latest tisdk.

    Regards,

    Steve

  • Hello Steve,

    You need to include the guile recipes manually. You can copy them from here.

    Best regards,
    Kemal

  • Hi Kemal,

    Thank you very much for the direction. It works.

    More info - I manually added the guile recipe directory to ~/tisdk/sources/meta-ti/recipes-devtools/ and added guile to tisdk-rootfs-image.bb. When I built the image by MACHINE=am57xx-evm bitbake -k tisdk-rootfs-image, I got the following error:

     * Solver encountered 1 problem(s):
     * Problem 1/1:
     *   - nothing provides glibc-gconv-iso8859-1 needed by guile-2.0.14-r0.armv7at2hf-neon
     *
     * Solution 1:
     *   - do not ask to install a package providing guile

    So I just commented out the following line from guile_2.0.14.bb:
    #RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1"

    Then the image build went through and guile lib is deployed to the target rootfs image. 

    When I try to run the guile command on the target, it gave the same error as before "Throw without catch before boot: ...Aborted (core dumped)".

    The glibc-gconv-iso8859-1 dependency originally in the guile_2.0.14.bb gives me some clue and I found there is no /usr/lib/gconv in the tisdk target rootfs, and the external arm-Linux toolchain has the gconv. So I just copy the whole gconv/ directory from
    gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib/gconv/
    to the target rootfs under both /usr/lib/ and /usr/lib/arm-linux-gnueabihf/

    Then guile command works fine. Our ported application that depends on guile lib works now too.

    If you see anything wrong or to be improved in my procedure, please let me know.

    Regards,

    Steve

  • Thank you for the good news. Your implementation procedure is relevant. I have nothing to add.