Goa SDK hosted on Sculpt OS 26.10
For operating-system projects, fully self-hosted development is a goal often aspired but rarely reached.
I vividly remember us celebrating Genode's first breakthrough in this respect when we achieved running Genode's build system on Genode at the end of 2012. It felt like a miracle. Self hosting ought to be close within reach. But it was merely a lab result.
In hindsight, I vastly underestimated what it really takes to stand on one's own footing. 14 years later, I'm admittedly still spending most of my development time inside a Linux VM. Granted, this Linux VM is hosted on Genode. But using Genode as a mere hypervisior feels like swimming in a ball pit rather than surviving in open waters.
Goa SDK
When originally introduced, Goa was meant to streamline all facets of the workflow for developming Genode components into a single tool: importing 3rd-party source code, editing, compiling, integrating, configuring, testing, packaging, and publishing. It leverages Genode cross-kernel binary compatibility to great effect. A developer working in a familiar Linux environment can use Goa for all these steps, including the testing! Once tested on Linux, the same binaries can be published and executed on a real Genode OS using a microkernel. That's fantastic! Yet, the development workflow remained tied to Linux.
As one striking feature addition to Goa, we later came up with the idea to offer optional alternatives to the default way of test-running Goa projects under Linux. Instead of spawning a Genode system on the developer's host Linux, Goa could upload the software to a remote Genode system for execution. Why not use Sculpt OS as the remote Genode system? The Goa testbed as shipped with Sculpt OS is the realization of this idea. By now, it has become almost a second nature to beam a Goa project to another machine or the PinePhone for testing.
Coming back to the goal of achieving salvation through self-hosting, what does it take to realistically move real-world development workflows to Genode? The answer is quite simple: Everything Goa needs. Not (much) more. Not less. We identified Goa as crystal-clear-cut requirements definition, giving us direction.
During our annual road-map discussion one year ago, two puzzle pieces became apparent: First, the transitive hull of Goa must be transplanted from Linux to Genode, giving Genode the ability to build components and subsystems from code. And second, a local variant of the Goa testbed would allow us to test drive the results in a separate subsystem that is independently sandboxed from the Goa SDK. Both the SDK and the testbed would be solely connected via one shared directory.
Over the course of the year, Goa's dependencies were carefully transplanted to Genode in the form of Goa projects hosted at Genode-world. To give you a tangible picture,
-
Glue that holds everything together: Tcl, expect, bash, coreutils, findutils, grep, sed, diffutils, patch, file
-
Compiler stack: binutils, GCC, gmp
-
Build systems: GNU make, CMake
-
User interface: ncurses, Vim, less, man-db, groff, Git
-
Package management: wget, curl, gnutls, openSSL3, nettle, tar, xz, gzip, zlib, Sequoia, sqlite3
This list can be read both ways. As a todo list, it is a staggering porting effort. On the other hand, thanks to our tooling hygiene over past two decades, the list looks surprisingly concise. E.g., Python and LLVM are notably absent. The list is substantial but not overwhelming. So we rolled up our sleeves, ported the software piece by piece while refining Genode's POSIX compatibility layer as we went. We have now arrived at the point where the Goa SDK allows us to edit (Vim), manage (Git), build, and run Genode components directly on Sculpt OS.
Giving it a spin at home
Starting with version 26.10.1, Sculpt OS comes with a ready-to-use preset as a starting point. With the network connected and a Sculpt storage location selected, the SDK is only a mouse click away.
|
You can follow the installation progress at the lower left corner.
|
Once the installation has completed, the F12 key takes you to the fresh installed SDK deployment.
|
The darker window gives you access to the SDK whereas the bright window displays messages as printed by the testbed. There are a few SDK settings - waiting to be tweaked - located at /recall/. As hinted by the name of the directory, the SDK preserves those settings across restarts. Besides a vimrc and a goarc, there is a terminal configuration, which allows you to adjust colors and the font size to your likings. Changes take immediate effect when saving the file.
|
Besides the /recall/ directory, there are a few other directories of interest:
- /depot/
-
is the storage location for Genode components downloaded as project dependencies, or for components exported by Goa.
- /rw/
-
is the designated storage location for your Goa projects.
- /vm/
-
is the storage location shared with the testbed. Goa copies compiled Genode subsystems to this location to execute them. But the content can of course be manually inspected and manipulated. Note that only the testbed - but not the subsystem under test - has access to this directory.
- /tmp/
-
is a temporary directory that is not preserved across restarts. It is backed by an in-memory file system.
As starting point for experimentation, there are a few example Goa projects available at /tmp/examples/. Since the content of this directory is not preserved across restarts, use those projects only for experimentation or as blueprints. At /tmp/examples/hello_make/, you can find the first example of the Goa tutorial.
|
Note the log output at the right window. Should this be a tad bit too unspectacular for you taste, you can give the hello_posix example a try.
|
You can see that POSIX apparently pulls in a slew of complexity but it is all transparent. The sources of the downloaded dependencies are ready for your inspection at /depot/.
For following more closely how the Goa SDK is integrated, it is good to have a system shell at hand.
|
By taking a look at /model/deploy, the child goa_sdk answers the question of where the SDK's various directories end up on the file system. Since all the file systems are connected to recall_fs, you can find their respective contents at /rw/recall/goa_sdk/. The crossed-out alternative connection for the depot is meant for dancing on a volcano. By picking it over the default, it grants the SDK write access to Sculpt's system-global depot. So software built using the SDK can be directly deployed outside the testbed. This is fun. But it puts the integrity of the entire system into the hands of the SDK.
|
Further down at /model/deploy one can find the sandboxing rules for the testbed.
|
By default, most rules are connected to the black-hole component, effectively isolating the subsystem from Sculpt OS. However, by changing those connections, it is possible to deliberately grant access to even the inner guts of Sculpt OS if one wishes so. For example, granting direct access to a PCI or USB device, or allowing the program under test to connect to the low-level nitpicker GUI compositor.
Further exploration
Here are some suggestions for diving deeper into the SDK.
-
Browse goa help to get familiar with the commands of Goa.
-
Follow the updated Goa tutorial series. For this, it would make sense to add the Falkon browser to your deployment, e.g., by taking the child nodes of /model/presets/falkon_web_browser as blueprint.
-
Use git to manage a Goa project of your own at /rw/.
-
Trick Goa to download arbitrary depot content published by genodelabs. This can be achieved by adding the path (including the version) of the desired archive to a pkg/archives file, followed by issuing goa run.
State of affairs and next steps
Have I already left the ball pit? My honest answer is no. But I've already moved the development of a few selected hobby projects - like a USB driver for the Modos eInk display - to the on-target SDK, which brings me tremendous joy. It feels like finally arriving at a sea shore after an endless travel and now entering the waters up to the waistline. Cannot wait to get further immersed. There are more steps needed to make that happen.
-
We focused on making it work but largely ignored performance at this stage. There are plenty of optimizations on the table now.
-
So far, the on-target SDK mirrors Goa as used on Linux but leaves Genode's advantages unused. For example, dwarfing the risks associated with package management could dwarfed by re-using Sculpt's strongly sandboxed installation mechanism.
-
The scope of the on-target SDK is still limited. The publishing of packages, supporting build systems other than make and CMake, or further programming languages are not covered yet. These feature will be gradually added over time.
But most importantly, I'm inviting all Genode developers to collectively embrace the new on-target SDK for parts of their work. Whenever possible, let's eat our own dog food, and help making the Goa SDK a joy to use for all of us.


Norman Feske