Re: need your advice before new Raspberry Pi purchase

2024-04-21 Thread John Klos

Hi,


"As of early 2024, NetBSD does not support the Raspberry Pi 5."


I've lost interest in any new Raspberry Pi models since the 
corporatization of the Raspberry Pi Foundation. For higher performance ARM 
machines than the Raspberry Pi 4 hardware I already have, I'd go for a 
Rock Pro 5 or Orange Pi 5.


   "RPI4 ethernet (Broadcom GENETv5) (but the man page for genet(4) is 
missing)"


Can I be sure that ethernet will work fine and reliable? Network speed?


There were some issues last year with npf which I observed on one of my 
RPi 4 systems, but that's been addressed(-ish - not fixed, but mitigated).


I've been running a RPi 4 with an uptime of 225 days as an NFS server for 
a fleet of machines that're running pkgsrc bulk builds.



"Issues and Workarounds"
"RPI4 xhci"


I've never run any RPi 4 hardware without UEFI, although I tried a few 
times and don't remember any successes.


One of the things that UEFI does provide is that it makes having a serial 
console very easy. My colocated RPi 4 was connected to an RPi 3 so that I 
could boot the 4 with a serial console, get access to UEFI menus, boot 
single user, et cetera. This, together with a GPIO on the RPi3 wired to be 
able to reset the RPi 4, makes the RPi very useful as a remote server.


What is your final opinion about NetBSD in that board? Are there better 
supported boards perhaps?


I think different hardware has different uses. For almost instant booting, 
low power and small size, I use NanoPi Neo. For hardware-based VPN, 
for NAT / IPv6 / DNS / DHCP, et cetera, I use NanoPi R2S. For systems that 
need PCIe, I use RockPro64.


I picked the Raspberry Pi 4 with a Flirc case for my 1U server because at 
the time it was not easy to find boards with 8 gigs of memory and with two 
USB 3 ports. I'm using the USB 3 ports to connect two large (8 TB) 
spinning rust disks in a raidframe mirror. For this configuration, it was 
ideal.


What do you plan to use your Pi for?

Many thanks and sorry for so many questions, just I want to be sure that I am 
going to make a good and useful purchase. If I purchase a Rpi 4 instead of 
Rpi 5 to have NetBSD support and It does not work ok, it will be a absolute 
nonsense.


Indeed. It's no fun to get something we can't use. The RPi 4 is very 
usable with NetBSD, although all of my experiences with things working 
very well is based on using UEFI.


I appreciate your work very much and your comments and advice will be welcome 
and very valuable for me.


:)

John Klos


Re: need your advice before new Raspberry Pi purchase

2024-04-21 Thread Ramiro Aceves




El 21/4/24 a las 20:33, Justin Parrott escribió:

what do you use it for?


Lighttpd Web server, home minidlna film server.



On Sat, Apr 20, 2024 at 2:24 PM Ramiro Aceves > wrote:


Hello,

I am thinking about buying a more powerful Raspberry Pi than my actual
Raspberry Pi ZeroW. I like very much how NetBSD operating system is
working although I was a bit dissapointed with WIFI driver for the
builtin WIFI device, I feel that I can control the OS and it is the
OS I
was looking for, simple and straightforward without bells and whistles.

In general NetBSD works fine in the Pi once you get used to it,
everything makes sense soon, you fell confortable and why not to say, I
am in a new world after many years using Linux and needed new
sensations. On the Zero W WIFI bwfm driver did not work well and
overcome that buying a USB WIFI dongle with RTL 8188EU chip that works
almost ok (with no channel switching  in the router). Now I am going to
use only ethernet network connection so WIFI will not be a problem.


I have been reading
https://wiki.netbsd.org/ports/evbarm/raspberry_pi/

but information is a bit confusing.

"As of early 2024, NetBSD does not support the Raspberry Pi 5."

Reading that I inmediatly discarded the Raspberry Pi 5 choice. Being
realistic I think It does not work in NetBSD 10 now and I estimate it
will not work well for perhaps some years. Life is short, I cannot wait
and so I think RaspberryPi 4 should be my buying target.


"NetBSD 10"

      "RPI4 general support (but there are issues)"

Seems explained below.


      "RPI4 ethernet (Broadcom GENETv5) (but the man page for
genet(4) is
missing)"

Can I be sure that ethernet will work fine and reliable? Network speed?


      "builtin bluetooth on RPI3 (RPI0W? RPI4?)"

Does bluetooth work on the Pi4?


      "builtin WiFi on RPI0W, RPI3 and RPI4 - bwfm(4)"

Does WIFI bwfm  driver work as badly as in the ZeroW? Not relevant for
my future use of the Pi 4 cause I will use it through ethernet but that
will be a bonus, just curious.


      "RPI4 xhci does not work with a straight netbsd-10 install"

