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

Issue 3530001: first cut: establishes base helper classes and main (Closed)

Created:
10 years, 2 months ago by Will Drewry
Modified:
9 years, 7 months ago
Reviewers:
fes, jrbarnette, vb, sosa
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

first cut: establishes base helper classes and main cros_boot_mode supports determining the boot mode of a Chrome OS device. By default, unsupported devices will be considered to be in "normal" mode and CrOS devices with custom platform support will export the required interfaces to support indicating "developer" mode. In addition, there is support for short-circuiting the detection using a kernel commandline parameter to enable arbitrary testing of a single, untouched image on supported hardware without recompiling the kernel, flipping switch, etc. NOTE: common.mk was copied over from verity/common.mk. Moved here from http://codereview.chromium.org/3432027/show TEST=unittests BUG=chromium-os:824, chromium-os:6864

Patch Set 1 #

Patch Set 2 : style and boilerplate fixes #

Patch Set 3 : add a few todos to the readme #

Patch Set 4 : cros_Debug support #

Patch Set 5 : fix incorrect strlen #

Patch Set 6 : make sure everything is up #

Patch Set 7 : add strict matching #

Total comments: 14

Patch Set 8 : fix nits #

Total comments: 45

Patch Set 9 : nits, testing, and fixes! #

Total comments: 14

Patch Set 10 : nits; unittests; bug fix #

Patch Set 11 : constant-ize chars #

Patch Set 12 : unittest fixes #

