System Development

Project Areas


USB Support for FreeBSD network compatibility layer

Haiku uses a FreeBSD network compatibility layer to support many network devices (ethernet and wireless) using drivers written for the FreeBSD project. This allows reusing network drivers with very little changes, considerably decreasing the effort needed to get good hardware support in Haiku. However, this layer only supports PCI devices, and doesn't work with USB ones. Adding support for USB to the compatibility layer would bring us support for a range of devices like so-called USB tethering, as well as USB to Ethernet and WiFi dongles.

This project consists in importing one or more USB network drivers from FreeBSD into Haiku sources. The compatibility layer should then be extended to expose the FreeBSD USB APIs to the drivers, and forwarding the calls to Haiku's USB stack. Other parts of the compatibility layers may need to be extended as well.

ACPI Video Extensions

ACPI Video Extensions, as specified in ACPI Spec 4.0a Appendix B, adds special support to handle multiple output devices such as panels and TV-out capabilities, brightness control as well as special power management features.

AV/1394 support

Our Firewire stack supports DV receiving, but not controlling the A/V device (ie play/stop). This requires to modify the Firewire stack for FCP frame support. See AV/C Digital Interface Command Set General Specification for reference.

USB stack improvements (USB3, isochronous transfers)

Like any other operating system, Haiku has drivers for all types of USB interfaces: OHCI and EHCI for USB1, UHCI for USB2, and XHCI for USB3. However, most of these still need some improvements to improve compatibility and add full support of the USB specification. The XHCI support is still not complete. On several machines it will not detect devices, generate a lot of hardware interrupts, or even prevent the whole system from booting. Work on XHCI support must be continued so Haiku gets more reliable and complete support for USB3. USB allows 3 different ways of exchanging data with a device: bulk, interrupt, and isochronous. In bulk mode, the data is transferred when the bus is idle. Interrupt mode has higher priority. Finally, isochronous mode guarantees a minimal rate. This last mode is used for example by USB audio cards and webcams, as they need a constant flow of data at a fixed rate. The UHCI and EHCI drivers are missing support for isochronous USB transfers. This makes it impossible to use most USB sound cards and webcams in Haiku. The USB tasks consist in implementing either complete USB3 support, or isochronous transfers for USB1 and USB2 devices. This can be complemented with porting a webcam or audio card driver from FreeBSD or Linux (FreeBSD is preferred because of the software license used, we prefer to avoid GPL code if possible).

Ticket for support of USB isochronous streams.

Floppy drive support

We don't yet support floppy drives

3D acceleration support

Haiku does not currently support hardware acceleration of 3D rendering. Using the Gallium infrastructure from Mesa, the goal of this project is to make the existing Mesa renderer allow 3D rendering and not just software. This involves extending the API used by our video drivers (which is currently 2D oriented only), and making Gallium uses that API. Parts of the DRI/DRM model used on Linux may be reusable, but cooperation with the app_server must be possible.

Nouveau / PSCNV port

Haiku currently doesn't have a driver for NVidia video cards, and falls back to VESA for those. While our VESA driver is reasonably fast, it can't set the native resolution on all systems, leading to a suboptimal Haiku experience. Nouveau is a graphics driver for NVidia video cards. There is a fork called PSCNV which might have less dependencies on Linux. cf.



The BootManager needs to be updated to have multi-drive support or needs to be replaced.

Additional information:
  • Our simplified GNU EFI (good for learning UEFI/QEMU):
  • Current EFI development tree (take a look at the commit history and build instructions)
  • UEFI API information:

Power management

Haiku already has some power management support in the form of a CPU idling driver. This is however clearly not sufficient, and there is room for improvements in several areas in order to make Haiku use less power and make laptops running Haiku last longer on battery.