I seems that below is the explanation.

      "RPI4 hardware rng does not work with a straight netbsd-10
install"

I seems that below is the explanation.


The following chapter is very confusing for me:


"Issues and Workarounds"
"RPI4 xhci"

"With the netbsd-10 arm64.img on a RPI4 (most of them), the pci driver
is missing and therefore xhci will not attach, so the USB ports will
not
work. One workaround is to switch to UEFI, but that leads to a 3GB
memory limit and needing a monitor. Another is to add kernel config.
One
can also add the hardware rng. Adding the following to GENERIC64.local
results in both working; you likely also need a dtb that includes the
RNG. \todo Explain why this isn't in GENERIC64 or link to a PR.

GENERIC64

bcm2838pcie* at fdt?                    # STB PCIe host controller
bcm2838rng* at fdt?                     # RPI4 RNG

There is some need to load firmware for the xhci driver, but apparently
that works, once the above is added"


Does it mean that using  "traditional booting" you end with non working
USB ports? Will you even end without keyboard? I mainly will use the Pi
headless via ssh but need the keyboard in the first configuring steps.

After switching to UEFI you will make USB ports work but 8 GB
RapberryPi
will be reduced to 3 GB only with no workaround? What do "needing a
monitor" mean? Why?
If the fix for USB and rng is recompiling the KERNEL, why is not
enabled
by default in the standard image?


"RPI4 UEFI 3 GB"

"To work around bugs in hardware (that may or may not be fixed in
recent
RPI4) and because not all OSes have workarounds, the UEFI firmware's
default is to limit RAM to 3GB. NetBSD 10 can be used with more, so
this
needs to be configured in UEFI."

That should be explained more in detail for newcomers.

Last questions:

Do GPIO pins work ok?

Does I2C work? That is important for me cause I plan to read some
sensors.

Does HDMI output work or should I use serial console? traditional boot
vs UEFI difference in this matter?

What is your final opinion about NetBSD in that board? Are there better
supported boards perhaps?

Many thanks and sorry for so many questions, just I want to be sure
that
I am going to make a good and useful purchase. If I purchase a Rpi 4
instead of Rpi 5 to have NetBSD support and It does not work ok, it
will
be a absolute nonsense.

I appreciate your work very much and your comments and advice will be
welcome and very valuable for me.

  

Re: RPi 4b Wifi Device

2024-04-21 Thread Michael van Elst
michael.chepo...@gmail.com (Michael Cheponis) writes:

>I use the built-in GigE adaptor on the RPi 4B, because it's convenient as I
>have wired ethernet most places.   So I can't help with WiFi.

Ethernet is also faster, even when the WiFi chip does 802.11ac.

For Wifi on a RPI4b:

With RPI-OS running iperf3 shows about 80Mbit/s.
NetBSD (-current, but -10 should be similar) gets me about 40MBit/s.

Wifi is connected to a SDHC controller, and handling I/O there generates
quite some overhead (while iperf3 is running):

  PID   LID USERNAME PRI STATE   TIME   WCPUCPU NAME  COMMAND
0   118 root 123 CPU/1   1:33 39.45% 39.45% sdmmc0[system]
 7467 12269 mlelstv   85 mutex/2 0:03  4.79%  4.79% - iperf3
0 3 root 222 IDLE/0  0:04  2.59%  2.59% softnet*0 [system]
0   101 root 222 IDLE/3  0:03  1.81%  1.81% softnet*3 [system]
030 root 222 IDLE/2  0:02  1.32%  1.32% softnet*2 [system]
024 root 222 IDLE/1  0:02  0.93%  0.93% softnet*1 [system]

That's about 80% of one core.



Re: RPi 4b Wifi Device

2024-04-21 Thread Michael Cheponis
I run an RPi 4B/8G with external USB SSD drive; I do this because my uSD
cards were getting worn out after about a year of use; I've had no such
problems with my Samsung 870 EVO nor Samsung SSD T7.

I use the built-in GigE adaptor on the RPi 4B, because it's convenient as I
have wired ethernet most places.   So I can't help with WiFi.

I have been running an RPi 3 from a Lexar 64B Thumb Drive since June 2019 -
no problem there, either.

-Mike


-Mike


On Sat, Apr 20, 2024 at 2:04 PM Thomas D. Dean 
wrote:

