Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5076C433F5 for ; Tue, 5 Oct 2021 20:59:21 +0000 (UTC) Subject: Getting absolute paths in yocto generated native binary #bitbake #native #toolchain #sdk To: yocto@lists.yoctoproject.org From: "Jean-Pierre Doyon" X-Originating-Location: Chambly, Quebec, CA (45.45.117.54) X-Originating-Platform: Windows Chrome 94 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 05 Oct 2021 13:59:21 -0700 Message-ID: Content-Type: multipart/alternative; boundary="17dbqtuwVejQ8razqN1x" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 05 Oct 2021 20:59:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/54970 --17dbqtuwVejQ8razqN1x Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 progr= am 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 ru= n. The reason being that it's missing some library. Running LDD on the exec= utable turns up this: =E2=94=94=E2=94=80$> ldd usr/bin/imx_usb linux-vdso.so.1 =3D> (0x00007ffd7031d000) libusb-1.0.so.0 =3D> /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f986a= 47e000) libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007f986a0b4000) libudev.so.1 =3D> /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f986a86c000= ) libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9869= e97000) /home/jpdoyon/newtrax-layersetup-dunfell/build/tmp/sysroots-uninative/x8= 6_64-linux/lib/ld-linux-x86-64.so.2 =3D> /lib64/ld-linux-x86-64.so.2 (0x000= 07f986a696000) librt.so.1 =3D> /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9869c8f000) Why is the ld-linux-x86-64.so.2 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? --17dbqtuwVejQ8razqN1x Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

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

Wh= ile I had plenty of hurdles figuring out how to do this (I'm still pretty n= ewbie with Yocyo), I managed to get everything just the way I wanted it. Bu= t when I get the tarball to the production machine, which runs the exact sa= me 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 execut= able turns up this:

=E2=94=94=E2=94=80$> ldd usr/bin/imx=
_usb
    linux-vdso.so.1 =3D>  (0x00007ffd7031d000)
    libusb-1.0.so.0 =3D> /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f=
986a47e000)
    libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007f986a0b4000)
    libudev.so.1 =3D> /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f986a86=
c000)
    libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f=
9869e97000)
    /home/jpdoyon/newtrax-layersetup-dunfell/build/tmp/sysroots-uninative/x=
86_64-linux/lib/ld-linux-x86-64.so.2 =3D> /lib64/ld-linux-x86-64.so.2 (0=
x00007f986a696000)
    librt.so.1 =3D> /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9869c8f000=
)

Wh= y is the ld-linux-x86-64.so.2 using an absolute path while all the other li= braries aren't?

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

--17dbqtuwVejQ8razqN1x--