Banana Pi R2

2020-05-19 Thread Per Gunnarsson
Hello!

I saw the section "PF - Building a router" on your web page and thought
that would be an interesting hobby project. Now I wonder if it's
possible to install OpenBSD on a Banana Pi R2. In case it's not possible
(or simply too advanced for me) I would appreciate alternative hardware
suggestions.

Regards,

Per Gunnarsson





Re: Banana Pi R2

2020-05-19 Thread Mark Kettenis
That hardware is not supported by OpenBSD.



Re: Kernel hangs with hw.perfpolicy set as auto on NanoPi R2S

2020-05-19 Thread Mark Kettenis
> From: Lear Zhou 
> Date: Sat, 16 May 2020 19:41:29 -0700
> 
> Hi,
> 
> This issue is still there with recent snapshot build, although it's getting
> better with May 13rd build.
> 
> Dig a little bit more with this, and found that the easiest way to trigger
> the issue for my network setup
> is just a long enough FaceTime audio call.
> 
> I also observed that when the router hang, it's actually the ure0 interface
> went out. The connected
> serial showed that the kernel was actually running well, just the specific
> network interface down.
> 
> The ure0 is the usb 3.0 to ethernet that r2s adopted. When it hangs, the
> serial showed as follow:
> usbd_start_next: error=5
> ure0: watchdog timeout
> and use ifconfig to shutdown and bring up the ure0 interface won't work:
> r2s$ doas ifconfig ure0 up
> ure0: usb error on tx: IOERROR
> ure0: watchdog timeout
> ure0: usb error on tx: TIMEOUT
> ure0: usb error on tx: TIMEOUT
> ure0: watchdog timeout
> 
> While the overheat has been ruled out by applying a passive aluminum case
> to it, is it possible
> that it could be a usb issue or a driver issue for ure0: RTL8153B (0x6010).
> 
> I will be looking forward to any improvement that could fix this issue.

Hi,

Can you still log into the system on the serial console or on the
dwge0 network interface when that happens?

In any case, I have seen issues like this when using an inadequate
power supply or if the hardware got too hot.

You might want to expirement with hw.perfpolicy=manual and setting
hw.setperf to various level to investigate whether it runs stable in
that configuration.

How hot does the chip get?  hw.sensors should give an indication.

> On Sun, May 3, 2020 at 1:23 PM Lear Zhou  wrote:
> 
> > Hi guys,
> >
> > With the kind help from Patrick Wildt, I am be able to run OpenBSD 6.7
> > beta on a NanoPi R2S. However, it hangs sometimes.
> >
> > Later after some more digging I finally found it hangs only when
> > hw.perfpolicy set as 'auto'.
> >
> > The 'apm' output as followed:
> >   r2s$ apm
> >   Battery state: unknown, 0% remaining, unknown life estimate
> >   A/C adapter state: not known
> >   Performance adjustment mode: manual (600 MHz)
> > which let me think if it's the 'unknown' state of both battery and A/C
> > adapter has something to do with the issue.
> >
> > I am not familiar with the kernel stuff, and hope someone on this platform
> > can find a solution for more reasonable behavior on this circumstance.
> >
> > The dmesg as follow:
> > OpenBSD 6.7-beta (GENERIC.MP) #587: Wed Apr 29 13:04:54 MDT 2020
> > dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
> > real mem  = 1006903296 (960MB)
> > avail mem = 945860608 (902MB)
> > mainbus0 at root: FriendlyElec NanoPi R2S
> > cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
> > cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> > cpu0: 256KB 64b/line 16-way L2 cache
> > efi0 at mainbus0: UEFI 2.8
> > efi0: Das U-Boot rev 0x20200100
> > apm0 at mainbus0
> > psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
> > syscon0 at mainbus0: "syscon"
> > "io-domains" at syscon0 not configured
> > "grf-gpio" at syscon0 not configured
> > "power-controller" at syscon0 not configured
> > "reboot-mode" at syscon0 not configured
> > rkclock0 at mainbus0
> > rkclock_set_frequency: 0x0061
> > syscon1 at mainbus0: "syscon"
> > "usb2-phy" at syscon1 not configured
> > syscon2 at mainbus0: "syscon"
> > ampintc0 at mainbus0 nirq 160, ncpu 4 ipi: 0, 1: "interrupt-controller"
> > rkpinctrl0 at mainbus0: "pinctrl"
> > rkgpio0 at rkpinctrl0
> > rkgpio1 at rkpinctrl0
> > rkgpio2 at rkpinctrl0
> > rkgpio3 at rkpinctrl0
> > "opp_table0" at mainbus0 not configured
> > simplebus0 at mainbus0: "amba"
> > "dmac" at simplebus0 not configured
> > "arm-pmu" at mainbus0 not configured
> > rkdrm0 at mainbus0
> > drm0 at rkdrm0
> > agtimer0 at mainbus0: tick rate 24000 KHz
> > "xin24m" at mainbus0 not configured
> > com0 at mainbus0: ns16550, no working fifo
> > com0: console
> > rkiic0 at mainbus0
> > iic0 at rkiic0
> > rkiic1 at mainbus0
> > iic1 at rkiic1
> > rkpmic0 at iic1 addr 0x18: RK805
> > "watchdog" at mainbus0 not configured
> > "pwm" at mainbus0 not configured
> > rktemp0 at mainbus0
> > "efuse" at mainbus0 not configured
> > "gpu" at mainbus0 not configured
> > "video-codec" at mainbus0 not configured
> > "iommu" at mainbus0 not configured
> > "usb3-phy" at mainbus0 not configured
> > dwmmc0 at mainbus0: 50 MHz base clock
> > sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
> > dwge0 at mainbus0: address d2:10:3b:89:f0:c2
> > rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 5
> > "usb" at mainbus0 not configured
> > ehci0 at mainbus0
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev
> > 2.00/1.00 addr 1
> > ohci0 at mainbus0: version 1.0
> > rkdwusb0 at mainbus0: "usb"
> > xhci0 at rkdwusb0, xHCI 1.10
> > usb1 at xhci0: USB revisio

