I would argue against trying to set up cross-compilation unless you want to cross compile big things often.

Simplest, most straightforward way to do it is to just build it on the device you need to have it on. It takes patience, but unless the SBC in question is extremely resource constrained (particularly, if it has less than 1GB of RAM), it should be pretty doable. If it is light on resources, I recommend building with only one thread (make -j1), and also adding a couple GB of swap space. It may be slow, but so long as it doesn't fail because you run out of memory you'll be okay.

Another twist on that idea is to do a generic build on a sufficiently similar (same generation of ARM, same version of OS), but more powerful, ARM SBC, tar the results and copy it over.

Those other options use the same workflow as any native build, so are pretty easy. If you're set on trying to do it with cross compilation, there are ready-made cross compilers available like the ones provided by Linaro, or you could roll your own using a tool like crosstool-ng. I think there are some in the ubuntu repos also. You'll need to tweak your usual flow a little bit though with regards to doing cross compilation. It will vary a bit based on what build system the projects in question are using also ; UHD uses cmake, but if you need to build other things too it's something to keep in mind. The tricky part is that it still needs to link against the same version of libraries on the device, so that will need to be available when building it. For that, I would recommend using sshfs to mount the filesystem of the device, because the best way to target the device exactly is to just use what's already on the device. As per what commands to run to make that happen, there isn't really something that's one-size-fits-all, but something like this might help give you a start: https://www.96boards.org/documentation/guides/crosscompile/commandline.html In any case, I think you can see why I'd say that it shouldn't be your first option unless you really need it.

Dustin
On 6/16/21 2:16 PM, para...@kwesst.com wrote:

alternately, is there a way to cross-compile the UHD v4.0.0.0 libraries on my x86 machine but target the ARM processor on my SBC?



_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Attachment: OpenPGP_0x85706BEA425306B5.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to