Reputation: 971
I saw this question How to cross compile from Mac OS X to Linux x86? but my target looks like this
$ uname -a
Linux MyDevice 4.9.127-svn20747 #1 SMP Thu Jan 17 05:46:18 UTC 2019 x86_64 GNU/Linux
Some output from less /proc/cpuinfo
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 54
model name : Intel(R) Atom(TM) CPU D2701 @ 2.13GHz
stepping : 1
microcode : 0x10d
cpu MHz : 2127.900
cache size : 512 KB
so I doubt there are any readymade solutions.
How do I compile from a Mac to embedded Linux running on an Atom CPU?
Upvotes: 1
Views: 512
Reputation: 971
This is what I did to compile (Crosscompile? I am not really sure what I did.) bonnie++ on a Mac running VirtualBox with a NAS OS-VM. I think this should apply to most software that one can compile using a simple ./configure; make
process.
Download NAS OS SDK VM (NASOS_SDK-0.7.ova) from here https://www.seagate.com/nasos/SDK/0.7/downloads/index.html
Begun following these instructions https://www.seagate.com/nasos/SDK/0.7/multi-arch/index.html¹ until I reached the section Cross Compiling where I was redirected to https://www.seagate.com/nasos/SDK/0.7/cross/index.html.
Skip down to the paragraph that begins with In order to cross-compile our hello program and perform the three export
s described there. The TOOLCHAIN_PREFIX can be found in the appropriate directory in /opt
: e.g., in the x86_64-seagate-nasos-sdk
there is a directory x86_64-seagate-linux-gnu
- use that name as the TOOLCHAIN_PREFIX (Why oh why isn't this information included in the guide???).
Perform configure
and make
as described.
Done.
If someone knows how to perform static linking, please add a comment.
¹ I don't think this is necessary if you try to compile something where ./configure; make
already works.
https://www.seagate.com/nasos/SDK/0.7/cross/index.html
NAS OS SDK VM
Upvotes: 0
Reputation: 1598
your target is a 64bit x86 platform, which is certainly not obscure. the SO question you linked is the best starting point, spin up a VM of the linux distribution you're targeting on your embedded board, compile in that and scp the executable to the board (or just compile on the board itself, your target is not exactly underpowered)
Upvotes: 1