From owner-freebsd-arm@freebsd.org Wed Mar 23 18:22:38 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C5BDADB2DC for ; Wed, 23 Mar 2016 18:22:38 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [69.239.235.194]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 051D310D7; Wed, 23 Mar 2016 18:22:37 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.14.9/8.14.5) with ESMTP id u2NIMZaO093814; Wed, 23 Mar 2016 11:22:35 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.14.9/8.14.5/Submit) id u2NIMZWe093813; Wed, 23 Mar 2016 11:22:35 -0700 (PDT) (envelope-from fbsd) Date: Wed, 23 Mar 2016 11:22:35 -0700 From: bob prohaska To: Ian Lepore Cc: Borodin Oleg , freebsd-arm@freebsd.org, bob prohaska Subject: Re: Using one RPI2 as a serial terminal for a second RPI2 Message-ID: <20160323182235.GF86944@www.zefox.net> References: <20160323012413.GA86944@www.zefox.net> <20160323100232.00576347@zee.home> <1458747476.1091.35.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458747476.1091.35.camel@freebsd.org> User-Agent: Mutt/1.4.2.3i X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 18:22:38 -0000 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 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