|
How was it ported?Now you might ask yourself, how difficult was it to port the Qt toolkit to a totally new and even experimental platform? Well, Qt itself has been designed to be easy to port, but then again, the target platform is based on a microkernel that is mainly used in research. The L4/Fiasco microkernel, which is running on your computer right now while you are reading this text, is not a complete operating system (OS). It is merely the basis for an OS that is built from various basic servers running on top of it. They do not yet offer the same functionality as, for example, Linux. We eventually concluded that Qt/Embedded would be the best starting point for doing a port to the L4 environment. Qt/Embedded is designed to run on Linux-based hand-held devices, such as PDAs or smartphones. The major difficulty we encountered was the dependency on an embedded Linux OS. However, choosing Qt/Embedded also had the advantage that it shipped with its own windowing system, the Qt Window System (QWS). Without the QWS, we would have had to rewrite about 10,000 lines of code just to make Qt's framework for Graphical User Interfaces (GUIs) run on L4. We identified the following subsystems to be relevant for the port:
Actually, we did not have to port file-system and network support, because there already was a POSIX compatibility layer available on L4. However, we had to add missing functionality, so that we could use it for Qt. This layer, the L4 Virtual File System (L4VFS), provides an infrastructure to build up a hierarchical directory tree into which L4VFS servers can be mounted. It also allows for servers that provide network access. The following figure shows the structure of an L4VFS name space as it is used by the interactive demo setup on this Demo CD. The Linux-specific threading back end could not be reused, we had to rewrite it from scratch. It now uses L4 threads and L4 synchronization primitives. Obviously, we had to write new drivers for the QWS as well. The interactive Qt demo on this CD uses drivers for the native L4 graphical console. The most tricky part was the QWS itself, as it requires concurrently running Qt/Embedded tasks to communicate with each other. The implementation in Qt/Embedded for Linux uses Unix Domain Sockets, which were unavailable on L4. It turned out that adapting it to use native L4-communication primitives was infeasible. So we finally decided to write our own Unix-Domain-Socket server, which integrates well into the aforementioned L4VFS infrastructure. Apart from the subsystems mentioned previously, no additional changes were necessary. For example, we did not touch the GUI framework at all. What can it do? Can I try it?Okay, so we ported the whole Qt toolkit to the L4 environment. Every Qt application should just work once it is recompiled, should it not? Well, the L4 port is fairly complete with regard to source-level compatibility for many applications. For example, the GUI framework is fully functional. However, the L4 port of the toolkit lacks some less important features, such as printing and OpenGL support. Also, the L4VFS servers for network and file-system support are still proof-of-concept implementations. So, at the moment, network support is unstable. Nevertheless, you can find a few Qt applications on this Demo CD that were downloaded off the Internet. They now run using Qt for L4 with only minor modifications, which were necessary due to the previously mentioned limitations on the L4 platform. You can play a funny game, Little Sheep, or view images in an image viewer. And of course there is a text editor as well. It is also possible to create Qt applications that use native L4 services. The application launcher QRun is one example and, if you really want to know what is going on, there is even a task monitor. Curious? Just check it out! You can start an interactive demo by clicking on the link below. Within a second or two, a new virtual console will open up that shows a Qt desktop. You can use the QRun application to start other applications just by clicking on the push buttons. But beware, due to its complexity, the port is till work-in-progress, so it may include glitches. Still, I hope you like it. Start interactive demo (in the Demo-CD version of this document) You can always switch between this virtual console and the Qt desktop by pressing either Meta-F1 or Meta-F2. Future WorkThe long-term goal of this Qt port is to use it for L4 applications with a rich GUI, when there are not sufficient resources available to run a whole legacy OS on top of L4. For example, on hand-held devices. It might even be feasible to reuse existing Qt applications. To support this goal, two major tasks remain to be done:
ContactCarsten Weinhold Technische Universität Dresden Fakultät Informatik Institut für Systemarchitektur (SyA) 01062 Dresden cw183155@os.inf.tu-dresden.de References
Reboot the machineClick here (in the Demo-CD version of this document) to reboot your machine.
|
|
|
| |