Porting Haiku to ARM architecture

Blog post by pfoetchen on Tue, 2009-04-21 23:35

Personal Profile

  • Johannes Wischert
  • Brief bio - I'm a computer science student living in Germany. I'm 25 years old now. I wrote my first program with 8 or 9 years or so and never stopped since then... After my studies I want to work somewhere in the embedded systems development but by now I enjoy my studies and take my time to finish.

Project idea information

  • Project title - Port the Haiku Kernel to ARM-Architecture
  • List of project goals -
    • generic u-boot Bootloader using the u-boot apis as far as possible to ease porting to other platforms that use u-boot
    • Kernel that runs on the arm-processor and supports all applicable features that the x86 kernel has
    • Device driver for at least the SD-card and the Serial-Port
    • Working system running on a Beagleboard or similar device
  • Project description -
    • To get the system running on an ARM-CPU we first need a working Haiku ARM toolchain to compile the code I already got the toolchain to run and produce working binaries (tested under qemu) so this part of the system already works more or less. see: http://dev.haiku-os.org/ticket/3633
    • After that done the next step is the boot loader. Since the beagleboard I want to target already has "Das U-boot" bootloader installed I decided to use it to get the kernel loaded. Using the u-boot loader has some advantages since it already provides all the important data and functions for loading the kernel like builtin serial drivers and drivers for all kind of memory to boot from (including a TFTP client) these functions are exposed by a simple platform independent API. By using this API an architecture independent kernel loader could be build, so that porting to other architectures that use u-boot would be much easier.
    • The loader would run as a standalone application on top of u-boot to use it's features and then switch to direct access to the hardware to run the kernel.
    • To allow u-boot to boot the kernel I could either include bfs in u-boot or implement the bfs in the loader programm. If the bfs code is in the loader no change to u-boot is needed so I will probably take this way since changing the u-boot always has the risk to brick a device.
    • I know that this is not everything and I will probably have to ask a lot of questions to get everything right ;)
    • I must admit that I don't know to much about the ARM internals, yet so I can't give much details about how I will port the MMU dependent stuff etc.
    • The device drivers for the serial-port and the sd-card are quite straight forward to implement, since they are interfaced directly by the processor (at least on the beagleboard) and there are a lot of existing open source drivers (of course we would have to pay close attention to the licenses etc...)
    • Since the beagleboard does not have an isa or pci bus it could use code similar to the m68k port to put the onboard devices in the pci bus. Even better would be to write a sort of bus system for the onchip devices this would also help to port to other devices that do not realy have a bus system like many other embedded devices.
    • The next steps would be to write a driver for the onchip usb-controler and a Framebuffer driver if the porting goes much faster than I think ;)
  • Why do you want to work on this project?
    • I love the whole concept of Haiku and would love to see it run on embedded hardware like all these planned linux+arm netbooks. Since ARM-CPUs are used in so many different devices and most of these devices are multimedia devices like netbooks/mediaplayers/smartphones it would make sense to port Haik as an multimedia OS to these devices.
    • I already have experience in embedded programing for example I ported an OS from the MSP430 to the SuperH Architecture for university (it was a nano kernel OS called SmartOS there is a wiki about this project but for whatever reason they have the interesting parts hidden http://www5.informatik.uni-wuerzburg.de/snow5xoops/modules/dokuwiki/doku...? ) so I know a bit about all the problems that could arise.
    • I know porting such a complex project is quite difficult but I have the time to concentrate on this project and it's not the first embedded project I work on (but probably the biggest ).
    • Other projects I worked on were a device driver for the r4ds flash card to use it under DSLinux on the Nintendo DS and some other smaller stuff like a stepper motor controler board that was controlled by an MSP430.
    • I know that this project is not really helpful to get closer to the first alpha release of haiku but I think an ARM port would be a interresting addition to the Haiku project and perhapse attract some more developpers.

Comments

Re: Porting Haiku to ARM architecture

I'm realy looking forward to this :)

Will you make a TODO how one can build a ARM build and what's needed?

I don't have a beagleboard but I'm thinking of getting me a ATM based netbook

Re: Porting Haiku to ARM architecture

There is not much buildable yet but I will write some blog post on how to build the arm toolchain etc.

The touchbook is rea

The touchbook is realy nice and the hardware is quite similar to the beagleboard so it would be quite interresting to port it to that, .
_______________________
Elvie Ceja

Re: Porting Haiku to ARM architecture

Hi,
this is so cool , i think a good ARM port bring Haiku on a new level.

Re: Porting Haiku to ARM architecture

Have a fun.

Re: Porting Haiku to ARM architecture

you may be interested by this :

http://www.alwaysinnovating.com/company/opensource.htm
(they might provide documentation and/or support)

and... good luck for your project

Re: Porting Haiku to ARM architecture

The touchbook is realy nice and the hardware is quite similar to the beagleboard so it would be quite interresting to port it to that, too.

Re: Porting Haiku to ARM architecture

Don't forget the pandora! www.openpandora.org the developer forum is very active there and probably even more so once the device is realeased

you might be able to get a free dev unit once the final pandoras are out since many of the developers that recieved development units will recieved thier units and won't need the old dev units anymore

spec at the wiki very similar to the beagleboard with a few differences

http://pandorawiki.org/Main_Page

I mentioned that you were porting Haiku to ARM on the forum and probably to the beagleboard lets just say they took it very well :-)

Re: Porting Haiku to ARM architecture

I always thought that Haiku is a natural fit for the embedded space!
Now only hard real time capabilities are still missing inside Haiku ;-)
Good luck with the porting task!

Re: Porting Haiku to ARM architecture

Please look at gumstix too. http://en.wikipedia.org/wiki/Gumstix

Re: Porting Haiku to ARM architecture

The kernel should be able to run on the Pandora and on the Overo boards since they use similar CPUs (of course we would have to do some adjustments for that...)
Even drivers should be compatible since the serial ports and the SD-Card access are included in the processor itself.

Re: Porting Haiku to ARM architecture

Hi

OsNews published an interesting article about ARM based notebook :
http://www.osnews.com/story/21477/_The_Shape_of_the_Coming_Netbook_Revolution_

Re: Porting Haiku to ARM architecture

When the RaspberryPI comes out I'm willing to donate a couple to the cause if there is a good chance of an ARM port (ideally I think we should get an 1136 Qemu port first). see https://www.haiku-os.org/community/forum/raspberrypis_port_haiku