From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by mail.openembedded.org (Postfix) with ESMTP id 6541C7017B for ; Tue, 16 Feb 2016 06:04:25 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id u1G64PPi026469 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Mon, 15 Feb 2016 22:04:25 -0800 Received: from [128.224.162.139] (128.224.162.139) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.248.2; Mon, 15 Feb 2016 22:04:23 -0800 To: "Burton, Ross" References: <1455522477-32256-1-git-send-email-rongqing.li@windriver.com> <56C282AA.9010707@windriver.com> From: Rongqing Li Message-ID: <56C2BBE6.20209@windriver.com> Date: Tue, 16 Feb 2016 14:04:22 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56C282AA.9010707@windriver.com> Cc: OE-core Subject: Re: [PATCH] systemd-serialgetty: fix a typo X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 06:04:26 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit On 2016年02月16日 10:00, Rongqing Li wrote: > > > On 2016年02月15日 18:30, Burton, Ross wrote: >> >> On 15 February 2016 at 07:47, > > wrote: >> >> -SERIAL_CONSOLE ?= "115200 ttyS0" >> +SERIAL_CONSOLES ?= "115200 ttyS0" >> >> >> bitbake.conf says: >> >> SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', >> ';')}" >> >> And the relevant commit introducing _CONSOLES says: >> >> Just define additional serial consoles like so: >> SERIAL_CONSOLES="115200;ttyS0 115200;ttyS1 ... 115200;ttySN" >> >> So moving from CONSOLE to CONSOLES is more than just adding an S. > > sorry, I am wrong > >> >> Anyway, surely the machine should be setting this if required? Why does >> systemd-serialgetty think that ttyS0 should be a serial console if the >> machine doesn't say so? >> > > This is a issue, like qemux86, ttyS0 and ttyS1 will be used as console, > but ttyS1 is not a true device when execute "runqemu qemux86", and lead > to the blow error. this is not issue, since it is fixed by commit 6f2047a0e278d29876451b5af8b8de156db33ed0 Author: Randy Witt Date: Mon Sep 28 15:38:23 2015 -0700 runqemu-internal: Make sure two serial ports always exist Since inittab for qemu images now always tries to start getty on a second serial device, make sure that device exists. Otherwise the following message will be spammed: INIT: Id "S1" respawning too fast: disabled for 5 minutes [YOCTO #8374] (From OE-Core rev: 988369afed85281f3ed9b2f3eeb30f5408498bb9) Signed-off-by: Randy Witt Signed-off-by: Richard Purdie -Roy > > > root@qemu0:~# systemctl status serial-getty@ttyS1 > ● serial-getty@ttyS1.service - Serial Getty on ttyS1 > Loaded: loaded (/lib/systemd/system/serial-getty@.service; enabled; > vendor preset: enabled) > Active: active (running) since Sat 2016-02-06 03:33:26 UTC; 1s ago > Docs: man:agetty(8) > man:systemd-getty-generator(8) > http://0pointer.de/blog/projects/serial-console.html > Main PID: 902 (agetty) > CGroup: > /system.slice/system-serial\x2dgetty.slice/serial-getty@ttyS1.service > └─902 /sbin/agetty -8 -L --keep-baud ttyS1 115200 xterm > > Feb 06 03:33:26 qemu0 systemd[1]: Started Serial Getty on ttyS1. > Feb 06 03:33:26 qemu0 agetty[902]: /dev/ttyS1: not a tty > > > > > the below commit sets ttyS1 as console, but runqemu has only ttyS0 device. > > > commit 2da3fee6b6d9f4dd4c4cb529f4ba393c20aa0f13 > Author: Randy Witt > Date: Thu Aug 20 13:01:25 2015 -0700 > > qemurunner: Use two serial ports and log console with a thread > > qemu can freeze and stop responding if the socket buffer connected > to a tcp > serial connection fills up. This happens of course when the reader of > the serial data doesn't actually read it. > > This happened in the qemurunner code, because after checking for the > "login:" sentinel, data was never again read from the serial > connection. > > This patch solves the potential freeze by adding a thread to > continuously > read the data from the console and log it. So it also will give a > full log > of the console, rather than just up to the login prompt. > > To simplify this patch, another serial port was also added to use > for the > sole purpose of watching for the sentinel as well as being the > interactive > serial port. This will also prevent the possibility of lots of debug > data on the console preventing the sentinel value from being seen > due to > interleaved text. > > Signed-off-by: Randy Witt > Signed-off-by: Ross Burton > > > > > > > -Roy > > > > >> Ross -- Best Reagrds, Roy | RongQing Li