Re: Banana Pi R2

2020-05-19 Thread Stuart Henderson
On 2020/05/19 16:43, Per Gunnarsson wrote:
> Hello!
> 
> I saw the section "PF - Building a router" on your web page and thought
> that would be an interesting hobby project. Now I wonder if it's
> possible to install OpenBSD on a Banana Pi R2. In case it's not possible
> (or simply too advanced for me) I would appreciate alternative hardware
> suggestions.
> 
> Regards,
> 
> Per Gunnarsson
> 
> 
> 

OpenBSD doesn't run on any boards using that MediaTek SoC. Also there are
only really 2 NICs, the others are connected to a switch chip using vlans
to break out the ports, OpenBSD doesn't have infrastructure to control
those (let alone a driver for the specific switch chip they use).

If you are looking for small non-x86 and need a couple of NICs and want
something already working then maybe https://www.openbsd.org/octeon.html
are worth a look .. on the ARM64 side there are macchiatobin boards but
they aren't anywhere near cheap.



Re: Banana Pi R2

2020-05-19 Thread Mark Kettenis
> Date: Tue, 19 May 2020 16:36:48 +0100
> From: Stuart Henderson 
> 
> On 2020/05/19 16:43, Per Gunnarsson wrote:
> > Hello!
> > 
> > I saw the section "PF - Building a router" on your web page and thought
> > that would be an interesting hobby project. Now I wonder if it's
> > possible to install OpenBSD on a Banana Pi R2. In case it's not possible
> > (or simply too advanced for me) I would appreciate alternative hardware
> > suggestions.
> > 
> > Regards,
> > 
> > Per Gunnarsson
> > 
> > 
> > 
> 
> OpenBSD doesn't run on any boards using that MediaTek SoC. Also there are
> only really 2 NICs, the others are connected to a switch chip using vlans
> to break out the ports, OpenBSD doesn't have infrastructure to control
> those (let alone a driver for the specific switch chip they use).
> 
> If you are looking for small non-x86 and need a couple of NICs and want
> something already working then maybe https://www.openbsd.org/octeon.html
> are worth a look .. on the ARM64 side there are macchiatobin boards but
> they aren't anywhere near cheap.

And the network ports on those are unsupported.



Re: Banana Pi R2

2020-05-19 Thread Mark Kettenis
> Date: Tue, 19 May 2020 17:46:23 +0200 (CEST)
> From: Mark Kettenis 
> 
> > Date: Tue, 19 May 2020 16:36:48 +0100
> > From: Stuart Henderson 
> > 
> > On 2020/05/19 16:43, Per Gunnarsson wrote:
> > > Hello!
> > > 
> > > I saw the section "PF - Building a router" on your web page and thought
> > > that would be an interesting hobby project. Now I wonder if it's
> > > possible to install OpenBSD on a Banana Pi R2. In case it's not possible
> > > (or simply too advanced for me) I would appreciate alternative hardware
> > > suggestions.
> > > 
> > > Regards,
> > > 
> > > Per Gunnarsson
> > > 
> > > 
> > > 
> > 
> > OpenBSD doesn't run on any boards using that MediaTek SoC. Also there are
> > only really 2 NICs, the others are connected to a switch chip using vlans
> > to break out the ports, OpenBSD doesn't have infrastructure to control
> > those (let alone a driver for the specific switch chip they use).
> > 
> > If you are looking for small non-x86 and need a couple of NICs and want
> > something already working then maybe https://www.openbsd.org/octeon.html
> > are worth a look .. on the ARM64 side there are macchiatobin boards but
> > they aren't anywhere near cheap.
> 
> And the network ports on those are unsupported.

