BeagleBone: Cross-Compiling Tool-Chain on Mac OS X?

I’m trying to cross-compile on my Mac against the BeagleBone.

Surprisingly, the Linaro tool-chain is only available for Windows and Linux, not Mac OS X.

The only binary I’ve found so far comes from http://www.welzels.de/blog/en/arm-cross-compiling-with-mac-os-x/comment-page-1/ , but debugging doesn’t work. The sysroots files aren’t provided.

Other options include:

Most blogs suggest to create and host a Linux virtual machine.

But all tentatives to build the tool-chain myself end with error messages and failures.

Any plan to deliver a tool-chain binary for Mac OS X?

We don't 'provide' any toolchains..

Feel free to ping linaro about mac os x support, or setup a vm..

Regards,

Probably the easiest way would be to do as Robert suggests and use a VM. Virtualbox, and debian works fine. The only obstacle you may run into is have an sdcard reader recognized in the VM. if even needed.

Depending on what you’re trying to do, and how you want to do it, a flash card reader may not even be needed. OSX should have access to better tools for “flashing” an sdcard than Windows. Then, one would / could just use various tools over the host only network to transfer files between the VM and OSX. If just simple executables, sshfs, netcat, and other standard UNIX tool would work fine to transfer files directly from one system to the other.

I concur, I’m building a 3.8.13-bone71-1 right now on my Macbook Pro OS X Yosemite system. I use a Transcend card reader for creating the uSD cards from the Linux console in the VM. I’ve been doing this for sometime and everything works fine. I haven’t setup a cross dev system on the VM yet, but will and expect no problems. The dist/version of Linux in my VM is Kbuntu 14.04 32bit. The version of VirtualBox is 4.3.26 r98988. This is a great way to go if you don’t run Windoze. I’m strictly a Linux and Apple person and very happy in that respect.

Well, I use Windows for a Desktop, and have not really had much experience with OSX hands on. But what I do know is that virtualbox works really well on Windows, and Virtualbox has binaries for OSX.

I have used those Linaro binaries for Windows by the way, and for simple applications they seem to work fine BUT that whole avenue to me just seems wrong. Not to mention that it would be very difficult to build the kernel on Windows, but probably not impossible.

Personally, I think all in all Debian is best for building Debian. But if you just need to build / compile “simple” applications. Ubuntu 14.04 has cross tools for armhf that seem to work fine. If needing help setting that up, just watch DR. Molloy’s Videos on youtube from a year or two ago. Forthe original beaglebone ( white ) Substituting armhf tools for armel tools.

@Ross

I’ve been building the kernel for the beaglebone black using Roberts eewiki instructions for around two years now. A lot of that was done from a virtualbox VM. I’ve even been using that same vm to load the rootfs for that A5A over our network.

Anyway, this is not meant as eWenus waggling, just trying to reinforce the fact that using a Virtualbox VM can work really well. For me, it has been pretty Rock solid.

I’ve NOT been disappointed in VirtualBox running on my OS X system in any way. I do most my work on my Kubuntu desktop system, but in a pinch or when I’m on the road, the Macbook with VirutalBox gives me all the Linux capability I’ve ever needed. Simple to install and it just works.

If anyone’s interested, I have a semi-painful flow for dumping a user-created image to SD under Debian running on a VirtualBox VM under Mac OS X. The image was created using Robert’s flow in Debian. I have been quite happy with VirtualBox lately, far more than I can say for the crooks (take your money, provide zero support) at Parallels.

Here are my notes from the last time:

  1. follow the instructions at eewiki.net to build a new image in the VirtualBox VM.

  2. insert SD card into reader slot on MacBook Pro

  3. shut down the Linux VM and VirtualBox

  4. make sure the SD card adapter switch is in writable position. Insert card into SD reader slot

  5. open Disk Utility, and erase the card

  6. unmount the UNTITLED partition

  7. cd to your VM directory (typically “$HOME/VirtualBox VMs/”)

  8. edit the .vbox file to remove the .vmdk entry.

  9. sudo vi ~/Library/VirtualBox/VirtualBox.xml; remove lines that reference sd-card.vmdk

  10. rm *.vmdk

  11. run sudo chown /dev/disk1*

  12. run sudo chmod 777 /dev/disk1*

  13. run sudo VBoxManage internalcommands createrawvmdk -filename ./sd-card.vmdk -rawdisk /dev/disk<whatever number Disk Utility displayed as your disk; typically 1 or 2)

  14. run sudo chown *

  15. unmount the /dev/disk<1 or 2>s1 (UNTITLED) partition

  16. In the VirtualBox control Panel, select Storage, right-click and Add Hard Disk. Choose existing Disk. Choose sd-card.vmdk

  17. in Disk Utility, unmount the UNTITLED partition again

  18. Start up Linux VM

  19. in Debian, run lsblk to determine the new SD card partition (/dev/sdb1 usually)

  20. sudo dd if=/dev/zero of=/dev/sdb

  21. follow instructions at https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSD/SDcard to set up the card.

  22. shut down the VM in Virtualbox

  23. remove the SD card from the storage category in the VirtualBox control panel

  24. eject and remove the SD card

Good Luck - Mike

Thank you for your answers.

Actually, I’m already using a tool-chain successfully on my second laptop which runs on Linux, but wanted to do the same on my main laptop which is a MacBook.

If BeagleBoard doesn’t provide any official tool-chain, is there a repository where I can find them? Additionally, why are they so difficult to find on Mac OS X?

lol because macs are for the"other" people.

i shunned anything apple from the early 80s when they
refused to open up hardware and software and kept it all closed.
all for the the user experience. not for the tinkerer