Installing OpenBSD 6.6 on Cubox-i

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing OpenBSD 6.6 on Cubox-i

Johan Berg
Hi, I have been trying to install OpenBSD 6.6 on my Cubox-i ( https://www.solid-run.com/nxp-family/cubox-i/ ) writing it to the sd card (Sandisk 32gb):

# dd bs=1m if=miniroot-cubox-64.fs of=/dev/rsd1c
# disklabel sd1

# /dev/rsd1c:
type: vnd
disk: vnd device
label: fictitious
duid: 36a5f1f3d964c599
flags:
bytes/sector: 512
sectors/track: 256
tracks/cylinder: 16
sectors/cylinder: 4096
cylinders: 16
total sectors: 62333952
boundstart: 36864
boundend: 67584
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:            30720            36864  4.2BSD   2048 16384   960
  c:         62333952                0  unused
  i:             4096            32768   MSDOS


When I boot up the machine with the SD card in place I get to this:

https://www.dropbox.com/s/dcw228h0r9am2f0/openbsd.jpg?dl=0

After that it totally hangs and I cannot continue. Is U-Boot somehow reading from the wrong partition or cannot find /bsd?

Regards,
Johan
Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

Jonathan Gray-11
On Thu, Oct 24, 2019 at 01:26:20PM +0200, Johan Berg wrote:

> Hi, I have been trying to install OpenBSD 6.6 on my Cubox-i ( https://www.solid-run.com/nxp-family/cubox-i/ ) writing it to the sd card (Sandisk 32gb):
>
> # dd bs=1m if=miniroot-cubox-64.fs of=/dev/rsd1c
> # disklabel sd1
>
> # /dev/rsd1c:
> type: vnd
> disk: vnd device
> label: fictitious
> duid: 36a5f1f3d964c599
> flags:
> bytes/sector: 512
> sectors/track: 256
> tracks/cylinder: 16
> sectors/cylinder: 4096
> cylinders: 16
> total sectors: 62333952
> boundstart: 36864
> boundend: 67584
> drivedata: 0
>
> 16 partitions:
> #                size           offset  fstype [fsize bsize   cpg]
>   a:            30720            36864  4.2BSD   2048 16384   960
>   c:         62333952                0  unused
>   i:             4096            32768   MSDOS
>
>
> When I boot up the machine with the SD card in place I get to this:
>
> https://www.dropbox.com/s/dcw228h0r9am2f0/openbsd.jpg?dl=0
>
> After that it totally hangs and I cannot continue. Is U-Boot somehow reading from the wrong partition or cannot find /bsd?
>
> Regards,
> Johan

There is no support for "fsl,imx6q-hdmi" / "vivante,gc" in the kernel.

While U-Boot may output on both you'll need to plug a micro usb cable
in and use the serial console for OpenBSD.  It has a builtin uftdi(4).

You list a 6.4 not 6.6 miniroot above as well.

adr
Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

adr
In reply to this post by Johan Berg
As far as I know (I used OpenBSD some 15 years ago for a while,
and now is been some months, so don't trust me too much) there is
no system console driver for arm.  You have to use a serial console
(there are very cheap CH341 usb to ttl ones) to see the output from
the kernel at boot time. If you don't have one at hand, you can
take advantage of the efifb support of wscons in two ways:

Using X11: enable xenodm on rc.conf.local.

Using getty: Put something like this in /etc/ttys

   ttyC0   "/usr/libexec/getty std.9600"   vt220 on secure

Ask the list for the best argument to getty, I tried std.9600 and
just worked.

What you are seeing is the kernel loading and using the first serial
console as the system one. I bet it is alive, just make one of the
changes above and wait a little. By the picture of the screen it
seems that you are using the firmware of the board.  I don't know
if that could be a problem. Better use u-boot from ports.

Regards,
adr.

adr
Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

adr
Correction:

This is for a system allready installed. You need a serial console, or
use a virtual machine with the installer.

On Thu, 24 Oct 2019, adr wrote:

> Date: Thu, 24 Oct 2019 14:47:50 +0000 (UTC)
> From: adr <[hidden email]>
> To: Johan Berg <[hidden email]>
> Cc: [hidden email]
> Subject: Re: Installing OpenBSD 6.6 on Cubox-i
>
> As far as I know (I used OpenBSD some 15 years ago for a while,
> and now is been some months, so don't trust me too much) there is
> no system console driver for arm.  You have to use a serial console
> (there are very cheap CH341 usb to ttl ones) to see the output from
> the kernel at boot time. If you don't have one at hand, you can
> take advantage of the efifb support of wscons in two ways:
>
> Using X11: enable xenodm on rc.conf.local.
>
> Using getty: Put something like this in /etc/ttys
>
>  ttyC0   "/usr/libexec/getty std.9600"   vt220 on secure
>
> Ask the list for the best argument to getty, I tried std.9600 and
> just worked.
>
> What you are seeing is the kernel loading and using the first serial
> console as the system one. I bet it is alive, just make one of the
> changes above and wait a little. By the picture of the screen it
> seems that you are using the firmware of the board.  I don't know
> if that could be a problem. Better use u-boot from ports.
>
> Regards,
> adr.

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

Mark Kettenis
In reply to this post by adr
> Date: Thu, 24 Oct 2019 14:47:50 +0000 (UTC)
> From: adr <[hidden email]>
>
> As far as I know (I used OpenBSD some 15 years ago for a while,
> and now is been some months, so don't trust me too much) there is
> no system console driver for arm.  You have to use a serial console
> (there are very cheap CH341 usb to ttl ones) to see the output from
> the kernel at boot time. If you don't have one at hand, you can
> take advantage of the efifb support of wscons in two ways:

On armv7/arm64 we have simplefb(4) instead of efifb(4).  On arm64 I
recently added supportfor switching to the framebuffer console in the
bootloader.  I'll see if I can port that code to armv7 as well.

adr
Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

adr
> On armv7/arm64 we have simplefb(4) instead of efifb(4).  On arm64 I
> recently added supportfor switching to the framebuffer console in the
> bootloader.  I'll see if I can port that code to armv7 as well.

That would be great. I'll help in the near (I hope) future.

Thanks,
adr.

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

Johan Berg
In reply to this post by adr
My bad, I didn’t know about the must have serial console connection to the cubox, I thought first that it should boot the kernel and then add the cable, rookie mistake by me. Just added my microUSB-RS232 to USB controller attached to my laptop and ran cu -l cuaU0 -s 115200 and everything worked as expected with the rest of the installation.

Thanks!

Johan

> On 24 Oct 2019, at 16:47, adr <[hidden email]> wrote:
>
> As far as I know (I used OpenBSD some 15 years ago for a while,
> and now is been some months, so don't trust me too much) there is
> no system console driver for arm.  You have to use a serial console
> (there are very cheap CH341 usb to ttl ones) to see the output from
> the kernel at boot time. If you don't have one at hand, you can
> take advantage of the efifb support of wscons in two ways:
>
> Using X11: enable xenodm on rc.conf.local.
>
> Using getty: Put something like this in /etc/ttys
>
>  ttyC0   "/usr/libexec/getty std.9600"   vt220 on secure
>
> Ask the list for the best argument to getty, I tried std.9600 and
> just worked.
>
> What you are seeing is the kernel loading and using the first serial
> console as the system one. I bet it is alive, just make one of the
> changes above and wait a little. By the picture of the screen it
> seems that you are using the firmware of the board.  I don't know
> if that could be a problem. Better use u-boot from ports.
>
> Regards,
> adr.
>

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

Raf Czlonka-2
On Thu, Oct 24, 2019 at 05:48:00PM BST, Johan Berg wrote:

> My bad, I didn’t know about the must have serial console connection
> to the cubox, I thought first that it should boot the kernel and then
> add the cable, rookie mistake by me. Just added my microUSB-RS232 to
> USB controller attached to my laptop and ran cu -l cuaU0 -s 115200 and
> everything worked as expected with the rest of the installation.
>
> Thanks!
>
> Johan
>

Hi Johan,

As mentioned earlier, you don't need one - UART on the CuBox side
handles serial console, all you need is a standard microUSB-to-USB-A
cable.

Regards,

Raf

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.6 on Cubox-i

Johan Berg


> On 25 Oct 2019, at 01:22, Raf Czlonka <[hidden email]> wrote:
>
> On Thu, Oct 24, 2019 at 05:48:00PM BST, Johan Berg wrote:
>> My bad, I didn’t know about the must have serial console connection
>> to the cubox, I thought first that it should boot the kernel and then
>> add the cable, rookie mistake by me. Just added my microUSB-RS232 to
>> USB controller attached to my laptop and ran cu -l cuaU0 -s 115200 and
>> everything worked as expected with the rest of the installation.
>>
>> Thanks!
>>
>> Johan
>>
>
> Hi Johan,
>
> As mentioned earlier, you don't need one - UART on the CuBox side
> handles serial console, all you need is a standard microUSB-to-USB-A
> cable.

Yes, that worked flawlessly when I figured that out. Did not know that beforehand. :-)

>
> Regards,
>
> Raf