Haiku to NetBSD port coming to life

As I announced on the respective Mailing Lists (and the topic found its way into this forum as well), I have been working on Haiku compatibility for NetBSD.

This is done mostly on the libroot layer, where missing functions were implemented backed by NetBSD APIs and 3 kernel drivers for IPC. Also the kits and appserver have received some patches. Many of them come from Cosmoe, which is luckily under active development again. Without it, this would not have been possible.

The port reached a state where something visible can be seen, so I have some impressions. The appserver uses the SDL driver from Cosmoe to render to a window inside an X11 session.

This was shortly after libbe, appserver and 3 - 4 simple apps were compiled. Some last fixes were needed in the application kit to make the apps connect to the appserver, and to the area kernel driver. Smearing next to the app windows can be seen because the appserver doesn´t seem to redraw the background if “nothing” is behind windows.

Libtracker and Tracker itself were compiled, as well as some more apps. Tracker ran but did not do much besides drawing the background, which was however utterly needed. Resource embedding was completely missing, that is why the Clock looks weird and didn´t work.

It took some time to get the Resource tools built and integrated. Loading resources didn´t work at first and it was pretty hard to find out that the issue was caused by a misunderstanding between Haiku’s ByteOrder.h and NetBSD’s endian.h on the endianess of the host CPU.

Next registrar and Deskbar were built. Registrar was needed to get Pulse messages working, which some apps need. It was neat to see that running apps showed up in Deskbar. However, Pulse messages did not work from the start and unveiled a bug in the system_time() implementation and the semaphore kernel driver handling absolute timeouts (which was pretty much the only thing not really tested beforehand).

Several fixes later, most of all in the Storage Kit, Tracker does a little bit more and shows the Desktop menu. Resource loading form libtracker was added, but I doubt it can load all resources at this point. Also Deskbar has received its resources and displays the menu icon. I also found a little Terminal app in the Cosmoe sources, tweaked it a bit and got it running.

14 Likes