Patch Set 13 : truncation is bad, m'kay. . . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1812 lines, --1 lines) Patch
A LICENSE View 1 chunk +27 lines, -0 lines 0 comments Download
A Makefile View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
M README View 1 chunk +5 lines, -0 lines 0 comments Download
A active_main_firmware.h View 1 2 3 4 5 6 7 8 1 chunk +43 lines, -0 lines 0 comments Download
A active_main_firmware.cc View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
A boot_mode.h View 1 2 3 4 5 6 7 8 1 chunk +76 lines, -0 lines 0 comments Download
A boot_mode.cc View 1 2 3 4 5 6 7 8 1 chunk +110 lines, -0 lines 0 comments Download
A boot_mode_main.cc View 1 2 3 4 5 6 7 8 9 1 chunk +128 lines, -0 lines 0 comments Download
A boot_mode_testrunner.cc View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A boot_mode_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +218 lines, -0 lines 0 comments Download
A bootloader_type.h View 1 2 3 4 5 6 7 8 1 chunk +64 lines, -0 lines 0 comments Download
A bootloader_type.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +62 lines, -0 lines 0 comments Download
A bootloader_type_unittest.cc View 9 1 chunk +114 lines, -0 lines 0 comments Download
A common.mk View 1 2 3 4 5 6 7 1 chunk +478 lines, -0 lines 0 comments Download
A developer_switch.h View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -0 lines 0 comments Download
A developer_switch.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A developer_switch_unittest.cc View 9 10 11 12 1 chunk +101 lines, -0 lines 0 comments Download
A helpers.h View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -0 lines 0 comments Download
A helpers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +47 lines, -0 lines 0 comments Download
A inherit-review-settings-ok View 0 chunks +-1 lines, --1 lines 0 comments Download
A platform_reader.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +69 lines, -0 lines 0 comments Download
A platform_reader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +37 lines, -0 lines 0 comments Download
A platform_switch.h View 1 2 3 4 5 6 7 8 1 chunk +42 lines, -0 lines 0 comments Download
A platform_switch.cc View 1 2 3 4 5 6 7 8 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Will Drewry
10 years, 2 months ago (2010-09-28 20:31:13 UTC) #1
jrbarnette
Some minor comments to start with; I may have more to say in a bit. ...
10 years, 2 months ago (2010-09-29 19:25:05 UTC) #2
Will Drewry
On 2010/09/29 19:25:05, jrbarnette wrote: > Some minor comments to start with; I may have ...
10 years, 2 months ago (2010-09-29 21:45:52 UTC) #3
Will Drewry
[+sosa so he can see all the pieces] On 2010/09/29 21:45:52, Will Drewry wrote: > ...
10 years, 2 months ago (2010-09-29 21:47:42 UTC) #4
Will Drewry
Any takers for a final review /lgtm? I was really hoping to land this set ...
10 years, 2 months ago (2010-09-30 19:35:58 UTC) #5
jrbarnette
I have some (unimportant) typo notes. More substantively, I have two questions: * Am I ...
10 years, 2 months ago (2010-09-30 20:30:17 UTC) #6
Will Drewry
On Thu, Sep 30, 2010 at 3:30 PM, <jrbarnette@chromium.org> wrote: > I have some (unimportant) ...
10 years, 2 months ago (2010-09-30 20:40:36 UTC) #7
Will Drewry
Nice catches - thanks! http://codereview.chromium.org/3530001/diff/13001/14002 File Makefile (right): http://codereview.chromium.org/3530001/diff/13001/14002#newcode23 Makefile:23: # Tests are not build ...
10 years, 2 months ago (2010-09-30 20:43:35 UTC) #8
sosa
http://codereview.chromium.org/3530001/diff/13001/14002 File Makefile (right): http://codereview.chromium.org/3530001/diff/13001/14002#newcode23 Makefile:23: # Tests are not build by default. s/build/built http://codereview.chromium.org/3530001/diff/13001/14011 ...
10 years, 2 months ago (2010-09-30 20:46:00 UTC) #9
Will Drewry
Thanks! What do you think about an ImageType class? Maybe it could be enabled (or ...
10 years, 2 months ago (2010-09-30 20:51:26 UTC) #10
sosa
That SGTM. Right now our image class equivalent is all over the place and I ...
10 years, 2 months ago (2010-09-30 21:03:17 UTC) #11
jrbarnette
On Sep 30, 2010, at 1:40 PM, Will Drewry wrote: > On Thu, Sep 30, ...
10 years, 2 months ago (2010-09-30 21:14:56 UTC) #12
jrbarnette
On Sep 30, 2010, at 1:51 PM, wad@chromium.org wrote: > Thanks! > > What do ...
10 years, 2 months ago (2010-09-30 21:27:10 UTC) #13
Will Drewry
On Thu, Sep 30, 2010 at 4:27 PM, Richard Barnette <jrbarnette@chromium.org> wrote: > On Sep ...
10 years, 2 months ago (2010-09-30 22:10:35 UTC) #14
jrbarnette
I have a huge heapin' helpin' of style nits and comment readability suggestions. I haven't ...
10 years, 2 months ago (2010-09-30 23:19:48 UTC) #15
fes
Minor nits + what seems to be an off-by-one. http://codereview.chromium.org/3530001/diff/22001/23004 File active_main_firmware.cc (right): http://codereview.chromium.org/3530001/diff/22001/23004#newcode26 active_main_firmware.cc:26: ...
10 years, 2 months ago (2010-10-01 21:51:23 UTC) #16
jrbarnette
I've gone through the unit tests now. At this point I've looked at all the ...
10 years, 2 months ago (2010-10-01 22:52:51 UTC) #17
Will Drewry
I've attempted to address all the comments - from nits to style to bugs and ...
10 years, 2 months ago (2010-10-04 20:11:27 UTC) #18
fes
LGTM
10 years, 2 months ago (2010-10-04 20:16:37 UTC) #19
Will Drewry
On 2010/10/04 20:16:37, fes wrote: > LGTM Thanks! @jrbarnette: I'll wait for your LGTM too ...
10 years, 2 months ago (2010-10-04 20:52:39 UTC) #20
jrbarnette
Follow-up comments covering the code but not the unit tests. I found a bug, so ...
10 years, 2 months ago (2010-10-05 15:51:06 UTC) #21
Will Drewry
Bug fixed, unittest added, and comments addressed, I hope! PTAL :) thanks! will http://codereview.chromium.org/3530001/diff/7002/41008 File ...
10 years, 2 months ago (2010-10-05 16:11:23 UTC) #22
jrbarnette
My comments on the unit tests below. I have nothing specific regarding any single line ...
10 years, 2 months ago (2010-10-05 16:27:01 UTC) #23
jrbarnette
On 2010/10/05 16:11:23, Will Drewry wrote: [ ... ] > On 2010/10/05 15:51:06, jrbarnette wrote: ...
10 years, 2 months ago (2010-10-05 17:10:55 UTC) #24
Will Drewry
I changed the read_file behavior slightly and updated the unittests. PTAL :) http://codereview.chromium.org/3530001/diff/7002/41017 File developer_switch_unittest.cc ...
10 years, 2 months ago (2010-10-05 19:11:40 UTC) #25
jrbarnette
10 years, 2 months ago (2010-10-05 19:45:18 UTC) #26
Ah, this appears to be the end of it.

LGTM!

Powered by Google App Engine
This is Rietveld 408576698