NetBSD RPi 4b Install/Boot Failure

2024-04-20 Thread Thomas D. Dean
I am using a SanDisk Extreme Pro 128GiB flash drive connected to the RPi 
4b USB-3 port.


I can use this with the RPi OS.

I tried downloading Generic 64-bit from 
http://nycdn.netbsd.org/pub/arm/, marked as for the Raspberry Pi. I 
unzipped the file to get the .img.




> ls -l NetBSD-10-aarch64--generic.img
-rw-rw-r-- 1 tomdean tomdean 1582301184 Apr 20 20:46 
NetBSD-10-aarch64--generic.img


> sudo dd if=NetBSD-10-aarch64--generic.img of=/dev/sda bs=1M conv=sync
1509+0 records in
1509+0 records out
1582301184 bytes (1.6 GB, 1.5 GiB) copied, 6.21875 s, 254 MB/s

> sudo mount /dev/sda1 /mnt
> ls /mnt
EFI   cmdline.txt  fixup.dat fixup_cd.dat  start4.elf
LICENCE.broadcom  config.txt   fixup4.datnetbsd.imgstart4cd.elf
bootcode.bin  dtb  fixup4cd.dat  start.elf start_cd.elf

> cat /mnt/cmdline.txt
root=NAME=netbsd-root console=fb

> cat /mnt/config.txt
#
upstream_kernel=1
#
arm_64bit=1
os_prefix=dtb/broadcom/
cmdline=../../cmdline.txt
kernel=/netbsd.img
kernel_address=0x20
enable_uart=1
force_turbo=0

I connected a HDMI display and the SanDisk Extreme Pro flash drive (USB 
3) to the RPi 4b and applied power.


The led on the flash drive blinked for 3~4 seconds and stopped. The 
screen flashed and went blank. Nothing afterwards...


I booted the RPi 4b from a SD card, NetBSD 10 and connected the flash 
drive to a USB-3 port.


fsck says the drive is OK.

I mounted /dev/dk2 on /mnt There are some missing files on dk2 as 
compared to /boot.


