Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1409)

Issue 6659021: Add cros_debug option to crossystem (Closed)

Created:
9 years, 9 months ago by Randall Spangler
Modified:
9 years, 7 months ago
Reviewers:
Will Drewry, Randall
CC:
chromium-os-reviews_chromium.org, Randall Spangler, gauravsh, Luigi Semenzato, Bill Richardson
Visibility:
Public.

Description

Add cros_debug option to crossystem Change-Id: Ie62364a87f7f144ee647054d2a9ef83522cdbe7d BUG=12904 TEST=manual Expected output of `crossystem mainfw_type cros_debug` under each of the following scenarios: * Boot Alex with dev switch off: normal 0 * Boot Alex with dev switch on (and dev firmware): developer 1 * Boot Alex with dev switch on (and normal firmware): normal 1 * Boot Alex with recovery firmware: recovery 0 * Boot Alex with dev switch off, then turn the dev switch on after booting: normal 0 * Boot Cr-48 with dev switch off: normal 0 * Boot Cr-48 with dev switch on: developer 1 * Boot Cr-48 with recovery firmware: recovery 0 * Boot Alex with dev switch off and kernel command line changed to include "cros_debug": normal 1 * Boot Alex with dev switch off and kernel command line changed to include "cros_debugg": normal 0 * Boot Alex with dev switch off and kernel command line changed to include "ccros_debug": normal 0 * Boot H2O BIOS with kernel command line changed to include "cros_debug": nonchrome 1 * Boot H2O BIOS with kernel command line changed to include "cros_debugg": nonchrome 0 * Boot H2O BIOS with kernel command line changed to include "ccros_debug": nonchrome 0 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=196e177

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -4 lines) Patch
M host/lib/crossystem.c View 5 chunks +50 lines, -4 lines 0 comments Download
M utility/crossystem_main.c View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Randall Spangler
9 years, 9 months ago (2011-03-10 01:00:57 UTC) #1
Will Drewry
LGTM The only question left now is that where we use cros_boot_mode during pam, we ...
9 years, 9 months ago (2011-03-10 02:33:28 UTC) #2
Randall Spangler
On Wed, Mar 9, 2011 at 6:33 PM, <wad@chromium.org> wrote: > LGTM > > The ...
9 years, 9 months ago (2011-03-10 03:06:46 UTC) #3
Randall
On Wed, Mar 9, 2011 at 7:06 PM, Randall Spangler <rspangler@chromium.org>wrote: > On Wed, Mar ...
9 years, 9 months ago (2011-03-10 03:11:16 UTC) #4
Will Drewry
9 years, 9 months ago (2011-03-10 16:15:22 UTC) #5
On 2011/03/10 03:11:16, Randall wrote:
> On Wed, Mar 9, 2011 at 7:06 PM, Randall Spangler
<rspangler@chromium.org>wrote:
> 
> > On Wed, Mar 9, 2011 at 6:33 PM, <mailto:wad@chromium.org> wrote:
> >
> >> LGTM
> >>
> >> The only question left now is that where we use cros_boot_mode during pam,
> >> we
> >> just test exit code (since cros_boot_mode let's you ask "am I in developer
> >> mode").  But I guess instead of checking the exit code we can add pipe.
> >> I'm not
> >> sure if pam_exec supports that though.
> >>
> >> E.g.,
> >>
> >> auth [success=ignore default=3] pam_exec.so \
> >>  quiet /bin/cros_boot_mode -s -m developer
> >>
> >> will need to become crossystem cros_debug | grep -q 1.
> >>
> >> Do you think it'd be sane to add an exit code tie in?
> >
> >
> > You mean something like
> >     crossystem cros_debug==1
> > where that'll return errorlevel 0 if cros_debug==1 and 1 if it isn't?  That
> > wouldn't be terribly hard to add (though I'd do it in a separate CL).
> >


Cool.

> Also, do you want a 'cros_nodebug' kernel parameter, which overrides the dev
> switch position for Normal or Cr-48 firmware to be off?  As currently
> defined, normal firmware + dev switch on --> cros_debug=1


I don't *think* we'll need that since we'll use cros_debug for sudo/login access
but devswitch+devfw for detecting the clobber case.  In the current world, we
use devswitch+file_on_stateful.

> 
> >
> > - Randall
> >
> >
> >>
> >>
> >> http://codereview.chromium.org/6659021/
> >>
> >
> >

Powered by Google App Engine
This is Rietveld 408576698