Some investigation is required to identify the main issues in Haiku leading to suboptimal performance. There are however a few already known problems:

  • Some subsystems such as the network and wireless stack wake up the system at regular intervals (10 or 100 times per second) to perform some tasks. Whenever possible they should be modified to trigger these tasks in anevent-driven way (triggering them from hardware interrupts for example).
  • Some applications (such as the always-running DeskBar) are polling for events in a similar way. The APIs should be adjusted where possible to make those applications wait on notifications instead.
  • None of the device drivers in Haiku include powersaving modes. When a device is idle, it should be put to sleep and powered off until it is needed again.
  • File Systems: New HaikuFS to replace BFS

    Link to idea on devopment wiki.

    File Systems: Write support for more filesystems

    Haiku has great support for its own file system, but most others are only available read-only. It is way better for interoperability with other systems to be able to write to these disks from Haiku.

    The goal of this project is to complete the existing support for one of the following filesystems in Haiku, working from the existing code base:

    1. ReiserFS existing sources, official specifications, extra documentation on the FS layout
    2. BTRFS: existing code, homepage

    File Systems: general improvements and new filesystems.

    Haiku has great support for its own file system, but is completely missing support for some other fielsystems. It is way better for interoperability with other systems to be able to read and write to these disks.

    The goal of this project is to port one of the following filesystems to Haiku:

    1. ext4: extend the existing ext2 driver to support new ext3 and ext4 features
    2. HAMMER FS: homepage, sourcecode (3-clause BSD, a port of the existing code is ok)
    3. JFS: existing code in Linux is under the GPL, a rewrite under the MIT license is preferred. The filesystem design and disk structures are well documented.
    4. ZFS: main page, existing code (Existing code is under the CDDL, a rewrite is preferred)
    5. SMB, Windows shares: smbfs from FreeBSD (2-clause BSD, code can be ported to Haiku)

    It's okay to port over the code from other systems, although we prefer code that can be distributed under the MIT license.

    IMAP FS: File system access to an IMAP account

    In Haiku emails are stored as individual file with extended attributes. The IMAP protocol exposes mails in a folder hierarchy and makes it possible to "browse" a remote mail box. Mounting an IMAP account as a local file system is therefore a natural fit. The file system should have full read and write support (deleting mails (files), creating folders, and moving mails between folders, etc.) with local caching for better performance. The design of netfs and nfs4 implementations for Haiku, as well as the simpler googlefs can serve as a reference on how to implement a network file system.

    ARM port / device tree support

    Unlike x86 systems which have a PCI bus, most ARM devices have peripherals at hardcoded addresses. This means automatic hardware discovery is not possible. The Linux kernel developers designed a solution called "flattened device tree". It is a static description of the hardware, telling the kernel where devices are located and which driver to use.

    Haiku plans to use device trees to support several ARM devices with the same kernel. This requires updating our drivers and driver infrastructure to not rely so much on the PCI bus. This work should start with the USB EHCI driver, in order to provide at least one mass storage solution to the ARM port of Haiku.

    The ARM port of Haiku is currently in an early state. This project may involve debugging of other issues in the port to get it running further, so the device tree part can be tested. Several parts of the early boot code should be reviewed to make use of the device tree and remove hardcoded addresses (RAM mapping, framebuffer, serial port, etc).

    Unify File System Caches

    The Haiku kernel provides two kinds of caches for use by file system implementations: the file cache and the block cache. The file cache caches data at the "file" level, while the block cache is used at the "block" level and is used for on-disk structures as well as file data.

    The file cache uses physical memory pages directly and it is linked with the VM subsystem, so that pages used for caching are freed automatically (in a least recently used order) when running low on free memory. The block cache, however, uses mapped memory (via the slab allocator) and freeing memory in low memory situations is handled via the low resource manager.

    The first problem with the current implementation is caching imbalance in favor of the block cache: it tends grow more than needed and prevent the file cache to get enough memory.

    Another problem is the use of large amounts of kernel address space by the block cache, which can be problematic on 32 bit architectures. This makes the block cache constrained to the 2GB of memory available for the kernel in Haiku, and sometimes makes the kernel run out of address space for other uses.

    The goal of this project is to create a common underlying mechanism (using `VMCache`) to unify both caches and move the block cache out of the kernel address space. The following problems need to be investigated and solved:

    • How to deal with heterogenous block sizes (not necessarily matching the page size): each mounted filesystem volume may have a different block size, and the block cache must be able to efficiently cache blocks of these different sizes,
    • How to map support for transactions to `VMCache` hierarchies,
    • Balancing of the memory allocation between the block and the file cache and between multiple mounted filesystem volumes.

    Replace GNU code with that under permissive licence

    Replace GNU C library and utilities with BSD-licensed equivalents

    Session management

    Multi-user support


    Bluetooth Stack Improvements

    Haiku Bluetooth Stack implements only basic functionality on lower and middle layers. This functionality needs to be completed and Bluetooth 2.X and later possibilities explored. This task involves investigating the current state of the Bluetooth code, checking that the basic functionality is still working (pairing devices, etc), and improving the stack to make it more useful by implementing drivers for a Bluetooth device of your choice (audio, HID, networking, etc).

    Integrate our PPP implementation

    Port the PPP implementation to our new network stack. Add phone-line modem support, including HDLC framing and VJC compression (porting both algorithms is sufficient, but make sure the license is compatible to MIT). Implement CHAP authentication. Find and fix bugs.

    Stream Control Transmission Protocol (SCTP)

    Implement and test SCTP, a message based transport layer protocol similar to TCP and UDP. It should comply with current IP and IPv6 implementations and provide similar programming API as BSD.

    IPv6 Finalization

    The base framework for IPv6 support was implemented as a Google Summer of Code 2010 project. Even so, there remains a lot of smaller cleanup/finalization tasks that can be done as a project.

    • Tickets:
      • #8293 -- BNetworkAddress needs to check if there is an available IPv6 connection.
      • #7228 -- RFC: BNetworkInterfaceAddress needs to store auto-configuration flags
      • #6489 -- ifconfig needs to validate availability of ipv6 module prior to utilization
      • #2632 -- Possible redefinition for struct sockaddr_in, related to IPv6
      • #8319 -- Haiku needs IPv6 duplicate address detection during link scope ip configuration.
      • #8317 -- Haiku needs IPv6 global scope Auto Configuration (router advertisement + DHCPv6)
      • #11862 -- Net server multi-protocol rework

    Extending and improving the Services Kit network backend

    The WebKit browser and some other Haiku applications such as HaikuDepot use the Services Kit as a network backend. This is a library similar to curl or soup, but nicely integrated into the Haiku API for easy use in native applications. The Services Kit is still a work in progress, however, and can be improved in several ways. The work on this task could include:

    • Reworking the Service Kit to avoid spawning one thread for each network request. The requests should be allowed to run in an existing thread, or to be grouped together (by use of select() or poll() to wait for activity on their sockets, then dispatching events to the BNetworkRequest objects). This would remove some of the overhead of creating a request and solve some design issues in the Services Kit API.
    • A caching layer for HTTP requests. There currently is no cache which means some requests are made again and again to the same server. The cache should keep the result of these requests on disk and/or in memory, making it possible to reuse them and load web pages faster.
    • Complete support for HTTP proxies. While there is currently limited support, it is not possible to do HTTPS requests through a proxy. This should be added, as well as a system-wide user interface to configure and manage proxies.
    • Implementing FTP support. The services kit is designed to support multiple protocols, but currently only HTTP and Gopher are supported (as well as the local "file" and "data" protocols). FTP support in the web browser would be helpful.

    • User Interface

      Preflet GUI refactoring

      Several preference applications (aka preflets) could be redesigned. Furthermore, there might still be code that does not yet use our layout API. This work may include (but is not limited to):
      1. combining Keymap and Keyboard
      2. #6983 Printer
      3. Shortcuts
      4. Notifications

      Modular edit view

      Many Haiku applications are using their own edit view to provide basic editor functionalities. All these implementations work a little bit different and create an inconsistent user experience. One solution is to provide a modular and powerful editor view that could be used in various Haiku applications.

      The edit view design should be modular and extensible to make it easy to implement e.g. following features:

      • syntax highlighting
      • spell checker
      • code completion, word completion
      • line numbers, ruler, 80 character limit line, hyper links
      • working on an input stream rather than on a input file e.g. to be able to open files ~100Mb without loading them into memory in one go.
      • interface to external applications e.g. to jump from a compiler error to the according line in the code

      Reuse of existing syntax highlighting libraries may be possible, provided they can be connected to a native Haiku view. MIT license would be preferred for the external library.


      Add subtitle support to the Media Kit

      While our MediaPlayer has support for external subtitle files, the Media Kit itself has not. The most obvious downside of that is that there is no support for subtitle (text or bitmap) embedded in video files within the MediaPlayer or other applications.

      Your job would be to design the necessary API extensions to let subtitles fit in with the rest of the Media Kit, and add native support for them, which will then be available to all applications as part of the framework.

      Implement system wide and application level input/output chooser

      When more than one soundcard is attached to Haiku, you can only change the default input/output in the Media preferences, or reconnect media nodes manually via Cortex to another input/output device. The Media Kit could support default nodes per application (either unset (system default), or set to a specific device), and the Media preferences could offer an UI to change this.

      Additionally, applications like MediaPlayer, and SoundRecorder should be able to change the input/output device within the application, too (which would just be another way to alter the described Media Kit functionality).

      This functionality should only be visible if there actually is more than one audio device attached to the system; if a device is not available, it should automatically use the default output instead.

      Part of this work would be to implement non-volatile storage that the Media Kit uses for each application that is connected to it, and the ability to detect the application on next start. This storage could then also be used to remember other per application sound settings in the future (or if time permits) like the balance, and relative volume.

      Streaming support for Media Kit and applications

      The media kit and related applications in Haiku relies a lot on the BMediaFile being seekable. This makes it difficult to use with non-seekable media sources such as internet streams or DVD media. Rework what's needed to get them working properly.