From owner-freebsd-arm@freebsd.org Fri Mar 8 15:53:18 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7038A150E6D4 for ; Fri, 8 Mar 2019 15:53:18 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C2CC80D24; Fri, 8 Mar 2019 15:53:16 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x28Fr5TJ095604; Fri, 8 Mar 2019 07:53:05 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x28Fr5iG095603; Fri, 8 Mar 2019 07:53:05 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201903081553.x28Fr5iG095603@ gndrsh.dnsmgr.net> Subject: Re: Editing on the serial console In-Reply-To: <20190308055313.GB49607@www.zefox.net> To: bob prohaska Date: Fri, 8 Mar 2019 07:53:05 -0800 (PST) CC: "Rodney W. Grimes" , Warner Losh , freebsd-arm@freebsd.org, Konstantin Belousov X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 3C2CC80D24 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.24 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.80)[0.805,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.71)[0.705,0]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: gndrsh.dnsmgr.net]; NEURAL_SPAM_LONG(0.14)[0.139,0]; INVALID_MSGID(1.70)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.00)[ip: (0.06), ipnet: 69.59.192.0/19(0.03), asn: 13868(0.01), country: US(-0.07)] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 15:53:18 -0000 > On Thu, Mar 07, 2019 at 11:13:37AM -0800, Rodney W. Grimes wrote: > > > > It is where it is because it is not > > /etc/ system configuration files and scripts > > and is > > /usr/share/ architecture-independent files > > misc/ miscellaneous system-wide ASCII text files > > > > The /etc/termcap link is for backwards compatibility. > > > > The logic is impeccable, but the utility leaves something to be > desired. On entering single user, the RPI console reports > > Enter full pathname of shell or RETURN for /bin/sh: > Cannot read termcap database; > using dumb terminal settings. > > It was necessary to mount /usr so as to get at vi, which one might > expect to make the termcap database accessible. Even so, the display > was garbled. Maybe this was the result of using lxterminal to ssh to > the host holding the usb-serial adapter to the target's serial console. What sequence of commands do you do to recver from the failed reading of termcap, and the downgrading of your term to dumb? mount /usr env TERM=xterm tset Or similiar are the 3 things minimal to recover from this condition. Just mounting /usr only makes termcap visible, your TERM env value is still wrong, and your terminal has not been initialized. > > Using putty to connect to the usb-serial host produced a clean display. > > The serial console is rather indespensible on an RPI, is there a way > to configure it to be well-behaved with whatever terminal emulator > is readily available? The simple fix if your infact are using split /usr is to just copy /usr/share/misc/termcap to /etc. I do not recommend split /usr as FreeBSD continiously break this in ways that require expert knowledge to sort out and fix at times. Similiar with readonly /, Even I finally got so tired of trying to deal with it my NFS diskless stuff now runs with a R/W exported / that has /usr in it. It is on a zfs file system, with an @prestine snapshot so I can occasionally revert to that state. > Thanks for reading! > bob prohaska -- Rod Grimes rgrimes@freebsd.org