pi-4b-1# ls -l /mnt
total 23142
drwxr-xr-x  1 root  wheel  1024 Mar 28 16:53 EFI
-rwxr-xr-x  1 root  wheel  1594 Mar 28 16:53 LICENCE.broadcom
-rwxr-xr-x  1 root  wheel 52476 Mar 28 16:53 bootcode.bin
-rwxr-xr-x  1 root  wheel33 Mar 28 16:53 cmdline.txt
-rwxr-xr-x  1 root  wheel   155 Mar 28 16:53 config.txt
drwxr-xr-x  1 root  wheel  1024 Mar 28 16:53 dtb
-rwxr-xr-x  1 root  wheel  7269 Mar 28 16:53 fixup.dat
-rwxr-xr-x  1 root  wheel  5412 Mar 28 16:53 fixup4.dat
-rwxr-xr-x  1 root  wheel  3180 Mar 28 16:53 fixup4cd.dat
-rwxr-xr-x  1 root  wheel  3180 Mar 28 16:53 fixup_cd.dat
-rwxr-xr-x  1 root  wheel  16761568 Mar 28 16:53 netbsd.img
-rwxr-xr-x  1 root  wheel   2979264 Mar 28 16:53 start.elf
-rwxr-xr-x  1 root  wheel   2254944 Mar 28 16:53 start4.elf
-rwxr-xr-x  1 root  wheel808060 Mar 28 16:53 start4cd.elf
-rwxr-xr-x  1 root  wheel808060 Mar 28 16:53 start_cd.elf
rpi-4b-1# ls -l /boot
total 25293
drwxr-xr-x  1 root  wheel  1024 Apr  1 22:28 EFI
-rwxr-xr-x  1 root  wheel  1594 Apr  1 22:28 LICENCE.broadcom
-rwxr-xr-x  1 root  wheel   2031616 Jun  5  2023 RPI_EFI.fd
-rwxr-xr-x  1 root  wheel  5051 Jun  5  2023 Readme.md
-rwxr-xr-x  1 root  wheel 54388 Jun  5  2023 bcm2711-rpi-4-b.dtb
-rwxr-xr-x  1 root  wheel 54477 Jun  5  2023 bcm2711-rpi-400.dtb
-rwxr-xr-x  1 root  wheel 54997 Jun  5  2023 bcm2711-rpi-cm4.dtb
-rwxr-xr-x  1 root  wheel 52476 Apr  1 22:28 bootcode.bin
-rwxr-xr-x  1 root  wheel33 Apr  1 22:28 cmdline.txt
-rwxr-xr-x  1 root  wheel   243 Jun  5  2023 config.txt
drwxr-xr-x  1 root  wheel  1024 Apr  1 22:28 dtb
drwxr-xr-x  1 root  wheel  1024 Apr 19 04:13 firmware
-rwxr-xr-x  1 root  wheel  7269 Apr  1 22:28 fixup.dat
-rwxr-xr-x  1 root  wheel  5397 Jun  5  2023 fixup4.dat
-rwxr-xr-x  1 root  wheel  3180 Apr  1 22:28 fixup4cd.dat
-rwxr-xr-x  1 root  wheel  3180 Apr  1 22:28 fixup_cd.dat
-rwxr-xr-x  1 root  wheel  16761568 Apr  1 22:28 netbsd.img
drwxr-xr-x  1 root  wheel  1024 Apr 19 04:13 overlays
-rwxr-xr-x  1 root  wheel   2979264 Apr  1 22:28 start.elf
-rwxr-xr-x  1 root  wheel   2253088 Jun  5  2023 start4.elf
-rwxr-xr-x  1 root  wheel808060 Apr  1 22:28 start4cd.elf
-rwxr-xr-x  1 root  wheel808060 Apr  1 22:28 start_cd.elf

Any ideas?

Tom Dean


Re: need your advice before new Raspberry Pi purchase

2024-04-20 Thread Thomas D. Dean

On 4/20/24 17:24, Michael wrote:

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.


What is the UEFI setup menu? How do I get in to it?

I used dd to write arm64.img to the USB 3 flash drive.

Is the NetBSD installer available in the arm64.img? Is it possible to 
use the installer on the RPi 4b (booted from the SD card) to install 
NetBSD 10 on the USB 3 flash drive?


Tom Dean


Re: NetBSD 10 headless boot

2024-04-20 Thread John D. Baker
I see you've now experienced the following PR:

  kern/49398: i386-current GENERIC (i915drmkms) boot hangs if monitor powered 
off

So, it's not only a monitor not connected, but also a monitor connected
but powered off (depending on connection method).  This is slightly
annoying to me as I would like to have the option to use the console on
the machine when needed, but not have to keep the monitor on all the
time or reboot it to get more than the plain VGA console.


-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: need your advice before new Raspberry Pi purchase

2024-04-20 Thread Michael
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


Re: RPi 4b Wifi Device

2024-04-20 Thread Thomas D. Dean

On 4/20/24 15:29, Michael Cheponis wrote:
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.


I use SanDisk Extreme Pro 128GiB flash drives in the RPi 4b USB 3 port, 
sometimes with a 6" USB 3 cable.


I can always boot RPi OS on these drives. I have never been able to boot 
NetBSD 10.


I downloaded the arm64.img, and RPi4_UEFI_Firmware_v1.35.zip. On a Linux 
desktop:

  dd if=arm64.img of=/dev/sda bs=1M
and, then I replace the corresponding files from 
RPi4_UEFI_Firmware_v1.35.zip.

  mount /de3v/sda1 /mnt
  cd /mnt
  unzip ~/NetBSD/RPi4_UEFI_Firmware_v1.35.zip

When I attempt to boot, I see the color flash, then a cursor at the top 
left of the screen, then the screen goes blank.


