Adding Stephano to CC. He's recently played with a Galileo and I think he got some of the stuff you're asking about to work on the 4.14 kernel.

A couple responses inline below...

On 03/11/2018 02:10 PM, Trevor Woerner wrote:

I realize that the Galileo board has been completely abandoned; I'm not looking for "official" information, but I'm hoping someone would be willing to provide some anecdotal information... perhaps offline?

I thought it would be a fun exercise to investigate updating the Linux image and arduino-IDE-toolchain for my Galileo Gen2 board. Unfortunately I've hit some walls and was looking for some ideas.

With its LOCKing problem[*1], projects like Yocto and Buildroot are natural homes for Galileo support. It looks as though Galileo support was added to The Yocto Project somewhere around Dylan [1.4] with Using the sub-repositories found there and a virtual machine I'm able to build a working toolchain which I can install in my Arduino 1.8.5 IDE to build, upload, and run Blink. I can also build a rootfs image, but there isn't much in the way of guidance on how to get the resulting artifacts cobbled together onto an SDcard. But if I leave the SDcard slot empty, I can boot the default flash image that was shipped with the board (which is based on Dylan), and the IDE and sketches all work[*2].

After Dylan, Galileo-Runtime.git appears to have been abandoned (it's still stuck at Dylan) and meta-intel-quark and meta-intel-galileo appear... for Daisy [1.6]. Building with these layers (with everything setup for Daisy) doesn't work out-of-the-box due to some complaining about circular dependencies of initscripts on initscripts. I've tried several different things and combinations, but I can't successfully build an image or toolchain using these layers. These layers also have Dizzy [1.7] branches, so I gave those a whirl too without any success either.

After Dizzy, meta-intel-quark and meta-intel-galileo appear to have been abandoned and Quark/Galileo support migrated to meta-intel (and was subsequently removed after Rocko [2.4]). Along that path, the bootloader moved from grub0 to gummiboot to systemd-boot. The out-of-tree binutils -mquark-strip-lock patch was upstreamed as the -momit-lock-prefix option. The meta-intel layer included wic support making it dead-simple to create an SDcard from the build artifacts (yay!). Uclibc support died with Krogoth [2.1] (boo). And the suggested kernel for Quark moved from upstream linux-3.8 with about two dozen patches, to linux-intel-4.9 (as-is)... and this is where I'm stuck.

In the early days it doesn't seem like there was much distinction between Quark and Galileo, they were mostly synonymous. But by the time we get to Rocko, we find that the linux-intel kernel has support for Quark, but nothing for Galileo. When I boot the factory-installed Dylan image, I find loads of stuff under /sys/class/gpio, /sys/class/pwm, and /sys/class/platform which are what the Arduino code uses for identification and interaction with the Arduino headers. When I run linux-intel[*3] I have a /sys/class/gpio that only claims 8 gpios are available for use, none of which appear to relate to the Arduino headers. Was the Galileo support never "upstreamed"? Not even in Intel's own kernel fork?
The linux-intel fork is essentially upstream + patches destined for upstream only. If the Galileo support never went upstream, it wouldn't make it into linux-intel, either.

With Rocko I can build a bootable image (yay!!) but without proper kernel support for Galileo the Arduino code stops quite abruptly when it finds it can't find /sys/class/platform/GalileoGen2. At this point I started looking at mraa/upm as a replacement for the Arduino libraries, but they have a similar problem. When trying to run the "blink_onboard.c" example program (the mraa equivalent to Arduino's Blink program) it fails because it wants to use GPIO13 and 31, but the kernel says there are only 8 GPIOs available.
I think the kernel offset these by 256 or something... Stephano can probably help here. I believe he got GPIO stuff working.

In summary:
- I can build a toolchain using Galileo-Runtime.git and Poky Dylan in a VM that I can install in place of the Arduino toolchain, but this doesn't gain me much since the default Arduino toolchain is based on these same layers/versions[*4] - I can build, but can't assemble a working rootfs for my Galileo from Dylan - I can't build a toolchain nor assemble a working rootfs from anything until I get to Rocko - with Rocko I can build a bootable rootfs for my Galileo and a working toolchain for Arduino and/or I can use mraa/upm; however none of these programs work because although Rocko supports Quark (to some extent) support for Galileo seems to have stopped back in Dylan

Thank you for reading to the end. I'm curious to know if anyone would like to comment on my findings and perhaps correct any historical inaccuracies or confirm what I've found. I'm also hoping someone might know of a repository somewhere out there with a more recent linux kernel with Quark+Galileo support that will work with Rocko.

It's too bad there isn't a meta-intel-community layer out there where support for non-supported things could live on.

Best regards,

[*2] the galileo arduino libraries are found at [*3] which, by the way, is not even setup for Quark; i had to search for and enable a couple more Quark-specific kernel configuration options in order to get "full" Quark support from linux-intel!
If you have a list please share it!

[*4] although on my openSUSE system, the default toolchain that is installed by the Arduino IDE is broken, so i do gain is the ability to properly compile and upload sketches

meta-intel mailing list

Reply via email to