[GSoC 2014] Haiku ARM port

Blog post by dnivra on Thu, 2014-04-24 09:29
Hello everyone!
Most of you know that 4 students have been chosen to work with Haiku during the Google Summer of Code(GSoC) 2014. My name is Arvind and I am one of the 4 students(yaay!). I will be improving the ARM port and hopefully make significant progress.

About me
I am a Master's student in computer science from India. I am interested in computer systems and working on a system software like Haiku will help me gain more insight into them. I am also interested in reverse code engineering and knowledge about the ARM is extremely useful for reverse code engineering considering the ubiquitous nature of ARM devices. Working on the ARM port will help me learn more about the ARM architecture as well.

Current status of the ARM port
Work on the Haiku ARM was started as part of a 2010 Google Summer of Code project by pfoetchen which got the kernel debugger working(emulating a verdex board) and displayed the Haiku splash screen on Qemu. Ithamar, kallisti5 and puckipedia have been working on the ARM port but progress has been rather slow owing to other commitments. Currently, Jam targets for ARM boards such as Raspberry Pi, Beaglebone and Verdex board exist but the build is broken due to introduction of the Haiku package manager. The objective of this GSoC project is to get Haiku running on the BeagleBone black.

Objectives of the project
The primary objectives are
  • Fix issues when trying build the ARM port by bootstrapping.
  • Implement support for the ARMv7/Cortex A8 MMU.
  • Fix issues that arise when booting the build(both in bootloader and kernel).
  • Write memory card and video drivers for the chosen ARM board.

Description of the project
Currently, it is possible to successfully cross compile gcc for ARM. The next step is to successfully build the ARM port using the above cross compiled gcc by fixing all the issues that arise during the build process. This involves the following 3 steps:
  • Creating a bootstrap image of Haiku.
  • Building the packages for Haiku using the bootstrap image.
  • Building the complete Haiku image for ARM.

Once the build succeeds, the next step is to implement MMU support for ARM. The current MMU code is for the Verdex board and created before MMU was standardized for ARM boards. If support for the standardized MMU were included, it would make it easier to get Haiku running on most standard ARM boards. This will require investigation of the current status of MMU support and if it can be used(entirely or in part). The Linux, FreeBSD and perhaps even the ChromiumOS sources will be used as a reference for implementing MMU support.

After implementation of MMU support, I plan to fix any issues that prevent booting the kernel and executing the kernel debugger. Once those issues have been dealt with, I plan to work on adding a software driver for the memory card. If this succeeds, hopefully it should be possible to boot the ARM port off a memory card on the ARM board and all applications also work properly. Once the ARM port boots up successfully, I hope to add drivers for the video. This will ensure that anyone can make full use of the Haiku to develop applications on the BeagleBone black.

Future work of the project
The following are nice to have features which could be implemented if there is time or can be carried out as future work of the GSoC project.

Ethernet driver support
This was originally in the proposal but then I decided that implementing video driver and SD card driver is more important. Networking support is definitely good but being able to boot off an SD card and show off the Haiku GUI is probably better.

Flattened Device Tree(FDT) support to enable discovery of hardware when booting.
FDT is a data structure that contains information about the various hardware devices. It is particularly useful in embedded systems where the hardware devices cannot be discovered like in systems with a PCI or USB bus. As the name suggests, it is a tree of nodes which contain properties as key-value pairs. [5] has an excellent example for FDT entries in the human readable Data Tree Source(dts) format. This is converted into the machine parseable Data Tree Binary(dtb) format using a Data Tree Compiler(dtc). FDT is commonly used by Linux(and I think even BSDs) to discover hardware devices in architectures without PCI support(eg: ARM).
Currently the hardware information is hardcoded into Haiku and thus the entire kernel will have to be rebuilt every time new hardware information is added. Implementing FDT support will eliminate the need for recompilation since new hardware can be easily discovered. FDT support is work in progress and thus the current status has to be evaluated in order to decide if it will fit within the timeframe.

Patches to buildtools and haiku source to allow building ARM port from within Haiku. Currently, cross compiling the toolchain from within Haiku fails since gcc2 is default and few utilities are not yet available for other build platforms. The goals is to contribute patches and create packages that would enable compilation of Haiku ARM port from within Haiku.

Comments and suggestions welcome!
I’ve read through few past blog posts and have found that lot of people are really interested in having a working ARM port for their boards. If you have any suggestions/comments, please feel free to post here(preferred since it’ll be archived), drop by the IRC for a chat or post comments on the Google document[7](most of the content here is also present in the Google document).



Re: [GSoC 2014] Haiku ARM port

Hi Arvind, welcome and hope you have a great GSoC :)

Re: [GSoC 2014] Haiku ARM port

Thank you!

Re: [GSoC 2014] Haiku ARM port

Welcome and good luck! Would definitely be interesting to see Haiku running on a Rasberry Pi!

Re: [GSoC 2014] Haiku ARM port

I'm going to be targeting the Beaglebone Black which is an ARMv7 board while the Pi is an ARMv6 board. Thus, I can't say for sure if it will work fine on the Pi.

Re: [GSoC 2014] Haiku ARM port

Hi Arvind, wish you good luck and hope to see Haiku running on something like ARM Chromebooks after you're done :)

Re: [GSoC 2014] Haiku ARM port

Welcome Arvind! If you get Haiku running on the Beaglebone Black, you'll officially be my hero.

Re: [GSoC 2014] Haiku ARM port

I'll happily help with testing haiku on 2 devices on arm chip: RapsberryPi and OpenPandora+BeagleBoard

Re: [GSoC 2014] Haiku ARM port

Hello, I look forward to see the fruits of this project. I would love to run Haiku on the ARM Chromebook.

Re: [GSoC 2014] Haiku ARM port

Great news !

Hope in the future we can run also on Tegra devices.


Re: [GSoC 2014] Haiku ARM port

Great ARM is the way to go for Haiku ! I am dreaming to get it run on an O-droid U3

Re: [GSoC 2014] Haiku ARM port

I have a couple of BeagleBone Blacks and plan on purchasing a couple more. When it comes to testing, please let me know and I would more than happy to help. I would LOVE to see Haiku running on a BBB!

Re: [GSoC 2014] Haiku ARM port

I was just looking to pick up a Beaglebone Black, and this just solidified the decision to make it happen sooner, rather than later!

Re: [GSoC 2014] Haiku ARM port

you can show www.newos.org this kernel is using in haiku too but in haiku shwitch from c to c++.
I think its nice to see when newos can boot on arm too. I think this can help new developer he think haiku are to big (to big i mean the developer skills are to small) so its a good run to work on newos then haiku.

good work


Re: [GSoC 2014] Haiku ARM port

Super awesome to have sponsor for a BBB/Haiku project. Will be following the reports. Great job for you to win the spot!

Next up: Haiku on Odroid-XU :-)

Re: [GSoC 2014] Haiku ARM port


It would be fine if Haiku would run on Cubieboard: http://www.cubieboard-europe.com/cubieboard/cubieboard-2-a20-arm-board-1...

Than I would have a small cool Haiku PC. :)