Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2016 11:22:35 -0700
From:      bob prohaska <fbsd@www.zefox.net>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Borodin Oleg <onborodin@gmail.com>, freebsd-arm@freebsd.org, bob prohaska <fbsd@www.zefox.net>
Subject:   Re: Using one RPI2 as a serial terminal for a second RPI2
Message-ID:  <20160323182235.GF86944@www.zefox.net>
In-Reply-To: <1458747476.1091.35.camel@freebsd.org>
References:  <20160323012413.GA86944@www.zefox.net> <CAB=2f8yCU1y50DeNV3BXt=5o6dv5Xz3WcaBBLrcgOLrg-yXBnQ@mail.gmail.com> <20160323100232.00576347@zee.home> <1458747476.1091.35.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 23, 2016 at 09:37:56AM -0600, Ian Lepore wrote:
> On Wed, 2016-03-23 at 10:02 +0200, Borodin Oleg wrote:
> > On Wed, 23 Mar 2016 00:49:03 -0300
> > Luiz Otavio O Souza <lists.br@gmail.com> wrote:
> > 
> > > On 22 March 2016 at 22:24, bob prohaska wrote:
> > > > 
> > > > Is there a way to operate an RPI2  single user with the HDMI
> > > > monitor
> > > > and a USB keyboard?  
> > > 
> > > Try this:
> > > 
> > > # sysctl kern.console=ttyv0
> > > 
> > > and then:
> > > 
> > > # shutdown now
> > 
> > 
> > How use usb keyboard _before_ kernel loading, with uboot/loader?
> > 
> 
> That cannot be done, because u-boot still doesn't have support for low
> -speed usb devices on rpi.  At least, it didn't last time I checked (in
> January), I think there's a new version of u-boot out, I'll try to find
> time to test it soon.
> 
> -- Ian

I just tried it over a serial console at the single-user prompt, the
HDMI display and USB keyboard didn't react at all:

# mount -a
# sysctl kern.console=ttyv0
kern.console: ttyu0,ttyv0,/ttyu0,ttyv0, -> ttyv0,ttyu0,/ttyu0,ttyv0,

but no change at the keyboard or display.


Next I tried rebooting and presenting the command to the U-boot prompt.
It reacted with an error message:

Rebooting...


U-Boot 2015.04 (May 30 2015 - 22:13:58)

DRAM:  944 MiB
WARNING: Caches not enabled
RPI 2 Model B
MMC:   bcm2835_sdhci: 0
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

In:    serial
Out:   lcd
Err:   lcd
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
U-Boot> sysctl kern.console=ttyv0
Unknown command 'sysctl' - try 'help'
U-Boot> 

Might this have something to do with the "**unable to read...." warning? Boots
seem to work despite the error.

If the command  merely suffices to allow the FreeBSD kernel
to interact with the USB keyboard and HDMI console in single
user mode that would be a huge step forward. There has been
no need to intervene with U-boot. All that's required is a
way to recover from startup errors that put the system in 
single-user mode. Could it be invoked by something akin to
device hints?

Thanks for reading,

bob prohaska




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160323182235.GF86944>