Haiku Raspberry Pi 4B port (with AI)

TL;DR I did a fairly complete and working port of Haiku to Pi 4 with AI agents. The base, working system was created with just one prompt and an AI agent working 100% autonomously testing on real hardware. (After that more prompts were used to steer the effort to add additional programs, games and features.) This is just an experiment. It is not production ready and I don’t intend to force it upstream. I don’t claim it is correct, bug free or useful. I share it, along with all the details - just in case it will be useful to any of you.


Longer version: I’m a researcher interested in emergent behaviors of AI systems. I did a lot of work on evolutionary computing, cellular automata and similar stuff in the past. I got my PhD on automated methods of finding cellular automata. These days I’m interested in observing complex, long-horizon, open-ended behaviors in modern AI systems and figuring out what can we expect from them.

Since March 2026, I’ve been running an experimental project with LLMs. AI-porting and extending a niche OS to Pi4. This OS was Phoniex-RTOS which has been ported AI-ported to Pi4 by me here: Phoenix RTOS for Raspberry Pi4 · GitHub .

The goal of this original experiment was not just to make AI port the system. The idea was to make it work as autonomously as possible - while still testing on real hardware without my help!

For this I’ve built a testing rig, which I think is quite smart and helpful even if you don’t code with AI:

  • Pi4 B board
  • dedicated, empty Linux laptop given exclusively to AI agent with full sudo
  • UART-USB connector
  • dedicated Ethernet network between Pi and host - used among many other things to netboot the Pi4 - this was based on an extra USB nic on the host - a built-in nic was hooked to an Internet router
  • soft-AP wifi hosted by the laptop to the Pi and the smart plug
  • smart-electric plug allowing Linux host to power-off/power-on the Pi (hard reboots)
  • SD card always in Pi card reader
  • (cheap) HDMI grabber connected with USB-C to linux host capturing HDMI-out of Pi

This setup allows for automated boot, control and inspection of the Pi. When agent wants to test SD boot, it first net-boots Pi with a small Linux image (AI agent created it), that is used to flash the SD card with a test image hosted by NFS. After that Pi gets a hard reboot with netboot turn-off host side. This boots Pi from SD card. If there is an issue - reboot Pi to netboot Linux and retry.

Phoenix-RTOS port was complex and required a lot of manual effort, but turned out to be a success. Testing rig proven itself. Along the way, a big knowledge base has been built on OS development on Pi4. And a lot of AI-agent context in the form of memory files and chat history.

And here comes Step 2 of the experiment. Haiku.

Using all this knowledge, and the testing rig, I asked the agent it to deliver a working version of Haiku on Pi4 end-to-end without ANY manual intervention. Starting with just one prompt. The agent had to download sources, figure out build system, figure out qemu setup, figure out pushing images to the test rig, implement changes, testing… and it worked!

The initial port took ~2 days of 100% autonomous non-stop work. After that I started prompting more to get more features (my prompts are also shown in the repo).

After a week of additional prompting and testing I have a working system with full GPU acceleration, SMP, HW video decode, Firefox running, new version of Wine 11.20 ported along with Box86 / Box64 emulators allowing to run old Windows games, Photocraft ported (the AI-vibe coded Photoshop clone), and many many other things documented in the GitHub repo of this project: GitHub - haiku-pi/haiku-rpi: Haiku on the Raspberry Pi 4 — coordination: scripts, tools, docs, manifests · GitHub - this also includes some general fixes to Haiku that the agent delivered along the way, and multiple performance fixes.


I’m sharing this here only due to respect and admiration of the Haiku community. I don’t expect the upstream project to pull any of the changes. I’m aware of the AI policies in Haiku and I fully respect them. I also have no intention to run a parallel Haiku “AI-fork” to somehow steer attention away from Haiku. Finally, I don’t want to convince anyone to anything. If you don’t like this project - I’m fine with it!

I always was hobby-interested in OS development and I’ve been tracking Haiku progress for many years, since OpenBeOS days!. As a kid I had the chance to briefly use original BeOS - I even have some original CDs delivered by mail from Be Inc.

Yet, I never had time or energy to do anything real with Haiku, other than simple tests. So now when I was looking for a complex task for my AI-agent experiment, I thought this might be cool to try out. This is “why Haiku”.

