# FreeBSD on Raspberry Pi



## Beastie (Jan 24, 2013)

> Another day (a particularly snowy day, here), another new OS for the Pi. This is not an official release; this image has been built by the FreeBSD community (and we do expect an official variant from http://www.freebsd.org at some point). But this is very useful early access if youâ€™ve been wanting to play with FreeBSD on your Pi; be aware, though, that this is not a finished, stable port, so you may encounter some bugs. Youâ€™ll need an SD card of 4GB or more to dd this image to. (And if youâ€™re not sure what any of this means, that means this probably isnâ€™t for you â€“ yet!)


http://www.raspberrypi.org/archives/3094


----------



## SirDice (Jan 24, 2013)

Nice, now I definitely want to get my hands on a Pi :e


----------



## jackp (Jan 25, 2013)

Awesome! Now I'll have to go buy an RPi!

There are some comments on the Raspberry Pi forums too:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=56&t=30148

EDIT: Someone already has a FreeBSD web server running on an RPi:
http://www.freebsdarm.org/


----------



## sam0016 (Jan 26, 2013)

Just ordered one should be fun ended up having to buy a lot more then just the pi for anyone wanting to buy one don't forget you need to buy everything including a SD card, power supply cables etc. Should be fun to play about with NetBSD/FreeBSD on also I am going to see how well the pi works as a firewall and a router could be a really cheap solution.


----------



## NewGuy (Jan 26, 2013)

*Pi or laptop*



			
				sam0016 said:
			
		

> Just ordered one should be fun ended up having to buy a lot more then just the pi for anyone wanting to buy one don't forget you need to buy everything including a SD card, power supply cables etc. Should be fun to play about with NetBSD/FreeBSD on also I am going to see how well the pi works as a firewall and a router could be a really cheap solution.



This is something I've often wondered about. A Pi, plus keyboard, plus monitor, plus cables, power supply, SD card & external hard drive aren't all that different in price from a low end laptop/netbook. For most hobbyists looking for a spare machine to play with, doesn't it make sense to get a cheap laptop instead of a Pi?


----------



## cpm@ (Jan 26, 2013)

NewGuy said:
			
		

> This is something I've often wondered about. A Pi, plus keyboard, plus monitor, plus cables, power supply, SD card & external hard drive aren't all that different in price from a low end laptop/netbook. For most hobbyists looking for a spare machine to play with, doesn't it make sense to get a cheap laptop instead of a Pi?



Creation and development it in a laboratory for later use in schools computing and now available for home users (remember the early days of UNIX).

It's not a matter of sense, it is a great achievement for the price you pay for your purchase, you can buy it as a low cost toy for only 42.31$ (Model B) each which is fully functional with FreeBSD. Now Raspberry Pi is squeezed by FreeBSD's power 

See also FreeBSD developer's notebook.


----------



## tingo (Jan 26, 2013)

As you will all figure out (if you try it with your Pi), the Pi isn't very capable as a personal workstation (it wasn't designed to do that). It works well for what it was designed to do (an inexpensive learning tool), and it also works quite well for some things it wasn't designed to do (XBMC for example), and it could do nicely as an embedded FreeBSD server. However, be aware that the NIC is connected to the usb bus (and the Pi only has one), this is going to limit some use cases.


----------



## cpm@ (Jan 26, 2013)

tingo said:
			
		

> As you will all figure out (if you try it with your Pi), the Pi isn't very capable as a personal workstation (it wasn't designed to do that). It works well for what it was designed to do (an inexpensive learning tool), and it also works quite well for some things it wasn't designed to do (XBMC for example), and it could do nicely as an embedded FreeBSD server. However, be aware that the NIC is connected to the usb bus (and the Pi only has one), this is going to limit some use cases.



Depends on if you need a RPi whether or not, but for development purposes and teaching in academic of Computer Science is a good invention. IMHO, I don't try defend to use it exclusively for investigation.


----------



## Davsjo (Jan 26, 2013)

