• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

BSD versus Linux on Raspberry?

Spartrekus

Well-Known Member

Thanks: 43
Messages: 285

#1
Hello,

A nice competition : *BSD versus Linux for PI.

BSD running many systems, Linux as well, Android is good example.

Would you try to convince me to use FreeBSD /w George?

What about your PI: *BSD versus Linux ?
 

ralphbsz

Daemon

Thanks: 645
Messages: 1,097

#2
On a RPi3, tried FreeBSD. While in theory it would probably have been possible to get most things to work (with recompiling, learning poudriere, and so on), it was just easier to install Raspbian, where everything works flawlessly and easily. Wireless is the exception, that's just not supported yet on FreeBSD.

For me, the driving factor towards trying FreeBSD was: I'm unfamiliar with administering Linux in the sense of modern distributions. Which files does the networking setup get saved in, how are daemons started and stopped, how is su versus sudo configured, and all that stuff. So for me using Raspbian, I had to waste time to relearn things. But then when things like 1-wire temperature sensors, GPIO, I2C required a lot of extra work on FreeBSD, I went the path of lesser resistance.
 

balanga

Daemon

Thanks: 68
Messages: 2,046

#3
I got an RPi a few years ago hoping to use it for learning something about electronics. Unfortunately nearly all the programming examples I look at for dealing with GPIO depend on the Python module RPi.GPIO which is not available on FreeBSD, and I just don't like using Linux so my electronics education is on hold at the moment...

Here's hoping someone can come up with RPi.GPIO module and include it in ports.
 

OJ

Daemon

Thanks: 253
Messages: 1,038

#4
Learning about electronics? It's a much better idea to get a digital multimeter.
 

Sensucht94

Well-Known Member

Thanks: 304
Messages: 334

#5
If on 64-bit ARM Cortex-53(Rpi3/Pine64) BSD still lags behind Linux a little bit: FreeBSD CURRENT supports arm64 quite well, but still has some minor issues compared to Linux distros that provide good arm64 ports (Rasbpian or Arch/ARM, don't even waste time trying Fedora or Ubuntu ARM64 ports). OpenBSD 6.2 introduced official arm64 support but is still largely experimental and I wouldn't recommend it.

However, in my experience, unless probably you buy an AMD Opteron ARM workstation, you're not going to see the difference between 32-bit and 64-bit on the 2Gb RAM and the limited A-53 CPU the Rpi3 come with. Personally I've made my tests, and came to the conclusion that on Rpi3, the OS choice is more inportant than a arm64 port. So, my recommendations;

- Void Linux-musl and Alpine only provide 32-bit armv7/armhf ports but eith their feather hardware requirements are the only Linux distros which is worth running as minimal desktop-workstation on rpi3

- NetBSD-CURRENT earmv6hf runs extremely well too on Rpi3, thanks to ebijun image

- Looking at Forum's threads about Rpi3, FreeBSD (either STABLE-armv7 or CURRENT-aarch64) is another good choice, and there are many here using it, though personally don't,so it wpuld be better to hear their respinse.

Finally, bear in mind that, as far as I know,the only distros fully supporting Rpi3's wireless chip are Raspbian and Arch, while Fedora added it in 27, but after having tested it, I'd say it's still to unreliable. Only sone OSs provide support for Rpi3 bluetooth (NetBSD does for example, and I think FreeBSD too). Anyway, outside the diatro I mentioned above,you'll either need a Ethernet connection or a USB dongle
 

CraigHB

Member

Thanks: 24
Messages: 90

#8
I meant learning electronics in the sense of being able to program electronic devices, sensors, switches, relays etc...
If you want learn electronics do some single purpose stuff with 8 or 16 bit micro-controllers. The programming is right down at the same level as the hardware. If done a few projects like that as a hobbyist and it's interesting. You use a proprietary IDE usually coding in C but you can do things in assembly if you want. The thing about general purpose stuff is it's more about the software since the hardware is pretty generic. You might learn some electronics in interfacing I2C or SPI stuff, but not to the extent of designing your own boards and coding the controllers like you do with single purpose devices.
 

balanga

Daemon

Thanks: 68
Messages: 2,046

#9
When I said I wanted to learn electronics, I didn't mean in any great depth just to know how to switch devices on and off or program sensors and such like. The what I'm hoping to do with the GPIO on my RPi, but using FreeBSD rather than Linux.
 

Spartrekus

Well-Known Member

Thanks: 43
Messages: 285

#11
When I said I wanted to learn electronics, I didn't mean in any great depth just to know how to switch devices on and off or program sensors and such like. The what I'm hoping to do with the GPIO on my RPi, but using FreeBSD rather than Linux.
Arduino is actually better suited for electronics. Arduino is more popular than Raspberry even, at least in France.

https://www.arduino.cc
 

CraigHB

Member

Thanks: 24
Messages: 90

#13
Yeah Arduino is the way to go if you're purely into learning electronics, less time coding more time building circuits. And it's mostly open source so it's more akin to what FreeBSD is about.
 

Phishfry

Son of Beastie

Thanks: 854
Messages: 2,612

#14

balanga

Daemon

Thanks: 68
Messages: 2,046

#18
GPIO's are interfaced in Linux as sysfs. Anything related to GPIO on Linux can be thrown out the door for FreeBSD use.

There is already a python GPIO library for FreeBSD.
https://github.com/evadot/fbsd_gpio_py
Would I be able to use this library with this code with minor name substitutions:-
Code:
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
print "LED on"
GPIO.output(18,GPIO.HIGH)
time.sleep(1)
print "LED off"
GPIO.output(18,GPIO.LOW)
 
Top