network issues with Cubieboard and OpenBSD6.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
jdd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

network issues with Cubieboard and OpenBSD6.0

jdd
I've successfully installed OpenBSD 6.0 on an (original) cubieboard.

Because mmc/sd on sunxi doesn't have a driver yet, I'm booting off uSD but root
is on USB key.

It seems to work for the most part (dhclient doesn't seem to see
gateway or dns servers in the response, but that's easily worked around).

But there seems to be one quite serious bug: I can't seem to transfer anything
substantial out of the box.  

An scp even of a small file (90k -- I tried /sbin/nologin) from the machine
hangs/stalls, causing all networking to stop and resulting in the following
message, repeated every few seconds, on the console:

        sxie0: watchdog tx timeout

A reboot appears to be necessary to return things to normal.

Tried ssh machine 'cat /sbin/nologin' >myfile and that behaves in the same way.

I'm assuming from this there's an issue with the sxie driver, and any more
than minimal transfers out of the machine would cause a similar problem.

Any suggestions?

Regards,

John
--
John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
IT Director, Department of Computer Science, University of Toronto  
Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

Jonathan Gray-11
On Thu, Sep 08, 2016 at 05:21:27PM -0400, John DiMarco wrote:

> I've successfully installed OpenBSD 6.0 on an (original) cubieboard.
>
> Because mmc/sd on sunxi doesn't have a driver yet, I'm booting off uSD but root
> is on USB key.
>
> It seems to work for the most part (dhclient doesn't seem to see
> gateway or dns servers in the response, but that's easily worked around).
>
> But there seems to be one quite serious bug: I can't seem to transfer anything
> substantial out of the box.  
>
> An scp even of a small file (90k -- I tried /sbin/nologin) from the machine
> hangs/stalls, causing all networking to stop and resulting in the following
> message, repeated every few seconds, on the console:
>
> sxie0: watchdog tx timeout
>
> A reboot appears to be necessary to return things to normal.
>
> Tried ssh machine 'cat /sbin/nologin' >myfile and that behaves in the same way.
>
> I'm assuming from this there's an issue with the sxie driver, and any more
> than minimal transfers out of the machine would cause a similar problem.
>
> Any suggestions?

There have been a large amount of changes since 6.0, try a -current snapshot.
There is a sunxi sd/mmc driver now for instance.

The cubie miniroot now targets cubieboard2 however.

jdd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

jdd
In message <[hidden email]> Jonathan Gray writes:
>There have been a large amount of changes since 6.0, try a -current snapshot.
>There is a sunxi sd/mmc driver now for instance.

Oh good.

>The cubie miniroot now targets cubieboard2 however.

Sadly the snapshot miniroot won't boot at all on my cubie.  I'm not quite
sure how to install a -current snapshot on it without a bootable miniroot.

Regards,

John
--
John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
IT Director, Department of Computer Science, University of Toronto  
Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

sid77
----- Original Message -----

> In message <[hidden email]> Jonathan Gray writes:
> >There have been a large amount of changes since 6.0, try a -current
> >snapshot.
> >There is a sunxi sd/mmc driver now for instance.
>
> Oh good.
>
> >The cubie miniroot now targets cubieboard2 however.
>
> Sadly the snapshot miniroot won't boot at all on my cubie.  I'm not quite
> sure how to install a -current snapshot on it without a bootable miniroot.

A tutorial was posted on -tech few days ago: https://marc.ttias.be/openbsd-tech/2016-09/msg00044.php

>
> Regards,
>
> John
> --
> John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
> IT Director, Department of Computer Science, University of Toronto
> Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco
>
>

--
Marco Bonetti

jdd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

jdd
In message <[hidden email]>you wr
ite:
>A tutorial was posted on -tech few days ago: https://marc.ttias.be/openbsd-tec
>h/2016-09/msg00044.php

Thanks.

That seems conceptually simple but it does increase the complexity of
putting openbsd on my cubie a fair bit.  Not sure it's worth it, but I
may give it a try at some point.  

Regards,

John
--
John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
IT Director, Department of Computer Science, University of Toronto  
Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

Mark Kettenis
In reply to this post by jdd
Hi John,

I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
should be working much better.

It is not really possible for us to provide install media for all the
different armv7 boards supported by our kernel.  However, for the
boards in the "sunxi" family (such as the Cubieboard) the instructions
can be simplified quite a bit. You can just write a miniroot image to
your SD card and then overwrite the bootloader:

# dd if=miniroot-cubie-60.fs of=/dev/rsdXc
# dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
    of=/dev/rsdXc bs=1024 seek=8

This assumes you're writing fron an OpenBSD systems and installed the
u-boot package.  If you want to do it from a differnt (unixy) system,
you can probably just download the u-boot package from:

  http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/u-boot-2016.07.tgz

and untar it in a temporary directory and pick up the appropriate
u-boot-sunxi-with-spl.bin from there.

Cheers,

Mark

jdd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

jdd
In message <[hidden email]>you write:
>I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
>should be working much better.

Glad to hear it!  Thank you.

>It is not really possible for us to provide install media for all the
>different armv7 boards supported by our kernel.  

I understand: there are quite a few of them.
 
>However, for the
>boards in the "sunxi" family (such as the Cubieboard) the instructions
>can be simplified quite a bit. You can just write a miniroot image to
>your SD card and then overwrite the bootloader:
>
># dd if=miniroot-cubie-60.fs of=/dev/rsdXc
># dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
>    of=/dev/rsdXc bs=1024 seek=8

That's very easy.  I'll give it a try.

Thank you,

John
--
John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
IT Director, Department of Computer Science, University of Toronto  
Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco

jdd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

jdd
In reply to this post by Mark Kettenis
In message <[hidden email]> Mark Kettenis writes:
>I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
>should be working much better.

I tried yesterday's snapshot -- the tx watchdog issue is gone.  Thank you!
tx speed is very slow though: scp of a 100k file out of the cubieboard
was under 4KB/sec.  Still better than hang.  

>You can just write a miniroot image to
>your SD card and then overwrite the bootloader:
>
># dd if=miniroot-cubie-60.fs of=/dev/rsdXc
># dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
>    of=/dev/rsdXc bs=1024 seek=8
>
...
>  http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/u-boot-2016.07.tgz

These instructions worked perfectly, thank you!  I wonder if it's worthwhile
to add the above to the install instructions?

Regards,

John
--
John DiMarco  <[hidden email]>  http://www.cs.toronto.edu/~jdd
IT Director, Department of Computer Science, University of Toronto  
Office: SF3302  1-416-978-5300  Fx:1-416-946-5464  Skype:jddimarco

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

Mark Kettenis
> From: John DiMarco <[hidden email]>
> Date: Tue, 13 Sep 2016 12:32:05 -0400
>
> In message <[hidden email]> Mark Kettenis writes:
> >I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
> >should be working much better.
>
> I tried yesterday's snapshot -- the tx watchdog issue is gone.  Thank you!
> tx speed is very slow though: scp of a 100k file out of the cubieboard
> was under 4KB/sec.  Still better than hang.

The hardware is pretty dumb and requires that some external agent
pushes every 32-bit word of a packet through its FIFO.  In the current
driver that external agent is the CPU.  It should be possible to use
one of the DMA engines on the SoC instead.

> >You can just write a miniroot image to
> >your SD card and then overwrite the bootloader:
> >
> ># dd if=miniroot-cubie-60.fs of=/dev/rsdXc
> ># dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
> >    of=/dev/rsdXc bs=1024 seek=8
> >
> ...
> >  http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/u-boot-2016.07.tgz
>
> These instructions worked perfectly, thank you!  I wonder if it's worthwhile
> to add the above to the install instructions?

Yes, that's my plan.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

Jonathan Gray-11
On Wed, Sep 14, 2016 at 11:43:31PM +0200, Mark Kettenis wrote:

> > From: John DiMarco <[hidden email]>
> > Date: Tue, 13 Sep 2016 12:32:05 -0400
> >
> > In message <[hidden email]> Mark Kettenis writes:
> > >I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
> > >should be working much better.
> >
> > I tried yesterday's snapshot -- the tx watchdog issue is gone.  Thank you!
> > tx speed is very slow though: scp of a 100k file out of the cubieboard
> > was under 4KB/sec.  Still better than hang.
>
> The hardware is pretty dumb and requires that some external agent
> pushes every 32-bit word of a packet through its FIFO.  In the current
> driver that external agent is the CPU.  It should be possible to use
> one of the DMA engines on the SoC instead.
>
> > >You can just write a miniroot image to
> > >your SD card and then overwrite the bootloader:
> > >
> > ># dd if=miniroot-cubie-60.fs of=/dev/rsdXc
> > ># dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
> > >    of=/dev/rsdXc bs=1024 seek=8
> > >
> > ...
> > >  http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/u-boot-2016.07.tgz
> >
> > These instructions worked perfectly, thank you!  I wonder if it's worthwhile
> > to add the above to the install instructions?
>
> Yes, that's my plan.
>

It's a bit hard to explain, but perhaps something like this:

Index: prep
===================================================================
RCS file: /cvs/src/distrib/notes/armv7/prep,v
retrieving revision 1.10
diff -u -p -r1.10 prep
--- prep 23 Jul 2016 16:22:17 -0000 1.10
+++ prep 18 Sep 2016 05:27:28 -0000
@@ -52,3 +52,35 @@ script.
  => bootefi ${kernel_addr_r} ${fdt_addr_r}
 The bootloader will then run and try to load sd0a:/bsd off an FFS
 filesystem after a timeout.
+
+Install on systems without a supported miniroot:
+
+  If a miniroot is not available for your system you will have to modify
+  the image before booting it.
+
+  To do so first install the u-boot and dtb packages.  Write one of the
+  provided miniroot images to an SD card:
+
+   dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/rsdXc
+
+  Add a board specific DTB file:
+
+ mount /dev/sdXi /mnt
+        cp /usr/local/share/dtb/arm/board.dtb /mnt/
+ umount /mnt
+
+  For systems based on Texas Instruments OMAP and AMxxxx SoCs:
+
+ mount /dev/sdXi /mnt
+ cp /usr/local/share/u-boot/board-name/{MLO,u-boot.img} /mnt/
+        umount /mnt
+
+  For systems based on Freescale/NXP i.MX SoCs:
+
+ dd if=/usr/local/share/u-boot/board/SPL of=/dev/rsdXc bs=1024 seek=1
+ dd if=/usr/local/share/u-boot/board/u-boot.img of=/dev/rsdXc bs=1024 seek=69
+
+  For systems based on Allwinner Axx Socs:
+
+ dd if=/usr/local/share/u-boot/board/u-boot-sunxi-with-spl.bin \
+    of=/dev/rsdXc bs=1024 seek=8

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: network issues with Cubieboard and OpenBSD6.0

Mark Kettenis
> Date: Sun, 18 Sep 2016 15:35:18 +1000
> From: Jonathan Gray <[hidden email]>
>
> On Wed, Sep 14, 2016 at 11:43:31PM +0200, Mark Kettenis wrote:
> > > From: John DiMarco <[hidden email]>
> > > Date: Tue, 13 Sep 2016 12:32:05 -0400
> > >
> > > In message <[hidden email]> Mark Kettenis writes:
> > > >I fixed the sxie(4) tx watchdog issue yesterday.  So new snapshots
> > > >should be working much better.
> > >
> > > I tried yesterday's snapshot -- the tx watchdog issue is gone.  Thank you!
> > > tx speed is very slow though: scp of a 100k file out of the cubieboard
> > > was under 4KB/sec.  Still better than hang.
> >
> > The hardware is pretty dumb and requires that some external agent
> > pushes every 32-bit word of a packet through its FIFO.  In the current
> > driver that external agent is the CPU.  It should be possible to use
> > one of the DMA engines on the SoC instead.
> >
> > > >You can just write a miniroot image to
> > > >your SD card and then overwrite the bootloader:
> > > >
> > > ># dd if=miniroot-cubie-60.fs of=/dev/rsdXc
> > > ># dd if=/usr/local/share/u-boot/Cubieboard/u-boot-sunxi-with-spl.bin \
> > > >    of=/dev/rsdXc bs=1024 seek=8
> > > >
> > > ...
> > > >  http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/u-boot-2016.07.tgz
> > >
> > > These instructions worked perfectly, thank you!  I wonder if it's worthwhile
> > > to add the above to the install instructions?
> >
> > Yes, that's my plan.
> >
>
> It's a bit hard to explain, but perhaps something like this:
>
> Index: prep
> ===================================================================
> RCS file: /cvs/src/distrib/notes/armv7/prep,v
> retrieving revision 1.10
> diff -u -p -r1.10 prep
> --- prep 23 Jul 2016 16:22:17 -0000 1.10
> +++ prep 18 Sep 2016 05:27:28 -0000
> @@ -52,3 +52,35 @@ script.
>   => bootefi ${kernel_addr_r} ${fdt_addr_r}
>  The bootloader will then run and try to load sd0a:/bsd off an FFS
>  filesystem after a timeout.
> +
> +Install on systems without a supported miniroot:
> +
> +  If a miniroot is not available for your system you will have to modify
> +  the image before booting it.
> +
> +  To do so first install the u-boot and dtb packages.  Write one of the
> +  provided miniroot images to an SD card:
> +
> +   dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/rsdXc
> +
> +  Add a board specific DTB file:
> +
> + mount /dev/sdXi /mnt
> +        cp /usr/local/share/dtb/arm/board.dtb /mnt/
> + umount /mnt
> +
> +  For systems based on Texas Instruments OMAP and AMxxxx SoCs:
> +
> + mount /dev/sdXi /mnt
> + cp /usr/local/share/u-boot/board-name/{MLO,u-boot.img} /mnt/
> +        umount /mnt
> +
> +  For systems based on Freescale/NXP i.MX SoCs:
> +
> + dd if=/usr/local/share/u-boot/board/SPL of=/dev/rsdXc bs=1024 seek=1
> + dd if=/usr/local/share/u-boot/board/u-boot.img of=/dev/rsdXc bs=1024 seek=69
> +
> +  For systems based on Allwinner Axx Socs:
> +
> + dd if=/usr/local/share/u-boot/board/u-boot-sunxi-with-spl.bin \
> +    of=/dev/rsdXc bs=1024 seek=8

Looks correct to me, and I think that's a useful addition until we
come up with a better solution.

Loading...