User: Password:
|
|
Subscribe / Log in / New account

Lessons from the Novena laptop project

LWN.net needs you!

Without subscribers, LWN would simply not exist. Please consider signing up for a subscription and helping to keep LWN publishing

By Nathan Willis
August 13, 2014
Flock 2014

Flock is the annual conference for the Fedora distribution, but, like most free-software events, the program draws on a wide range of projects. At this year's event in Prague, keynote speaker Sean Cross spoke about his work on the Novena laptop project—including some speculation as to why it is succeeding in the demonstrably harsh space of open hardware products. Cross told the audience he hoped to get Fedora running on Novena (which runs Debian only at the moment) over the course of the conference, but he also hoped that the Novena story would be a helpful and informative tale for others undertaking a difficult, large-scale task—such as building a distribution.

Novena, for those unfamiliar, is a do-it-yourself laptop designed with hackers in mind. The specifications are unusual; among other things, the CPU is a quad-core ARM Cortex A9 from Freescale, there is a breakout connector for Arduino- or Raspberry Pi–like aftermarket hardware add-ons, and there is a built-in Xilinx Field-Programmable Gate Array (FPGA) on board. The project raised more than $720,000 in a crowdfunding campaign (against an initial target of $250,000), and is run by just two employees: Cross and Andrew "Bunnie" Huang.

[Sean Cross]

Cross met Huang when both were employees at Chumby, Cross explained. Huang was the hardware lead; Cross worked on kernel development. Both resided in Singapore, which, he explained, was almost a necessity when working on consumer electronics projects, due to its close proximity to China. Chumby was a fun company, he said, and he learned a lot from Huang. When Chumby closed its doors, Huang and Cross collaborated on a series of smaller open-hardware projects under the Kosagi company name. Those projects included the NeTV video overlay device and the Kovan robotics controller.

Both projects involved working with FPGAs during the development process, he explained, and they decided that their next project should be a platform for doing FPGA development. The Novena board itself started off as a design for a Tor router with a built-in FPGA. When they presented it at the 2013 Chaos Communication Congress (CCC), however, people kept telling them "that's a really cool laptop." Eventually, the outside interest persuaded them to attempt the crowdsourcing campaign. That campaign exceeded its target by a considerable margin in May, enabling the team to undertake several "stretch" goals.

The Novena is designed to be as free-software friendly as possible, Cross said. All of the schematics and hardware designs are publicly available, and the software is free of binary blobs. "Well," he added, "there is a small asterisk to that, depending on how you define 'blob.'" The device's WiFi module has free software drivers, he explained, but there are always other places where "blobs" can remain. The Novena board has a smart DMA controller and boot ROM, both of which do not have free firmware available. The Vivante video chip also needs non-free drivers to do 2D and 3D acceleration, at present, although progress is being made on reverse-engineering both cores ("it already plays Quake; the community is close to getting Wayland running," he said). Finally, there is hardware video core that requires a blob to accelerate certain codecs, though these are optional.

Whether these bits disqualify Novena as a "free hardware" device is a matter of contention, apparently; on his blog, Huang commented that the FSF would not certify the Novena in its "Respects Your Freedom" program, even though the laptop can be used with the binary-only units turned off and unloaded. Cross also asked, rhetorically, "what is a blob?" The Xilinx FPGA can only be programmed with Xilinx's IDE, he observed. You program it yourself, but it generates a binary—is that binary considered a "blob" or not, he asked.

Hardware design and development

Although the team was experienced with open-hardware products, Cross said, the laptop form factor quickly proved to be really complicated. For example, he compared the power circuit to that of the NeTV and Kovan board. Novena's power requirements necessitate handling far wider input voltages, employing separate switches to control power in different subsystems, battery control, battery charging logic, as well as over- and under-charge protection. They eventually had to design a custom power board for the device, running its own ARM CPU.

