Re: Getting absolute paths in yocto generated native binary #toolchain #sdk #bitbake #native

Chuck Wolber

Native recipes are meant for the build machine itself to aid your build. If you are packaging something to run on a destination machine, you should be producing non-native recipe images.


On Tue, Oct 5, 2021 at 1:59 PM Jean-Pierre Doyon <jpdoyon@...> wrote:

I'm attempting to create a USB first boot tarball for our custom iMX6 board that would contain the imx-usb-loader executable, config files and u-boot/SPL files. The goal being to deploy that to the production machine to program the empty boards right after being assembled.

While I had plenty of hurdles figuring out how to do this (I'm still pretty newbie with Yocyo), I managed to get everything just the way I wanted it. But when I get the tarball to the production machine, which runs the exact same Ubuntu 18.04 LTS Linux as the build machine, the imx_usb tool won't run. The reason being that it's missing some library. Running LDD on the executable turns up this:

└─$> ldd usr/bin/imx_usb =>  (0x00007ffd7031d000) => /lib/x86_64-linux-gnu/ (0x00007f986a47e000) => /lib/x86_64-linux-gnu/ (0x00007f986a0b4000) => /lib/x86_64-linux-gnu/ (0x00007f986a86c000) => /lib/x86_64-linux-gnu/ (0x00007f9869e97000)
    /home/jpdoyon/newtrax-layersetup-dunfell/build/tmp/sysroots-uninative/x86_64-linux/lib/ => /lib64/ (0x00007f986a696000) => /lib/x86_64-linux-gnu/ (0x00007f9869c8f000)

Why is the using an absolute path while all the other libraries aren't?

If I install the library in the location above, then the executable starts working... So how do I make sure Yocto doesn't do this?

"Perfection must be reached by degrees; she requires the slow hand of time." - Voltaire

Join to automatically receive all group messages.