I did these experiments to better understand the capabilities and limitations of modern AI coding environments. I’m not pro-AI or anti-AI. I just want to understand it.

That being said, if anyone is interested in studying this AI-port (there IS extensive documentation along the code and the system was AI-tested with countless boots on real hardware), or re-using any parts of the project for whatever purpose - you are all more than welcomed.

If any of you would like to test this AI-port on Pi4 - keep in mind, I’ve only tested it with a single board with 4GB of RAM. I have no idea how it will behave on other boards. It might just not work at all. If you ran into problems - please fill-in an issue on GitHub. I’ll try to help if I know how. But I’ll likely look at this project only for couple weeks more and then move to something else.

Finally, if you are interested in any practical details, not covered in the documentation - fell free to ask questions.

All the best,
Witold Bołt

15 Likes

I think that with my decades of real world experience behind me that “I’ve seen it all and that it would be veryhard to suprise me”, and you have managed to bring a genuine smile and sense of wonder into my evening. Well done sir, thank you for sharing your journey, I am really impressed and would gladly buy you a drink and listen to more stories from you. Agentic AI will equilise the OS playing field, and already its hard to keep up with daily amazing advances.

Note to self - get a chicken coup, a goat, and finish the well :partying_face:

3 Likes

Thanks a lot, you’ve done an amazing job! I can’t wait to use Haiku on my Raspberry, thank you so much!

2 Likes

This image is working fine on my Raspberry Pi 4 with 4 Gb. Network, Sound via HDMI, SD card, mouse and keyboard via SD… The system is responsive so I would say the experiment is a success. Great job for that.

However having it upstream is another story. For me, a system in the long term is supposed to be handled and understood by its maintainers, so until maintainers are human the experiment stop here:)

The repo can be a useful source of information of a working version though, so thanks for sharing this.

8 Likes

10 posts were split to a new topic: Yet another LLM discussion

Thanks for this!

I will test this with my rpi4 4gb board.. :smiling_face_with_sunglasses:

1 Like

Thanks for all positive comments.

After a short break the system is being developed further - autonomously. You can track the progress on GitHub. Agent keeps working now and constantly pushes updates and progress report there. As mentioned - I’m not closely monitoring its action, but I know the code gets tested on real hardware before being pushed.

I haven’t followed the LLM discussion surrounding this thread on the forum and I’ll not comment on any of the specific general posts on AI/LLMs.

I do respect any personal LLM / AI opinions people have, and my intention with this work was never to enforce anything on anyone. I do respect Haiku’s right to reject AI contributions and I understand this position. It makes perfect sense for Haiku to focus on human, manual contributions and to stimulate high quality engineering, education, passion and truly humanistic motivations behind the work.

So please do not use this research project as an argument into forcing change of policies or change of opinions of other people. This was not my goal.

The research goal is to evaluate if an AI agent is capable of delivering long-horizon, complex tasks and self-regulate around a repetitive, stable, self-designed process in a consistent and predictable way. So Haiku was never the goal - it was a tool used to reach the goal.

If anyone got offended by this in any way - I’m sorry.

3 Likes

Not at all. You have been very clear from the start, and Haiku is open source, the license does not (and should not) prevent you from experimenting.

Some person is trying to use your work to attack Haiku developers on their supposed inability to provide a working ARM port, which is not acceptable, but also not under your control. Their account has now been blocked and anonymized so that situation is resolved. The topic can continue on the results of your experiment if you want to.

2 Likes

(post deleted by author)

works on my rpi yipeee

2 Likes

Can claude make it work on a pi5?

probably, assuming you’re ready to leave it running for hours with access to your pi 5

There is no reason to believe it would not work. If you have Pi5, UART cable, HDMI grabber, some Ethernet connections and a smart electric plug you can replicate the setup I’ve used and try to do this autonomously.

If you are not so interested in AI research on autonomous work - but rather would like to get Pi5-port as soon as possible it is better to work in a non-autonomous way - by aggressively prompting, setting skills, boundaries, pushing for detailed backlog etc.

If you’ll start from my repo - considering how many things are done there already, I’d assume that the Pi5 port would take couple of days to complete.

I don’t have the capacity to fight for De-AI’ing or upstreaming this work.

Yet I’m fully open to support anyone willing to take the challange.

There are few scenarios possible. First and foremost - continue using AI to extract the detailed description of the changes in plain English. This will answer: what needs to be changed? Then review this description by hand and if it makes sense - try to cleanly re-implement it by hand in a fresh Haiku checkout.

This should be relatively straightforward.

But then again I’m not sure if this really makes such contribution to Haiku good enough to fit. As far as I understand the anti-AI concerns, the main problem is not with the AI tooling itself. The main problem is in having code, submitted by someone, which possibly works - but no-one really understands it.

You can have the same effect without AI. You randomly poke with code, trying to fix a bug. You change some stuff - you do 20 attempts, don’t roll-back, and eventually (by coincidence) you fix the bug. You’re not sure why - but it works, so you consider it done. You submit the fix - and it turns out, it does fix a bug, but at the same time introduces 5 new ones. But you have no idea about this - because you don’t understand.

And this is a true maintainer’s concern. I’m an AI-researcher not an Operating System developer. I understand the process that my AI-agent used to come up with the port. But I don’t fully understand the port itself. I don’t have the knowledge to know if all the changes are actually correct. Does any of this break other architectures or other arm board? Does this introduce new security risks, performance issues, licensing problems. I haven’t checked all this fully. Yet, I did checked it as much as I could.

That being said, I still don’t agree this work is “AI slop”. It was not a silly, one-off job of “bring me Haiku to Rpi4, make no mistakes, work quickly” type of prompt without any context and environment and knowledge base and testing and structure.

I need to say that I don’t fully understand the port. But I also need to say, that it has been extensively tested on real hardware with hundreds (if not thousands) of reboots, and multiple usage scenarios. I actually rarely seen this attention to detail in testing, when running commercial human-led software projects (which I do for living).

I had a look at the markdown document detailing all the changes. I do think there could be value in treating it like a report from a conventional static analyzer. There are a lot of changes that seem like they would be beneficial to the core project and could save quite a bit of developer headache. Some look like easy fixes and might be quick enough to verify or falsify in their correctness.

I don’t know enough about Haiku internals or kernel development to fully assess the overall quality of the changes (one of the fallacies of LLMs is that the output sounds completely confident and plausible), but I think it might possibly worth discussing if it would be a good use of project resources to occasionally have @waddlesplash take a look at lists like this one and to at least maybe pick a few items that stand out.

Don’t get me wrong I’m not trying to start another policy discussion. It just seems wasteful if all the energy that goes into experiments like this one ends up unused.

1 Like

I have a Pi 3B, it this likely to support that model in the future?

I only own a Pi4B so this is the reason the port focuses on it. I see no technical reason for Pi3 not to work. Definitely it is doable and should be relatively easy for an AI agentic setup described in this project.

I estimate it would take 1-2 days to make it happen with a proper setup.

The performance won’t be great in gaming or multimedia but for sure it will work.

The project development is going.

If any of you have RPi 4 board and wants to give it a try - see here: Releases · haiku-pi/haiku-rpi · GitHub

New releases (along with a change log) are published daily (or almost daily) with a lot of bug fixes, performance fixes and some new features. There are binary releases (ready-made SD card images). It is also possible to build from source (detailed instructions are given). Moreover - if you like complex setups - you can also net-boot your Pi over ethernet (assuming you configure the netboot host environment).

I’d appreciate bug reports :slight_smile:

1 Like

It freezes with no boot output on my Pi400, which should be identical to Pi4 :frowning:
Something to tell your agents, as in real world it should not happen.
I hope it helps.

Generally it would be surely nice to play with as a hobby, but without most apps compiled and tested for ARM this will be an eternal prototype as most LLM creations so far (including reverse engineered ones or photocraft).
And sure - if nobody can understand it, no one can maintain it. Maintenance by LLM agent has a lot of limitations - even if you remove the context rot, the actual LLM context for developing anything is always limited. Yours is not. You and I have limited memory for specific things like all the constructs in every language but we can create and invent 5 times daily and have world-knowledge plus big amounts of non-verbal knowledge which most people undervalue a lot.
Experienced humans (mostly) do not have this problem and also can make the effort to reason (this kind of reason which has nothing to do with statistical choices and introduction of randomness to statistical choices).

Good luck in any case, I would be very curious how many tokens it took in total and which models you used. Money and time is also a factor in creating stuff.

This project is very cool! Haiku for Pi is a big step forward in computer usabiliy etc