This is a long overdue post on our (Max Shavrick and my) work on the Linux kernel for RCOS. We are being supported by Microsoft through mentorship by Stephen Hemminger, who works on the kernel for a living.
Max and I both own the 2015 12″ Macbook (8,1), which unfortunately contains quite a few hardware items that do not yet have drivers in the Linux kernel. Our task is to try and fill these gaps.
The most important of these is getting the keyboard and trackpad to work. The issue is that they are both SPI devices, which Linux does not currently support. In addition, there is not a DMA controller built into the SPI controller as in the 2016 (9,1) Macbook. There are two posts on Bugzilla about it as well as one on Bounty Source. There is also a WIP driver on Github from cb22 that apparently has basic functionality (no rollover or wakeup) on the 2016 Macbook.
By forcing the pxa2xx driver (the main SPI controller for Linux) to not use DMA, Max has been able to detect keypresses and touchpad actions. However, all of the packets are filled with zeros. There are three hypotheses:
- We are not reading the correct number of bytes (currently reading 256 in chunks of 8).
- We are not correctly acknowledging that we have read the bytes resulting in the last packet being sent.
- No bytes are being transferred and an empty buffer is being returned.
At this time, we are not sure how to proceed. We aren’t able to run kgdb since there is no (simple) way to connect via a serial connection.
I’m still wrapping my head around how all of the communication in the kernel works, I’ll have a blog post next week explaining as much as I know.