On the macchiatobin I mean



Banana Pi? I have an RPi4 on OpenBSD 6.7

2020-05-19 Thread Oliver Seidel

Dear all,

I have been using a beagle bone black as my firewall for years.  It 
works splendid.  I run a dozen VLANS into the 100mbit Ethernet port and 
have the managed switch fan them out to rooms.


This means internet needs to go into this thing and out again.  At 
100mbit, you get 50mbit peak (minus overheads).


so I thought I am throwing away some bandwidth, I can do better and got 
myself an RPi4.


Over the weekend I installed the OpenBSD snapshot on it.  It works, but 
I have a problem with the Ethernet.  Ping is a factor 10 000 slower than 
on the Beagle Bone Black.  The Ethernet interface on BBB is cpsw0, on 
RPi4 it is bse0.


I know 6.7 is only released today, so I will re-install the official 
release, but I doubt that much would have changed in 3 days.


Does anyone have a suggestion what I should try?

Thanks!

Oliver



Re: Banana Pi? I have an RPi4 on OpenBSD 6.7

2020-05-19 Thread Stuart Henderson
On 2020/05/19 19:38, Oliver Seidel wrote:
> Dear all,
> 
> I have been using a beagle bone black as my firewall for years.  It works
> splendid.  I run a dozen VLANS into the 100mbit Ethernet port and have the
> managed switch fan them out to rooms.
> 
> This means internet needs to go into this thing and out again.  At 100mbit,
> you get 50mbit peak (minus overheads).
> 
> so I thought I am throwing away some bandwidth, I can do better and got
> myself an RPi4.
> 
> Over the weekend I installed the OpenBSD snapshot on it.  It works, but I
> have a problem with the Ethernet.  Ping is a factor 10 000 slower than on
> the Beagle Bone Black.  The Ethernet interface on BBB is cpsw0, on RPi4 it
> is bse0.

1, really?  Can you show the actual figures in milliseconds?

> I know 6.7 is only released today, so I will re-install the official
> release, but I doubt that much would have changed in 3 days.
> 
> Does anyone have a suggestion what I should try?
> 
> Thanks!
> 
> Oliver
> 

FWIW pinging the wired interface on my rpi4 running OpenBSD, I get a
response back in around 0.5ms, which is comparable with all other devices
on my lan.



Re: Banana Pi? I have an RPi4 on OpenBSD 6.7

2020-05-19 Thread Stuart Henderson
Oh, did you leave it in acpi mode or switch to device tree?  You'll need
some files from https://github.com/raspberrypi/firmware/tree/next/boot
if it's in device tree mode.

>From kettenis@:

"A workaround is to take the bcm2711-rpi-4-b.dtb, fixup4.dat and
start4.elf files from

  https://github.com/raspberrypi/firmware/tree/next/boot

and put them on the MS-DOS partition of your uSD card."




On 2020/05/19 20:46, Stuart Henderson wrote:
> On 2020/05/19 19:38, Oliver Seidel wrote:
> > Dear all,
> > 
> > I have been using a beagle bone black as my firewall for years.  It works
> > splendid.  I run a dozen VLANS into the 100mbit Ethernet port and have the
> > managed switch fan them out to rooms.
> > 
> > This means internet needs to go into this thing and out again.  At 100mbit,
> > you get 50mbit peak (minus overheads).
> > 
> > so I thought I am throwing away some bandwidth, I can do better and got
> > myself an RPi4.
> > 
> > Over the weekend I installed the OpenBSD snapshot on it.  It works, but I
> > have a problem with the Ethernet.  Ping is a factor 10 000 slower than on
> > the Beagle Bone Black.  The Ethernet interface on BBB is cpsw0, on RPi4 it
> > is bse0.
> 
> 1, really?  Can you show the actual figures in milliseconds?
> 
> > I know 6.7 is only released today, so I will re-install the official
> > release, but I doubt that much would have changed in 3 days.
> > 
> > Does anyone have a suggestion what I should try?
> > 
> > Thanks!
> > 
> > Oliver
> > 
> 
> FWIW pinging the wired interface on my rpi4 running OpenBSD, I get a
> response back in around 0.5ms, which is comparable with all other devices
> on my lan.
> 



Re: Banana Pi R2

2020-05-19 Thread Daniel Bolgheroni
On Tue, May 19, 2020 at 04:43:54PM +0200, Per Gunnarsson wrote:
> Hello!
> 
> I saw the section "PF - Building a router" on your web page and thought
> that would be an interesting hobby project. Now I wonder if it's
> possible to install OpenBSD on a Banana Pi R2. In case it's not possible
> (or simply too advanced for me) I would appreciate alternative hardware
> suggestions.

If 2 lan's are enough, OpenBSD/armv7 runs fine on the Orange Pi R1, being one
dwxe(4) and one ure(4).

-- 
db