• No products in the cart.

The Raspberry PI Platform and The Challenges of Developing FreeBSD – Interview With Oleksandr Rybalko by Luca Ferrari

Luca Ferrari: Dear Oleksandr, could you please introduce yourself to the BSDMag readers?

Oleksandr Rybalko: I’m a DevOps from Ukraine. A long time ago, somewhere in the year 2000, I began to work as a support engineer in a small ISP in Mykolaiv city, Ukraine. The admin of that ISP gave us (support engineers) a free server to play with FreeBSD. That’s the way I became a FreeBSD fan. Some time later, if I remember correctly, it was 2009, another good guy asked me to work on a FreeBSD embedded project. We selected the name ZRouter.org for it, because the main target was to run FreeBSD in small ARM/MIPS based routers with onboard Z-Wave transceiver. After some success of the project and several patches, Adrian Chadd asked me if I wished to become FreeBSD committer. Of course I agreed 🙂

Luca Ferrari: What is your involvement within the FreeBSD project?

Oleksandr Rybalko: I did three projects:

1. MIPSSystem-on-ChipRalinkRT3052support;
2. ARM System-on-Chip Freescale i.MX515 basic support;
3. vt(4) virtual terminal.

So, from time to time I try to find spare minutes to support that code. And continue to improve the ZRouter.org project too.

Luca Ferrari: Are you currently working (or have worked) within other BSD projects?

Oleksandr Rybalko: Yes, it is ZRouter.org.

Luca Ferrari: Could you please introduce our readers to the Raspberry PI platform and detail what are the challenges of developing FreeBSD for such an embedded platform? What is the current status of the porting effort?

Oleksandr Rybalko: I think, my main help here was a USB OTG driver, which I wrote before for another device (Ralink RT3052), then port it to R-Pi. But it was rewritten by Hans Peter Selasky. I do not know so much about USB as Hans knows.

Another useful part of my help is Xorg support. I did a simple Xorg video driver which uses framebuffer exported by virtual terminal subsystem. That is help to many guys to start use RPi as a simple desktop system.

Luca Ferrari: What are advantages of using FreeBSD on Raspberry PI with regard to other operating systems?

Oleksandr Rybalko: FreeBSD is very powerful as a net- work server. All modern network features in one box, with very fast processing.

Another good side of FreeBSD is modularity. It is not required to write code to use some driver that was already written for another system, you can just define it in con- figuration files (kernel config, kernel hints, FDT). So if you want build a nice, R-Pi based, home server – use FreeBSD. If you want to play with devices attached to R-Pi’s GPIO – use FreeBSD.

Luca Ferrari: FreeBSD has a long history about embedded device installations, like for instance Soekris boards, did the experience and code produced along this path help the porting to the Raspberry PI?

Oleksandr Rybalko: Yes, for a long time I see “device migration” – when one device component is used in several different System-on-Chip(SoC)s, sometimes it’s very different, sometime it’s even in SoC made by another ven- dor. Plus, there are so called IP-cores. IP-core is just design of device which can be translated into device logic. So chip manufacturers get licenses to use some of it, and combine them into their own SoC design. As a result, we can find well known devices in very unexpected places. For example one USB On-The-Go controller, with a small difference, can be found in:

  • Cavium Octeon MIPS64 SoC
  • Ralink RT3052F MIPS32 SoC
  • Broadcom BCM2835 ARM SoC (Raspberry Pi)





Luca Ferrari: What are the most notable use cases of FreeBSD running on Raspberry PI?

Oleksandr Rybalko: I don’t know 🙂 Some guys use RPi as a development board, because there are a lot of available pins to connect external devices. Some guys use it as lite PC. I heard of one idea to show slides for conferences, but I don’t know if it was realized.

Luca Ferrari: What is the ZRouter project and what is the aim and challenges it is facing?

Oleksandr Rybalko: ZRouter.org project aims to embed FreeBSD into routers with very limited resources, like CPU clock speed, RAM size and Flash storage space. But there are a lot of systems which do not require full FreeBSD power, so ZRouter.org can be used there too.

For example, firewalls usually have a relatively big amount of resources, but it’s still an embedded machine, so does not require a full set of kernel modules and big number of utilities and libraries.

ZRouter.org can help there to build a system image with a reduced amount of modules/utils/libraries.

Nobody will write and compile programs at his firewall. 🙂

The main challenges of the ZRouter.org project were the big sizes of most software parts and lack of com- pressed, Flash oriented R/W filesystem. Those problems we worked around using some tricks, like use R/O file- system compressed with LZMA (geom_uncompressed) + changes stored in tar.gz in a special flash partition.

Luca Ferrari: What would you suggest to a developer that wishes to deploy his own application/stack on Raspberry PI using FreeBSD?

Oleksandr Rybalko: Read wiki.FreeBSD.org and start working 🙂 There is nothing hard, even for a novice.

I have to have some love to FreeBSD, some love to your board, some wish to create new things and you will get what you like to see.

Anyway, the big and warm FreeBSD community will always help you to resolve your problem, but only if you’re doing something. 🙂

And always remember “If you can get 90 percent of the desired effect for 10 percent of the work, use the simpler solution”, meaning – always try to find the thing you want to implement before you start, maybe somebody did it before you. That also brings you closer to that thing FreeBSD developers very love – “code reuse”

Luca Ferrari: In the endless battle for the best editor in the world, could you please tell us which one do you use and what tools make your favourite toolchain?

Oleksandr Rybalko: Heh, you will not believe 🙂 I’m use mcedit, sometime vi/vim.

About toolchain

I like clang/llvm, but I hate to wait so long while it will be built during buildworld. And hate more to wait double build for embedded buildworld 🙂

About Oleksandr:

Aleksandr Rybalko is a DevOps with 15 years of experience as a developer (embedded/kernel/apps/web), a networking consultant, a system administrator, and a support specialist. With love to CADs and hardware design. Currently working as Consultant, Developer in D-Link Uk

About Luca:

Luca Ferrari lives in Italy with his wife and son. He received a PhD in Computer Science by University of Modena and Reggio Emilia, has been co-founder, member of the board of directors and president of Italian PostgreSQL Users’ Group (ITPUG). Luca loves Open Source software and Unix culture, uses GNU Emacs, Perl, zsh and FreeBSD along with a lot of other cool tools.

Article comes from BSD Mag Vol. 09 No. 09 (73)

2 responses on "The Raspberry PI Platform and The Challenges of Developing FreeBSD - Interview With Oleksandr Rybalko by Luca Ferrari"

© HAKIN9 MEDIA SP. Z O.O. SP. K. 2013