The flash drive shows lots of accesses during this process and then 
shows access flashes in groups of 3 or 4. I think this indicates an 
unreadable file, I think.


When I do the the same actions with an SD card, NetBSD boots.

What do you do?

Tom Dean


Re: NetBSD 10 headless boot

2024-04-20 Thread joelp
>
> What has changed with GENERIC NetBSD 10 that I now need a monitor
> connected?
>
> [ 3.409208] i915drmkms0: interrupting at msi6 vec 0 (i915drmkms0)
> [ 3.417023] [drm] Initialized i915 1.6.0 20200114 for i915drmkms0 on
> minor 0
> [ 3.447019] intelfb0 at i915drmkms0
> [ 3.447019] [drm] DRM_I915_DEBUG enabled
> [ 3.447019] [drm] DRM_I915_DEBUG_GEM enabled
> [ 3.447019] intelfb0: framebuffer at 0xe0009000, size 1920x1080, depth
> 32, stride 7680
> [ 4.097019] wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100
> emulation), using wskbd0

I solved this thanks to NetBSD's excellent documentation. I happened to
notice an example in man 5 boot.cfg:
   # Disable Direct Rendering Manager (DRM) drivers
   userconf=disable i915drmkms*

Sure enough, adding that userconf to my boot.cfg solves being able to boot
NetBSD 10 without VGA connected, like it behaved in 9.3.

I'm certain I did not add that to my 9.3 boot.cfg for this machine, so
there is still the question of what could have changed from 9.3 to 10.0.

Thanks - Joel



Re: RPi 4b Wifi Device

2024-04-20 Thread Thomas D. Dean

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: RPi 4b Wifi Device

2024-04-20 Thread Michael van Elst
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.



NetBSD 10 headless boot

2024-04-20 Thread joelp
Hello -- I have a NetBSD 10 GENERIC RELEASE AMD64 installed on a Lenovo
i7-4770 desktop that I use for a build machine. I just did a fresh install
after having run 9.3 and everything was great with 10 until I tried to
boot without a monitor.

In my case, I used the VGA port (no keyboard) after noticing it didn't
boot, and sure enough it worked.

I was able to boot (in fact, just a couple hours ago) NetBSD 9.3 without a
monitor just fine.

What has changed with GENERIC NetBSD 10 that I now need a monitor connected?

The machine is located away from my monitors, etc, so I need a headless boot.

Thanks - Joel



dmesg
[ 1.00] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.00] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
2013,
[ 1.00] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022,
2023,
[ 1.00] 2024
[ 1.00] The NetBSD Foundation, Inc.  All rights reserved.
[ 1.00] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.00] The Regents of the University of California.  All
rights reserved.

