From owner-freebsd-arm@freebsd.org Wed Sep 19 12:17:27 2018 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 375521099461 for ; Wed, 19 Sep 2018 12:17:27 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mail.cyclaero.com (ec2-18-195-62-44.eu-central-1.compute.amazonaws.com [18.195.62.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C45657E291; Wed, 19 Sep 2018 12:17:25 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mail.obsigna.com (unknown [191.182.171.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cyclaero.com (Postfix) with ESMTPSA id DDAAF71; Wed, 19 Sep 2018 14:17:23 +0200 (CEST) Received: from rolf.projectworld.net (rolf.projectworld.net [192.168.222.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 0658D1350F947; Wed, 19 Sep 2018 09:17:18 -0300 (BRT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Serial console of 12.0-ALPHA3 fiddles with the terminal colors From: "Dr. Rolf Jansen" In-Reply-To: Date: Wed, 19 Sep 2018 09:17:18 -0300 Cc: "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7A707C18-2A11-4519-9FEC-522A37CB5708@obsigna.com> References: <3C3F2C68-81C2-40F0-8DA0-95D1C55C9938@obsigna.com> To: Kyle Evans X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 12:17:27 -0000 > Am 27.08.2018 um 21:56 schrieb Kyle Evans : >=20 > On Mon, Aug 27, 2018 at 7:34 PM Dr. Rolf Jansen = wrote: >>=20 >>> Am 27.08.2018 um 20:22 schrieb Kyle Evans : >>>=20 >>> On Mon, Aug 27, 2018 at 6:09 PM Dr. Rolf Jansen = wrote: >>>>=20 >>>> Hello, >>>>=20 >>>> I updated my BeagleBone Black to 12.0-ALPHA3, and now, when = booting, the serial console behaves differently (I use cu from a Mac = Terminal via a FDTI/USB adapter). >>>>=20 >>>> When it comes to "Loading kernel...", the terminal color is = inverted, instead of maintaining the usual black on white, all over the = sudden everything is displayed in white on black. And more seriously, = the logging before loading the kernel, is deleted, which means I cannot = see the diagnostics of the u-boot loader. >>>>=20 >>>> Is there any setting, to prevent the serial console manipulates = color and content of a terminal session? >>>>=20 >>>=20 >>> Hi, >>>=20 >>> You want loader_color in your loader.conf(5), which should = (hopefully) >>> disable all color while still being usable. We force the color = scheme >>> to white on black if colors are displayed because we can't = necessarily >>> sample or Q/A our color choice on all possible configurations. >>>=20 >>> I'll double check on the screen clearing... I don't recall adding = any >>> extra clears except for password prompts and (re-)drawing the menu. >>>=20 >>> Thanks, >>>=20 >>> Kyle Evans >>=20 >> Thank you for the quick reply. >>=20 >> I added loader_color=3D"NO" and this didn't change anything. The = u-boot loader diagnostics is shown in black on white, then the FreeBSD = boot loader takes over, and the first thing, which it does is deleting = the u-boot loader diagnostics and then it switches the background to = black and the following is all white on black. >=20 > Hmm... I'll take a look at this shortly. If colors are disabled, I > think we should be leaving colors alone (full stop), to include the > background reset. This must be a bug that I introduced. =3D( >=20 >> What again is the purpose of setting the color scheme in the serial = console? I understand that something shall be set on the real screen, = now in a terminal window? Think about the poor people who like it green = on pink, and you change it to white on black, come on :-) >=20 > I blame imp@. =3D) In reality, though, I don't think we had a good > reason for not allowing it by default and moving to a world where we > just respect loader_color simplified quite a bit that was originally > written to check if we're writing to a serial console. Please excuse me responding late. I was on a tight schedule. In the meantime, I updated the BBB to FreeBSD 12.0-ALPHA6 and the issue = with the terminal color changing from black on white to white on black = when the kernel starts loading has gone. I only need to set = loader_color=3DNO in /boot/loader.conf, and that's absolutely OK for me. However, the other issue, that the kernel loader flushes the diagnostic = output of the U-Boot loader is not solved. Each time the kernel loads, = exactly 24 lines are flushed in the serial console above of the initial = notice "Loading kernel..." So, in case we want to see the U-Boot diagnostics, we need to have a = high speed cam by hand, like in the old days when capturing quickly = flowing diagnostics on the tube terminals. OK, in the moment, I got no = boot problems, but occasions may come. Best regards Rolf=