As tingo said above, the RPi isn't a good desktop machine. Running Xorg and a few desktop applications on it was not an altogether pleasant experience when I tried (using the Debian version that's available; I have not tried FreeBSD yet), but I'm contemplating using it for playing music and running Newsbeuter. As long as you avoid accessing the memory card you can probably run lightweight console applications on it with good results.


----------



## cpm@ (Jan 26, 2013)

I don't mind acquiring one and test it, but later. Sincerely, right now I dunno what use give it. Before I prefer to be better documented


----------



## NewGuy (Jan 26, 2013)

cpu82 said:
			
		

> It's not a matter of sense, it is a great achievement for the price you pay for your purchase, you can buy it as a low cost toy for only 42.31$ (Model B) each which is fully functional with FreeBSD. Now Raspberry Pi is squeezed by FreeBSD's power



My point was that the Pi does not appear to be a great achievement for the price paid. The Pi is a very low end machine. Once we take the cost of the Pi, add in a monitor, cost of shipping, the various cables, power supply, keyboard and storage, the total cost is close to that of a low-end laptop, and the laptop will have much better specs, plus wi-fi. For the cost it takes to purchase a Pi and all its add-ons, why not get a netbook? either makes for a good low-cost toy, but the netbook is more versatile.


----------



## Davsjo (Jan 26, 2013)

NewGuy said:
			
		

> My point was that the Pi does not appear to be a great achievement for the price paid. The Pi is a very low end machine. Once we take the cost of the Pi, add in a monitor, cost of shipping, the various cables, power supply, keyboard and storage, the total cost is close to that of a low-end laptop, and the laptop will have much better specs, plus wi-fi. For the cost it takes to purchase a Pi and all its add-ons, why not get a netbook? either makes for a good low-cost toy, but the netbook is more versatile.



Netbooks seem a bit dated these days, don't they? Compared to a regular workstation, I think you're right though. There seems to be a hype around the Pi: they actually made a computer for next to nothing. That, however, doesn't really mean anything as it isn't of any use for most people.


----------



## cpm@ (Jan 26, 2013)

NewGuy said:
			
		

> My point was that the Pi does not appear to be a great achievement for the price paid. The Pi is a very low end machine. Once we take the cost of the Pi, add in a monitor, cost of shipping, the various cables, power supply, keyboard and storage, the total cost is close to that of a low-end laptop, and the laptop will have much better specs, plus wi-fi. For the cost it takes to purchase a Pi and all its add-ons, why not get a netbook? either makes for a good low-cost toy, but the netbook is more versatile.



RPi is usefull for nerds/geeks/dorks. Is right, but Pi has manufactured peripherals. Pi is not a consumer device as such, even though it's pretty easy to get something up and running on your TV.


----------



## drq (Jan 27, 2013)

NewGuy said:
			
		

> This is something I've often wondered about. A Pi, plus keyboard, plus monitor, plus cables, power supply, SD card & external hard drive aren't all that different in price from a low end laptop/netbook. For most hobbyists looking for a spare machine to play with, doesn't it make sense to get a cheap laptop instead of a Pi?



I run my both of my Pi's as headless.  The only cost was $35 for Pi, shipping, and $10 for an SD card.  I had all the cables I needed, an old Blackberry charger cable for power.  Pretty cheap for a constant VPN server to work and a media center (using openelec).  Much cheaper than any laptop/desktop setup.  Now I have a 3rd SD card to play with FreeBSD.


----------



## gqgunhed (Jan 28, 2013)

I use my Raspberry Pi as media center (raspbmc) or as an arcade console (Chameleon) for those old Monkey Island or Zak McCracken games for my kids. 
I have not tried FreeBSD on this box yet but will try that as time permits. I am particularly interested in the use of the GPIO pins to play around with some external electronic devices.
One of the key features IMHO in comparison to a PC is the low power consumption. Ok, a netbook will do too ;-) 

But the Pi is definitely a fun geek toy.


----------



## alie (Jan 29, 2013)

I just build new kernel with ARM EABI:
http://snakeorladder.com/rpi-kernel-armeabi.tar.gz

Please help to test this kernel to help andrew@
http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004625.html