They also had to design custom boards for the laptop front panel, the Hall effect sensor (which detects if the lid is closed), and the cable connecting the mainboard to the embedded DisplayPort screen. He noted (in reference to the latter item) that most people don't think of cables as circuits, but they can be quite complex. Furthermore, the project has had to design every plastic and metal part used to assemble the device, down to the screen bezel and the switches. This can get expensive; the first quote they received for the metal-cutting bill alone was $250,000. By doing the CAD work in-house, though, they managed to find another supplier who would deliver for $100,000. The case is designed to be opened up and tinkered with, he explained, so it does not look like most traditional laptops—a factor that made it "interesting" to take through airport security.

The Novena includes several features not included on commercial laptops, Cross explained. In addition to the FPGA, the laptop includes USB On The Go (OTG), which allows the user to boot another computer off of the Novena's storage, dual Ethernet, and a header connector for electronics tinkering. This header was initially a direct copy of the Raspberry Pi header, he explained, so that users could run Raspberry Pi expansion boards ("but much, much faster"), but it was later reduced in size to save space—and bundled with a breakout cable. This was in the spirit of forking open source projects, Cross said, and it proved beneficial. A company called Myriad noticed that Novena used the same breakout header as its own software-defined radio (SDR) board, and offered to re-spin a version of the board specifically for use with the Novena.

The team has also spent a lot of time sourcing individual components. "If you like electronics," he said, "go to Shenzhen." The city is home to countless electronic supply markets that are "ehh ... I'll say 'gray' markets," he joked. Searching for surplus part lots that are in large quantity compared to what Novena needs, but are leftovers to major manufacturers like Foxconn, saved the project considerable money. Experience with the earlier devices and proximity to China helped a lot.

Software

On the software side, Cross said that the team decided to build Novena on ARM because they already had experience with it, and because an ARM-based machine could be used to compile software for virtually every mobile device on the market today—without requiring a cross-compiler. They chose the Freescale chip they use because it is the best documented: there are 5,827 pages of official documentation available on the web, all without requiring any non-disclosure agreement.

That said, he also reported that working with vendors' official board-support packages (BSPs) was not as smooth as it could be. BSPs tend to come with a specific bundle of "supported" modules (the kernel, Xorg, GStreamer, SurfaceFlinger, etc.). But they are rarely up-to-date and often only work with the other components in the BSP. "They're like off-brand LEGOs: they work okay within the kit, but you can't use them with your other toys." Consequently, the project stopped using vendor BSPs and has been working with upstream, mainline code. It takes longer, but support is much better and "is really long-term."

The development process has meant writing new drivers for several components (such as the onboard temperature sensor), he said, but he has been surprised at how quickly mainline kernel support has caught up. It helps that there are other projects working with the same Freescale parts, including Cubox, the Hummingboard, and the Riotboard.

Sometimes, support work flows in the other direction, too, he said. He pointed out that Freescale subcontracts subsystems like USB and video to other suppliers. In the case of PCIe, the Novena team had to write its own drivers, but discovered subsequently that several Samsung devices use the same PCIe components, so the patch benefits other device makers as well.

At this stage, the Vivante GPU requires a lot of work. As mentioned earlier, only non-free drivers are available for the 2D, 3D, and video cores. Luckily, the Etnaviv project is making progress on a free driver, which he hopes will be usable in the 3.17 or 3.18 time frame. The 3D core support is good, he said, but he wants to be able to use the 2D for as many operations as possible, since it consumes 1% of the 3D core's power.

Debian was chosen as the Linux distribution for the Novena because Debian has strong ties to Tor and the Novena mainboard was initially conceived of as a dedicated Tor platform. But, he added, "I have a spare SSD and a screwdriver with me, so if you want to help me get Fedora running, come talk." In an email, Cross said that he indeed did get Fedora running on the Novena hardware by the end of the event. There were a few stumbling blocks, he said, such as SELinux, but Fedora is now "working as well as Debian." GNOME Shell is not working smoothly yet, due to the 3D driver problems. But he estimates that in six months or so, even that could be solved.

