Yocto Project Adds Mac and Windows Cross-Compiler for Intel’s Linux-Based Galileo Board

288

Intel last week announced its Arduino-compatible Galileo board, a Raspberry Pi competitor aimed at enticing the DIY and maker set that’s also robust enough for embedded pros.

The board specs alone are impressive. Based on a 400 MHz Quark SoC, the Galileo comes with a mini-PCI Express slot, USB and Ethernet ports, and more, all for under $60.

Intel-GalileoBut the less obvious engineering feat was achieving cross compatibility between the board’s custom Linux OS and Arduino’s application development software necessary to port C code to the device from Windows and Mac, as well as Linux.

This feature was key to expanding the Galileo’s potential market, and thus the reach of Intel’s architecture, to include a sizeable portion of artists, students and educators who don’t write their applications on a Linux machine, said Pete Dice, a product marketing manager at Intel on the Galileo board team.

“We can make all the Linux calls directly from the inside of the (Arduino) sketch and that opens up so many new avenues for the coders there,” Dice said. “Not just for people familiar with sketch on Arduino, but everyone who knows Linux APIs or a particular stack. They can cut right through and incorporate existing libraries and code directly there.”

Built with the Yocto Project

Working with the Yocto Project, Intel was able to build both the lightweight Linux OS running on the device and the Arduino software toolchains for all the various platforms. Tying the host and target sides together is a cross-compiler built by Richard Purdie, Yocto Project chief architect and a Linux Foundation fellow.

“That cross compiler Richard came up with was the ticket,” Dice said. “If we didn’t have that we’d have to do some very strange things with VirtualBox and whatnot to make it work.”

Intel did its own fair share of engineering to knit it all together. It took a team of 10 or more Intel engineers two months working 16-hour days to pull it off, Dice said. But because they were building with the Yocto Project they didn’t have to worry about how to compile Linux. They could focus on the features specific to the new hardware instead.  The new cross-compiler was one piece of the puzzle.

“We already had the Yocto pieces thought through in terms of the underpinnings from work done up to that point. We’d been booting that kernel and using those tools for a year,” Dice said. “The Yocto toolchain definitely made things easier.”

A Pre-Packaged Solution for Cross-Compatibility

Yocto LogoThe core compiler changes have since been merged into the Yocto Project’s upcoming 1.5 release, expected sometime in the next week. Anyone who builds an embedded project with Yocto will now have access to the ability to compile Linux binaries on all three platforms.

“We’ve taught the system all the magic that makes this work, you just run the bitbake command and it builds it for you,” Purdie said.

It also opens the door to further expanding the Yocto Project’s Application Developer Toolkit. Purdie expects future versions to include cross-platform integration on other core Yocto components, such as Eclipse, automake and autoconf.

“Doing the first set of binaries is the hard part,” Purdie said. “Now that we’ve proven it works, it should be easier to extend to other tools.”

Purdie noted that others before him have built Windows binaries with OpenEmbedded but the capability had been lost for many years. This new development brings it to the Yocto Project and its updated architecture. The ability to build for Mac OSX is completely new.

“Nobody has ever contained it into a set of recipes for the Yocto Project,” Purdie said. “You have a pre-packaged solution.