> On 4/20/24 13:16, Michael van Elst wrote:
> > tomd...@wavecable.com ("Thomas D. Dean") writes:
> >
> >> # wpa_cli status
> >> Selected interface 'bwfm0'
> >> 21:58:44.815: bssid=60:38:e0:db:a9:7a
> >> freq=0
> >> ssid=tddhome
> >> id=0
> >> mode=station
> >> pairwise_cipher=TKIP
> >> group_cipher=TKIP
> >> key_mgmt=WPA-PSK
> >> wpa_state=GROUP_HANDSHAKE
> >> ip_address=169.254.135.120
> >> address=e4:5f:01:da:eb:46
> >
> >> I don't understand where the inet 169.254.135.120 comes from. The router
> >> pool is 192.168.1.xxx.
> >
> > 169.254.x.x is a "link local" address. dhcpcd falls back to such an
> > address, if it doesn't get an answer from a dhcp server. Apparently
> > wpa_supplicant cannot connect to the network.
> >
> >> wpa_state=GROUP_HANDSHAKE
> >
> > says that it still tries to associate. When it's done this would
> > change to COMPLETED.
> >
>
> I have two RPi 4b's. One with NetBSD 10 on an SD card and the other with
> RPi OS on a USB flash drive. (I can not get NetBSD to boot from a flash
> drive)
>
> As far as I can tell the network configurations are the same for WIFI on
> both. I see comments on the web about NetBSD 10 problems with the bwfm
> device.
>
> I need WIFI. So, I go back to RPi OS.
>
> Thanks for all the replies.
>
> Tom Dean
>


Re: need your advice before new Raspberry Pi purchase

2024-04-21 Thread Ramiro Aceves




El 21/4/24 a las 2:24, Michael escribió:

Hello,

On Sat, 20 Apr 2024 11:46:51 +0200
Ramiro Aceves  wrote:


"As of early 2024, NetBSD does not support the Raspberry Pi 5."

Reading that I inmediatly discarded the Raspberry Pi 5 choice. Being
realistic I think It does not work in NetBSD 10 now and I estimate it
will not work well for perhaps some years. Life is short, I cannot wait
and so I think RaspberryPi 4 should be my buying target.


Not sure what's missing - there is now at least beta UEFI firmware for the Pi5.


"NetBSD 10"

  "RPI4 general support (but there are issues)"


I've been using an 8GB Pi4 and a Pi400 with UEFI for a while now.


  "RPI4 ethernet (Broadcom GENETv5) (but the man page for genet(4) is
missing)"

Can I be sure that ethernet will work fine and reliable? Network speed?


Works fine on mine, good enough for NetBSD and pkgsrc builds with
sources over NFS.


  "builtin bluetooth on RPI3 (RPI0W? RPI4?)"

Does bluetooth work on the Pi4?


Never tried.


  "builtin WiFi on RPI0W, RPI3 and RPI4 - bwfm(4)"

Does WIFI bwfm  driver work as badly as in the ZeroW? Not relevant for
my future use of the Pi 4 cause I will use it through ethernet but that
will be a bonus, just curious.


IIRC I got it to connect to my router but never really stress tested
it. I prefer wired ethernet wherever practical.


  "RPI4 xhci does not work with a straight netbsd-10 install"

I seems that below is the explanation.


Both my Pi4* boot from USB3 disks connected to USB3 ports.


After switching to UEFI you will make USB ports work but 8 GB RapberryPi
will be reduced to 3 GB only with no workaround? What do "needing a
monitor" mean? Why?


The 3GB limit is on by default for some old linux kernels that don't
have the DMA workaround. It takes about 10 seconds to get into the UEFI
setup menu and turn it off.

[ 1.00] NetBSD 10.99.7 (GENERIC64) #0: Thu Aug 24 06:18:05 EDT 2023
[ 1.00] 
ml@paddy:/disk/build/obj_earm64/sys/arch/evbarm/compile/GENERIC64
[ 1.00] total memory = 8029 MB
[ 1.00] avail memory = 7740 MB
[ 1.00] entropy: ready
[ 1.00] ptyfs_hashinit: 0001feef5b00
[ 1.00] timecounter: Timecounters tick every 10.000 msec
[ 1.00] armfdt0 (root)
[ 1.00] armfdt0: using EFI runtime services for RTC
[ 1.00] simplebus0 at armfdt0: Raspberry Pi Foundation Raspberry Pi 4 
Model B
[ 1.00] simplebus1 at simplebus0
[ 1.00] acpifdt0 at simplebus0
[ 1.00] acpifdt0: SMBIOS rev. 3.3.0 @ 0x371d
...


Does HDMI output work or should I use serial console? traditional boot
vs UEFI difference in this matter?


I'm typing this on a Pi400 with a monitor hooked to it. My Pi400 even
came with a micro-HDMI to regular HDMI cable.

have fun
Michael


Thanks so much Michael for the details about de RPi4 working in NetBSD. 
Nice to see that UEFI is the way to go. Nice also to see that 3 GB limit 
can be eliminated.


I have also received other people direct positive feedback. Chances to 
buy it are increasing.


Thanks.
Ramiro.