[ 1.00] NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024
[ 1.00]
mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
[ 1.00] total memory = 16296 MB
[ 1.00] avail memory = 15742 MB
[ 1.00] timecounter: Timecounters tick every 10.000 msec
[ 1.00] Kernelized RAIDframe activated
[ 1.00] timecounter: Timecounter "i8254" frequency 1193182 Hz
quality 100
[ 1.04] mainbus0 (root)
[ 1.04] ACPI: RSDP 0x000F0490 24 (v02 LENOVO)
[ 1.04] ACPI: XSDT 0xDAE3F088 8C (v01 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: FACP 0xDAE4C098 00010C (v05 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: DSDT 0xDAE3F1A0 00CEF7 (v02 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: FACS 0xDB887080 40
[ 1.04] ACPI: APIC 0xDAE4C1A8 92 (v03 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: FPDT 0xDAE4C240 44 (v01 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: LPIT 0xDAE4C288 5C (v01 LENOVO TC-03   
1170 AMI. 0005)
[ 1.04] ACPI: MSDM 0xDAE4C2E8 55 (v03 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: SSDT 0xDAE4C340 000539 (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: SSDT 0xDAE4C880 000AD8 (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: MCFG 0xDAE4D358 3C (v01 LENOVO TC-03   
1170 MSFT 0097)
[ 1.04] ACPI: HPET 0xDAE4D398 38 (v01 LENOVO TC-03   
1170 AMI. 0005)
[ 1.04] ACPI: SSDT 0xDAE4D3D0 00036D (v01 LENOVO TC-03   
1170 INTL 20120711)
[ 1.04] ACPI: SSDT 0xDAE4D740 0032F3 (v01 LENOVO TC-03   
1170 INTL 20091112)
[ 1.04] ACPI: BGRT 0xDAE50A38 38 (v00 LENOVO TC-03   
1170 AMI  00010013)
[ 1.04] ACPI: DMAR 0xDAE50A70 B8 (v01 LENOVO TC-03   
1170 INTL 0001)
[ 1.04] ACPI: 5 ACPI AML tables successfully acquired and loaded
[ 1.04] ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20,
24 pins
[ 1.04] cpu0 at mainbus0 apid 0
[ 1.04] cpu0: Use lfence to serialize rdtsc
[ 1.04] cpu0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu0: node 0, package 0, core 0, smt 0
[ 1.04] cpu1 at mainbus0 apid 2
[ 1.04] cpu1: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu1: node 0, package 0, core 1, smt 0
[ 1.04] cpu2 at mainbus0 apid 4
[ 1.04] cpu2: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu2: node 0, package 0, core 2, smt 0
[ 1.04] cpu3 at mainbus0 apid 6
[ 1.04] cpu3: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu3: node 0, package 0, core 3, smt 0
[ 1.04] cpu4 at mainbus0 apid 1
[ 1.04] cpu4: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu4: node 0, package 0, core 0, smt 1
[ 1.04] cpu5 at mainbus0 apid 3
[ 1.04] cpu5: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu5: node 0, package 0, core 1, smt 1
[ 1.04] cpu6 at mainbus0 apid 5
[ 1.04] cpu6: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu6: node 0, package 0, core 2, smt 1
[ 1.04] cpu7 at mainbus0 apid 7
[ 1.04] cpu7: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, id 0x306c3
[ 1.04] cpu7: node 0, package 0, core 3, smt 1
[ 1.04] acpi0 at mainbus0: Intel ACPICA 20221020
[ 1.04] acpi0: X/RSDT: OemId , AslId

[ 1.04] acpi0: MCFG: segment 0, bus 0-63, address 0xf800
[ 1.04] ACPI: Dynamic OEM Table Load:
[ 1.04] ACPI: SSDT 0xABAD69144C08 0003D3 

Re: RPi 4b Wifi Device

2024-04-20 Thread Rob Whitlock


> On Apr 20, 2024, at 1:01 AM, Thomas D. Dean  wrote:
> 
> On 4/19/24 18:35, Michael van Elst wrote:
>> tomd...@wavecable.com ("Thomas D. Dean") writes:
>>> How do I setup wpa_supplicant?
>> That depends on what you want to do.
>> Here are some examples:
>> https://wiki.netbsd.org/tutorials/how_to_use_wpa_supplicant/
> 
> I saw that.
> dhcp is working over the wired connection.
> 
> I thought I had everything configured for wifi. It just does not work.
> 
> I have a cable modem <-> wifi/wired router. I have several machines 
> connected. Linux and windoze, now. One RPi with NetBSD 10. Used to have some 
> FreeBSD machines, but, they have been replaced.
> 
> # etc/rc.d/wpa_supplicant reload
> Selected interface 'bwfm0'
> 21:58:35.931: OK
> 
> # 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
> 
> # ifconfig bwfm0
> bwfm0: flags=0x8843 mtu 1500
>   ssid "" nwkey 65536:"","","",""
>   powersave off
>   address: e4:5f:01:da:eb:46
>   media: IEEE802.11 autoselect (DS1 mode 11g)
>   status: no network
>   inet6 fe80::d7c0:41b9:46a5:a5ff%bwfm0/64 flags 0x8 scopeid 0x3
>   inet 169.254.135.120/16 broadcast 169.254.255.255 flags 0x4
> 
> 
> 
> I don't understand where the inet 169.254.135.120 comes from. The router pool 
> is 192.168.1.xxx.

That's an APIPA address from block 169.254.0.0/16. dhcpcd gives the interface 
an address from that block when it can't properly obtain one via DHCP, unless 
instructed not to.

> 
> Tom Dean



need your advice before new Raspberry Pi purchase

2024-04-20 Thread Ramiro Aceves

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.


Thanks in advance.


Ramiro.


Re: RPi 4b Wifi Device

2024-04-20 Thread Thomas D. Dean

I have Authentication timeout.

# wpa_cli
> scan_results
23:27:43.451: bssid / frequency / signal level / flags / 
ssid60:38:e0:db:a9:7a	2462	227	[WPA-PSK-TKIP][ESS]	tddhome

...
 23:27:47.736: CTRL-EVENT-SCAN-RESULTS
  23:27:47.736: Trying to associate with 60:38:e0:db:a9:7a 
(SSID='tddhome' freq=2462 MHz)

  23:27:52.874: Associated with 60:38:e0:db:a9:7a
  23:28:02.888: Authentication with 60:38:e0:db:a9:7a timed out.
  23:28:02.889: CTRL-EVENT-DISCONNECTED bssid=60:38:e0:db:a9:7a 
reason=3 locally_generated=1
  23:28:02.889: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="tddhome" 
auth_failures=1 duration=10 reason=CONN_FAILED


The linksys router uses WPA2/WPA mixed Personal. PSK is correct in 
etc/wpa_supplicant.conf:


# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="tddhome"
key_mgmt=WPA-PSK
psk="..."
}

Tom Dean


Re: need your advice before new Raspberry Pi purchase

2024-04-20 Thread adr

On Sat, 20 Apr 2024, Ramiro Aceves wrote:


 Date: Sat, 20 Apr 2024 11:46:51 +0200
 From: Ramiro Aceves 
 To: netbsd-users@netbsd.org, port-...@netbsd.org
 Subject: need your advice before new Raspberry Pi purchase

 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.

 Thanks in advance.


 Ramiro.


Thas what happens when you have an official wiki, people write
wrong information even after been told that that information is
not correct and doing an effort to explain in detail, after people
pointing to that errors are ignored, after people asking to at least
been able to comment to the wiki are ignored.

Now you have a 

Re: RPi 4b Wifi Device

2024-04-20 Thread Thomas D. Dean

On 4/19/24 18:35, Michael van Elst wrote:

tomd...@wavecable.com ("Thomas D. Dean") writes:


How do I setup wpa_supplicant?


That depends on what you want to do.

Here are some examples:
https://wiki.netbsd.org/tutorials/how_to_use_wpa_supplicant/


I saw that.
dhcp is working over the wired connection.

I thought I had everything configured for wifi. It just does not work.

I have a cable modem <-> wifi/wired router. I have several machines 
connected. Linux and windoze, now. One RPi with NetBSD 10. Used to have 
some FreeBSD machines, but, they have been replaced.


# etc/rc.d/wpa_supplicant reload
Selected interface 'bwfm0'
21:58:35.931: OK

# 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

# ifconfig bwfm0
bwfm0: flags=0x8843 mtu 1500
ssid "" nwkey 65536:"","","",""
powersave off
address: e4:5f:01:da:eb:46
media: IEEE802.11 autoselect (DS1 mode 11g)
status: no network
inet6 fe80::d7c0:41b9:46a5:a5ff%bwfm0/64 flags 0x8 scopeid 0x3
inet 169.254.135.120/16 broadcast 169.254.255.255 flags 0x4



I don't understand where the inet 169.254.135.120 comes from. The router 
pool is 192.168.1.xxx.


Tom Dean