New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722913 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

enable tty login in debug mode for boards that want it

Project Member Reported by diand...@chromium.org, May 16 2017

Issue description

The CL <https://chromium-review.googlesource.com/c/499012/> had an side effect of disabling tty-login on veyron / gru boards, which have historically had it on.

We probably want to re-enable tty-login at least in some cases.  Current proposal is that maybe we can just enable it in dev mode.
 
Actually, it looks like veyron _wasn't_ disabled as far as I can tell.

---

I think this should fix us:

* https://chromium-review.googlesource.com/506770
  chromeos-base/tty: Don't spawn a tty if we don't have cros_debug

* https://chromium-review.googlesource.com/506807
  baseboard-gru: Turn on the serial console again

---

I'll kick off a trybot to fully test this.
Cc: pbe...@chromium.org amstan@chromium.org mnissler@chromium.org briannorris@chromium.org bhthompson@chromium.org nsanders@chromium.org drinkcat@chromium.org snanda@chromium.org
Testing done on kevin:

1. On a kevin with gbb flags to force dev mode, boot "base" image via SD (Ctrl-U).  See "Dev Mode Transition" on SD card image.
2. When system reboots, Ctrl-U again.  Now booted in dev mode w/ a base image.
3. Login via serial login prompt line (root, no password).  Install to eMMC:  chromeos-install && reboot
4. Once rebooted, now booted from eMMC.  Login and change gbb flags back: /usr/share/vboot/bin/set_gbb_flags.sh 0x00 && reboot
5. Wait for device to boot.  Confirm no serial login prompt.
6. Login as guest and browse to file:///var/log/messages.  See one "console-ttyS2" killed (as expected), but no respawn.
7. Switch back to dev mode:  Eject SD.  Esc-Refresh-Power, Ctrl-D, Enter, wait
8. Set gbb flags back via serial login: /usr/share/vboot/bin/set_gbb_flags.sh 0x239 && reboot
9. Boot test image via SD card / Ctrl-U.
10. Login via serial consome login prompt (root, test0000).  Install to eMMC:  chromeos-install && reboot
11. Once rebooted, now booted from eMMC.  Login and change gbb flags back: /usr/share/vboot/bin/set_gbb_flags.sh 0x00 && reboot
12. Confirm that on test image but not in dev mode can login via serial with root, test0000

Test completed.
Project Member

Comment 4 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/f0d6b5679e68260d3a26356abdd683c88ec0daee

commit f0d6b5679e68260d3a26356abdd683c88ec0daee
Author: Douglas Anderson <dianders@chromium.org>
Date: Thu May 18 02:06:16 2017

baseboard-gru: Turn on the serial console again

The serial driver is always enabled in the kernel on gru devices.
That means we have the ability to always enable login via the serial
port.

Apparently the serial console isn't intended to be left on for
non-debug mode.  Now that we've fixed our init script to avoid
spawning the agetty in debug mode, there should be no problems turning
this on always for gru.

CQ-DEPEND=CL:506770
BUG= chromium:722913 
TEST=build_image

Change-Id: I21816f620c1125f9ce7c11944f9444e4807e0eb3
Reviewed-on: https://chromium-review.googlesource.com/506807
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>

[modify] https://crrev.com/f0d6b5679e68260d3a26356abdd683c88ec0daee/baseboard-gru/profiles/base/make.defaults

Project Member

Comment 5 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/119cc6a6ed62c47bc31e16dff1dd806639ecddcc

commit 119cc6a6ed62c47bc31e16dff1dd806639ecddcc
Author: Douglas Anderson <dianders@chromium.org>
Date: Thu May 18 02:06:16 2017

chromeos-base/tty: Don't spawn a tty if we don't have cros_debug

Everything else on the system (crosh, chromeos_startup, etc) only
enables debugging features if crossystem says we should.  The TTY
should be no different.

Once we have this change, we can safely enable serial login prompt on
devices where the serial driver is already builtin to the kernel.

BUG= chromium:722913 
TEST=Type username, then Ctrl-C. Login prompt comes back.
TEST=Hack to look for x_crossystem. No login prompt, no respawns.
TEST=Hack to call with "cros_debug?0". No login prompt, no respawns.

Change-Id: I99842f3561360ec87c37089e7f10daa08dd88eb1
Reviewed-on: https://chromium-review.googlesource.com/506770
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>

[modify] https://crrev.com/119cc6a6ed62c47bc31e16dff1dd806639ecddcc/chromeos-base/tty/files/tty-base.conf
[rename] https://crrev.com/119cc6a6ed62c47bc31e16dff1dd806639ecddcc/chromeos-base/tty/tty-0.0.1-r9.ebuild

Status: Fixed (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1b2299ff7df355324b78b1ddb9241323de10114e

commit 1b2299ff7df355324b78b1ddb9241323de10114e
Author: Douglas Anderson <dianders@chromium.org>
Date: Fri Jun 09 18:22:17 2017

chromeos-base/tty: No need to check for existence of crossystem

In reviews of CL:506770 after the CL landed, Mike pointed out that we
don't need to check for the existence of crossystem before running
it.  Remove it.

The original code here was copied from crosh:

  https://chromium.googlesource.com/chromiumos/platform2/+/master/crosh/crosh#116

...but there we're trying to show nice messages.  Here it's not needed
and if crossystem is missing then we'll just fall through to the
'else' clause and stop trying to spawn the agetty.

BUG= chromium:722913 
TEST=Hack to call x_crossystem.  No login prompt, no respawns.

Change-Id: I53684d1d6ba097a92f8c80991507560f9eda4808
Reviewed-on: https://chromium-review.googlesource.com/508187
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>

[rename] https://crrev.com/1b2299ff7df355324b78b1ddb9241323de10114e/chromeos-base/tty/tty-0.0.1-r10.ebuild
[modify] https://crrev.com/1b2299ff7df355324b78b1ddb9241323de10114e/chromeos-base/tty/files/tty-base.conf

Comment 8 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment