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

11 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:

2 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.

6 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.

1 Like

This is a cool experiment! But then again if you wanted to, you could de-AI the changes and merge them. No pressure though.
Edit: I used “deslopify”, and that was wrong, changing to De-AI

works on my rpi yipeee

1 Like

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