Cross ended his talk with a few bits of stray advice he had gleaned from the work on Novena. First, he said, dogfooding is critical. He and Huang use their prototype Novena hardware as their daily machines; it is the only way to make sure that the solutions you work on really get exercised fully. Second, he said, work upstream. Vendor BSPs just aren't robust enough—the Novena hardware has not run Freescale's kernel for a long time.

Third, he advised the developers in the audience to stop assuming that their code was running on the x86 architecture. There are more and more ARM devices on the market, but there are also MIPS, IBM System z, and OpenPOWER boards coming out. They are all Linux, he said, but none are x86: assumptions about byte sizes and endianness need to go. Next, avoid optimization—or at least make sure you have a fallback. You may see some Intel vector instruction set that sounds great, but making your application depend on it will cause trouble for others. Sticking to a higher-level language instead means that anyone can get started—including those on homemade ARM laptops, presumably: the Kosagi wiki lists a few noteworthy examples.

Finally, Cross advised the audience to have fun. There are loads of options at every level of the free software stack, he said, so find a project that you are enthusiastic about.

The Novena hardware is already in production, according to Cross, although the final assembled units are not expected to ship for a while.

Pessimists might say that this means the Novena is not yet an "available" open-hardware device, but it is clearly much closer to completion than many of the other, canceled projects that the community has seen in the past few years. Having experience with prior devices and with the process of working with suppliers in China is clearly a big part of the equation, but there is probably something to be said for outside-the-box approach that Cross and Huang take. The Novena is almost nothing like a commercial laptop, and that is part of why it has so many fans. Which sounds like a good lesson for free software projects as well.

[The author would like to thank the Fedora project for travel assistance to attend Flock 2014.]


(Log in to post comments)

Lessons from the Novena laptop project

