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.

how to update a new pkg in ti-sdk targetnfs for am335x tatget rootfs

I am trying to update the alsa-lib that is available in ti-sdk v07.

that sdk has alsa-lib v 1.0.26 and I want to upgrade the lib of that pkg to the latest open source alsa-lib (v1.1.1)

I have downloaded the tar ball for alsa-lib from the alsa web and run following commands to build and install the package into the ti-sdk targetnfs so that when I create the sdcard to boot my am335x board, I have the new alsa-lib installed in there and can run alsa cmds. Unfortunately, when I run alsa cmds on the target, they can't find the installed libs because of wrong path: the newly built alsa-libs have hardcoded my ti-sdk path into the lib.

here are my steps:

downloaded alsa-lib version 1.1.1 from http://www.alsa-project.org/main/index.php/Download

1. Untar the pkg into my workspace of my linux machine at /home/<username>/

Source the build environment to pick up the variables needed for the SDK:

    • $cd ~/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/

$ source environment-setup

$ cd ../../alsa-lib-1.1.1/

2.  cross compile and install alsa-lib-1.1.1:

    • > sudo ./configure --host=arm-linux-gnueabihf --prefix=~ti-sdk-am335x-evm-07.00.00.00/targetNFS/usr

    • > sudo make

      > sudo make install

      when I run any audio alsa app from the target console, I get something like :

      can't find /home/<username>/ti-sdk-am335x-evm-07.00.00.00/targetNFS/usr/lib/<an alsa lib>.

      So basically, the path is not rooted!!! the libs built above seem to have preserved the given hardcoded path in --prefix or ti-sdk environement variables so the path have not been rooted when the library are built!

      Anyone know the trick to get such new pckg libs be cross compiled and properly install in the sdk targetNFS without hardcoded path name?

       

  • Hi,

    The path, as you can see, is not correct. On your target board (Sitara EMVSK, GP EVM or BBB) you don't have /home/<username>/ti-sdk-am335x-evm-07.00.00.00/targetNFS/usr/lib/<alsa lib>. It has /usr/lib/<alsa lib>.

    So can you try to manually export the path variable, instead of using source.

    Best Regards,
    Yordan
  • Can you help clarify your idea of exporting the path? Do you mean, once I boot the target (EVM), I can run export ...... to relocate the library search path to the rootfs of the target? how to find the library search path on the target? ,and do you have an example of the export command that you can point me to?

  • PEleph said:
    • > sudo ./configure --host=arm-linux-gnueabihf --prefix=~ti-sdk-am335x-evm-07.00.00.00/targetNFS/usr

    • > sudo make

    Why are you specifying the host to be an ARM?  I assume you're using an x86 PC right?

    After you source environment-setup, there's a variable defined called CONFIGURE_FLAGS.  Try running "./configure $CONFIGURE_FLAGS" instead.

  • Brad,

    As I mentioned, I am cross compiling for am335x, that's what I put the host as ARM. Doesn't setting the host in that case necessary?

    after sourcing, if I echo CONFIGURE_FLAGS I do get following:

    [linux-devkit]:~/alsa-lib-1.1.1> echo $CONFIGURE_FLAGS
    --target=arm-oe-linux-gnueabi --host=arm-oe-linux-gnueabi --build=i686-linux --with-libtool-sysroot=/home/<username>/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi

    I see here that --host is set to --host=arm-oe-linux-gnueab. Do you meant, this is good enough to compile the pkg for am335x target?

  • Oops. Sorry, I confused with "build". In any case, try using $CONFIGURE_FLAGS for your configure and build. There are some other items there that might have an impact too.