----------



## fleon (Feb 26, 2013)

NewGuy said:
			
		

> My point was that the Pi does not appear to be a great achievement for the price paid. The Pi is a very low end machine. Once we take the cost of the Pi, add in a monitor, cost of shipping, the various cables, power supply, keyboard and storage, the total cost is close to that of a low-end laptop, and the laptop will have much better specs, plus wi-fi. For the cost it takes to purchase a Pi and all its add-ons, why not get a netbook? either makes for a good low-cost toy, but the netbook is more versatile.



What monitor, PSU and cables?  Seriously, I couldn't see the point either, but what you get for your Â£25 is a very capable Swiss army knife. It's got fully functional 
Ethernet, video output, USB ports, sound output PIO and it needs very little power. And you can program it using the full power of *NIX Okay, you could get an embedded CPU with Ethernet and PIO for less (if that's what you needed), or an embedded CPU with PIO audio. But for a bit more this card is a one-size-fits all. I don't know about a user-land workstation, but I've got lots of applications (e.g. a "free rent" backup DNS at a data centre). For knocking up a quick black box to do any one-off job there's a lot to be said for standardising on one piece of hardware that can "do it all", and with a familiar programming environment thrown in.

To turn it around, by the time you've taken your low-end laptop, hacked off the screen, removed the keyboard, thrown away the hard disk, added some IO lines and squeezed it in to a little box - how much is that going to cost? And what's the power consumption going to be like?

I found that ordering one and having it sit on my desk I did start to see the point. Off the page I tended to agree with NewGuy above.

Ejucashon? Wots that?


----------



## spanglefox (Mar 26, 2013)

Hi all,

Well I have enjoyed running FreeBSD on my Raspberry Pi and have two intended uses for it.

Firstly one use is going to be run as a nice way of having a low power offsite backup facility (currently using the Debian image until FreeBSD hits 10-RELEASE).

Second is as a thin client; replacing a load of machines that will "die" with the end of life of Windows XP. Have had great success with the Debian (hard-float) image and Windows Server 2008R2. A great cost saving of replacing Â£200+ per machine compared to ~Â£25 per machine (not to mention retraining for Windows 8). So going to see how FreeBSD compares!

On a slighty divergent note: it grates to purchase any more Microsoft "fresh air". Coming from Linux/FreeBSD background discovering CALs was a shock!

In addition there is a recent podcast on talkBSD regards the Raspberry Pi for those interested it is worth a 5 minute listen.


----------



## Avyd (May 29, 2013)

spanglefox said:
			
		

> Hi all,
> 
> Well I have enjoyed running FreeBSD on my Raspberry Pi and have two intended uses for it.



Hello,

I am trying to install a webserver on it, but even vim install fails. Is that only me who has problems with the 10-CURRENT release from db.net/downloads. I have installed bsd-pi-250580M.img.xz.

I have tried to install vim, but got errors. Made some search and found that I need libXrandr reinstalled:


```
mpih-div.c:104:6: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
            UDIV_QRNND_PREINV(dummy, r, r,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mpi-internal.h:153:14: note: expanded from macro 'UDIV_QRNND_PREINV'
        sub_ddmmss (_xh, _r, (nh), (nl), _xh, _xl);                 \
        ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./longlong.h:200:23: note: expanded from macro 'sub_ddmmss'
           : "=r" ((USItype)(sh)),                                      \
                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
*** [mpih-div.lo] Error code 1

Stop in /usr/ports/security/libgcrypt/work/libgcrypt-1.5.2/mpi.
*** [all-recursive] Error code 1
```

Apache2 and Postfix also cannot be installed with the command `make install clean`.

After install*at*ion I ran:

`portsnap fetch`
`portsnap extract`

I have read many tutorials and I couldn't find what's missing. Any idea?


----------



## cpm@ (May 29, 2013)

As the compiler suggests, add this flag to /usr/ports/security/libgcrypt/Makefile:

```
.if ${CC:T:M*clang*}
CFLAGS+=	-fheinous-gnu-extensions
.endif
```


----------