Posted Aug 13, 2014 19:30 UTC (Wed) by njwhite (guest, #51848) [Link]

Interesting article, and a very cool project! I'm tempted to order one myself, but I just don't have any use for it. Hopefully their success means that in ~10 years when my laptop breaks (yes, I'm a careful optimist) I can get a fancy new one Novena laptop.

> on his blog, Huang commented that the FSF would not certify the Novena in its "Respects Your Freedom" program, even though the laptop can be used with the binary-only units turned off and unloaded

Reading the comment, it sounds like once the reverse engineering is completed for the GPU and VPU, and free replacement drivers written (as is the plan), they should qualify, even without the DMA controller or boot rom code being free. Which is interesting; it seems like a reasonable place to draw the line for now, but presumably the FSF would love to see the boot ROM and DMA controller code be free too, someday.

Lessons from the Novena laptop project

Posted Aug 13, 2014 20:52 UTC (Wed) by b7j0c (guest, #27559) [Link]

I'd be tempted to buy one just to help underwrite development...but not for $2k. thats more money than I have spent on a workhorse laptop in some time.

Lessons from the Novena laptop project

Posted Aug 13, 2014 21:11 UTC (Wed) by n8willis (subscriber, #43041) [Link]

Interestingly enough, someone in the audience also asked about the price point. Cross replied that the comments break down into two distinct camps: FOSS people say "wow that's an expensive laptop" but FPGA users say "wow that's so cheap for a development kit!" The point being, many or most of Novena's specifications are geared toward hardware hacking and reverse-engineering usage, rather than traditional CPU-bound performance. So it probably isn't a "workhorse" in the same sense as other laptop-sized devices.

Nate

Lessons from the Novena laptop project

Posted Aug 14, 2014 16:19 UTC (Thu) by drag (subscriber, #31333) [Link]

It's only really 2-3 times as expensive as a decent mid-range laptop. Which is not a huge amount considering it's a low volume affair.

The biggest advantages I see to this device are that everything is cabled together so you can easily swap parts, it's going to be fairly legacy free and must more 'trustworthy' laptop then you can typically get from consumer outlets, and the potential for hardware development/use in automation/general learning experience is extremely high.


Lessons from the Novena laptop project

Posted Aug 27, 2014 8:00 UTC (Wed) by ssam (guest, #46587) [Link]

https://www.crowdsupply.com/kosagi/novena-open-laptop they are still accepting general donations (choose the "Buy Us a Beer" options, and give however much money you'd like).

Lessons from the Novena laptop project

Posted Aug 14, 2014 5:18 UTC (Thu) by pabs (subscriber, #43278) [Link]

The Xilinx IDE is non-free IIRC. There is actually free software to synthesise FPGA bitstreams, I've linked to some of it here:

https://wiki.debian.org/FPGA

Lessons from the Novena laptop project

Posted Aug 14, 2014 21:25 UTC (Thu) by yootis (subscriber, #4762) [Link]

None of those programs will synthesize an FPGA. They will simulate, debug, or test it, but currently, Xilinx software is necessary to create a working bitstream.

Lessons from the Novena laptop project

Posted Aug 21, 2014 18:03 UTC (Thu) by pabs (subscriber, #43278) [Link]

I was under the impression that fpgatools had that capability:

https://github.com/Wolfgang-Spraul/fpgatools

Lessons from the Novena laptop project

Posted Aug 21, 2014 19:11 UTC (Thu) by nybble41 (subscriber, #55106) [Link]

It will, but only if you're using the xc6slx9, and even there it's experimental and doesn't support all the features of the FPGA. It's not an impossible problem, but the bitstream format is proprietary and undocumented and there is a lot of reverse-engineering to be done before we can get from the HDL to a programmed FPGA using only open-source tools.

On the other hand, one can use open tools for everything up to generating the netlist (i.e. the interesting part), and rely on the closed Xilinx tools only for the final conversion from netlist to bitstream.

Lessons from the Novena laptop project

Posted Nov 19, 2014 6:41 UTC (Wed) by pabs (subscriber, #43278) [Link]

Another bitstream reverse engineering project:

https://code.google.com/p/debit/

Lessons from the Novena laptop project

Posted Aug 15, 2014 8:20 UTC (Fri) by rdc (subscriber, #87801) [Link]

It is however a full feature laptop that is (or will be) free. The FPGA and the tools to use that, doesn't stop that being the case, granted it is an expensive laptop if you opted to not use the FPGA.

Lessons from the Novena laptop project

Posted Aug 20, 2014 20:08 UTC (Wed) by jdulaney (subscriber, #83672) [Link]

I'm the one that helped him get Fedora up and running.

Lessons from the Novena laptop project

Posted Aug 26, 2014 7:09 UTC (Tue) by geuder (subscriber, #62854) [Link]

Nice. Where would I find the source packages?

Lessons from the Novena laptop project

Posted Aug 21, 2014 6:20 UTC (Thu) by jengelh (subscriber, #33263) [Link]

>He advised the developers in the audience to stop assuming that their code was running on the x86 architecture. There are [...] also MIPS, IBM System z, and OpenPOWER boards coming out.

As a developer, if the hardware is too hard to come by, it's ignored.
The typical problems: affordability (contemporary SPARC, IBM POWER and z all start above $1000), lack of at least an approximate price tag on website (Cavium MIPS, Tile processor boards), too little RAM, no SATA connector, and uncertainty about whether it still works when replacing the bundled vendor image with vanilla components.

Lessons from the Novena laptop project

Posted Aug 23, 2014 6:19 UTC (Sat) by da4089 (subscriber, #1195) [Link]

FWIW, PCIe Cavium boards (Octeon II) are in the $3.5k area.
Tilera's dev kit PCIe was (in 2012) $15k for the hardware.


Copyright © 2014, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds