<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/coreboot/vboot.git, branch stabilize-6662.B</title>
<subtitle>review.coreboot.org: vboot.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/'/>
<entry>
<title>vboot2: Introduce vb2ex_hwcrypto API</title>
<updated>2015-01-06T23:43:30+00:00</updated>
<author>
<name>Julius Werner</name>
<email>jwerner@chromium.org</email>
</author>
<published>2014-12-17T03:24:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=f10e9099286202f83ce4c1dc5ef1e85fcb5ccde7'/>
<id>f10e9099286202f83ce4c1dc5ef1e85fcb5ccde7</id>
<content type='text'>
This patch extends the vboot2 API by three callback functions that the
platform firmware may implement to offer hardware crypto engine support.
For now we only support this for hash algorithms, and we will only allow
it for firmware body hashes (not the keyblock or preamble which are too
small to matter execution-time-wise anyway). The API is similar to the
vb2api_*_hash() functions used to start body hashing in the first place,
but we still take this round trip through vboot to allow it to do
key/signature management and retain full control of the verification
process. We also add a new preamble flag to explicitly disable this
feature, so that we can later return to a solely software-based
verification path through a firmware update in case a hardware crypto
engine turns out to be insecure.

CQ-DEPEND=CL:236435
BRANCH=None
BUG=chrome-os-partner:32987
TEST='make runtests VBOOT2=1'. Manually booted on Pinky with and without
HW crypto support and with the preamble flag set to confirm expected
behavior. lib21/ parts untested except for compiling and new unit tests.

Change-Id: I17c7d02f392089875a5942a5aafcf6a657354863
Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/236453
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch extends the vboot2 API by three callback functions that the
platform firmware may implement to offer hardware crypto engine support.
For now we only support this for hash algorithms, and we will only allow
it for firmware body hashes (not the keyblock or preamble which are too
small to matter execution-time-wise anyway). The API is similar to the
vb2api_*_hash() functions used to start body hashing in the first place,
but we still take this round trip through vboot to allow it to do
key/signature management and retain full control of the verification
process. We also add a new preamble flag to explicitly disable this
feature, so that we can later return to a solely software-based
verification path through a firmware update in case a hardware crypto
engine turns out to be insecure.

CQ-DEPEND=CL:236435
BRANCH=None
BUG=chrome-os-partner:32987
TEST='make runtests VBOOT2=1'. Manually booted on Pinky with and without
HW crypto support and with the preamble flag set to confirm expected
behavior. lib21/ parts untested except for compiling and new unit tests.

Change-Id: I17c7d02f392089875a5942a5aafcf6a657354863
Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/236453
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nand: Allow smaller disks for booting a kernel</title>
<updated>2015-01-06T01:18:56+00:00</updated>
<author>
<name>Dan Ehrenberg</name>
<email>dehrenberg@chromium.org</email>
</author>
<published>2015-01-05T21:05:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=f47eccf65b05ebab7f3f24c14a09aceb442e08fc'/>
<id>f47eccf65b05ebab7f3f24c14a09aceb442e08fc</id>
<content type='text'>
When vboot eliminates trivially small disks, it checks the GPT size for
external GPT disks. For upcoming NAND devices, the GPT size is 8kB. This
patch changes the definition of trivially small disks to be those under
8kB so that NAND can be booted from.

BUG=chromium:433433
TEST=make runalltests
TEST=Booted and saw a kernel from NAND selected on from an 8kB GPT.
BRANCH=none

Change-Id: I5047b9b642d564d5e4d77dd0b6dafb9eea09176a
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/238463
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When vboot eliminates trivially small disks, it checks the GPT size for
external GPT disks. For upcoming NAND devices, the GPT size is 8kB. This
patch changes the definition of trivially small disks to be those under
8kB so that NAND can be booted from.

BUG=chromium:433433
TEST=make runalltests
TEST=Booted and saw a kernel from NAND selected on from an 8kB GPT.
BRANCH=none

Change-Id: I5047b9b642d564d5e4d77dd0b6dafb9eea09176a
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/238463
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nand: vboot support for small GPTs</title>
<updated>2015-01-05T20:35:56+00:00</updated>
<author>
<name>Dan Ehrenberg</name>
<email>dehrenberg@chromium.org</email>
</author>
<published>2015-01-02T22:39:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=f3f7fca07fbcb6bb9655a71257f09c71b0a1458d'/>
<id>f3f7fca07fbcb6bb9655a71257f09c71b0a1458d</id>
<content type='text'>
This patch makes some small modifications to cgpt and vboot to
root out the last vestigates of a fixed 128-entry GPT:
- Get rid of the TOTAL_ENTRIES_SIZE constant and all users.
- Reduce MAX_NUMBER_OF_ENTRIES to 128 (which is what the GPT
  spec specifies) so that this can be used for things like memory
  allocations without additional overhead.
- Base the amount of GPT read/written on the number of entries
  specified in the GPT header on disk/flash.

BUG=chromium:433433
TEST=make runalltests
TEST=Modified fmap to make an 8k RW_GPT, wrote a GPT with cgpt, then
rebooted and found that the GPT was correctly read after restarting
and the appropriate mtd partitions were present.
BRANCH=none

Change-Id: I45317377da20259caf04a7a4fa077a892b03c45f
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/238245
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes some small modifications to cgpt and vboot to
root out the last vestigates of a fixed 128-entry GPT:
- Get rid of the TOTAL_ENTRIES_SIZE constant and all users.
- Reduce MAX_NUMBER_OF_ENTRIES to 128 (which is what the GPT
  spec specifies) so that this can be used for things like memory
  allocations without additional overhead.
- Base the amount of GPT read/written on the number of entries
  specified in the GPT header on disk/flash.

BUG=chromium:433433
TEST=make runalltests
TEST=Modified fmap to make an 8k RW_GPT, wrote a GPT with cgpt, then
rebooted and found that the GPT was correctly read after restarting
and the appropriate mtd partitions were present.
BRANCH=none

Change-Id: I45317377da20259caf04a7a4fa077a892b03c45f
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/238245
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: Handle GBB_FLAG_DISABLE_LID_SHUTDOWN</title>
<updated>2014-12-17T03:27:17+00:00</updated>
<author>
<name>Shawn Nematbakhsh</name>
<email>shawnn@chromium.org</email>
</author>
<published>2014-12-12T17:40:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=5d652cdffa70dc772e80548a760e1f0d67de273f'/>
<id>5d652cdffa70dc772e80548a760e1f0d67de273f</id>
<content type='text'>
Handle GBB_FLAG_DISABLE_LID_SHUTDOWN to disable lid-triggered system
shutdown.

BUG=chromium:434462
BRANCH=Auron
TEST=Manual on Auron, with corresponding depthcharge change. Set GBB
flag 0x1000 and disable powerd launch on boot. Close lid and issue
'reboot' command over ssh. Verify system reboots successfully into OS.

Change-Id: Id2731508296a5ba9229f969f8224565d64f3d4a3
Signed-off-by: Shawn Nematbakhsh &lt;shawnn@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234995
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handle GBB_FLAG_DISABLE_LID_SHUTDOWN to disable lid-triggered system
shutdown.

BUG=chromium:434462
BRANCH=Auron
TEST=Manual on Auron, with corresponding depthcharge change. Set GBB
flag 0x1000 and disable powerd launch on boot. Close lid and issue
'reboot' command over ssh. Verify system reboots successfully into OS.

Change-Id: Id2731508296a5ba9229f969f8224565d64f3d4a3
Signed-off-by: Shawn Nematbakhsh &lt;shawnn@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234995
Reviewed-by: Randall Spangler &lt;rspangler@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cgpt: Rework number of entries calculation</title>
<updated>2014-12-16T01:28:48+00:00</updated>
<author>
<name>Nam T. Nguyen</name>
<email>namnguyen@chromium.org</email>
</author>
<published>2014-12-15T19:03:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=d53b6684a2b451e41d9af84829b08a0c3325792f'/>
<id>d53b6684a2b451e41d9af84829b08a0c3325792f</id>
<content type='text'>
As pointed out by Daniel in CL:234996, the half_size_sectors should have
been checked in both places.

This CL reworks that part of the code to read easier.

BUG=none
BRANCH=none
TEST=unittest

Change-Id: I8faea3b094c375e4fd1a604a8fe759af88943fdf
Reviewed-on: https://chromium-review.googlesource.com/235792
Reviewed-by: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
Tested-by: Nam Nguyen &lt;namnguyen@chromium.org&gt;
Commit-Queue: Nam Nguyen &lt;namnguyen@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As pointed out by Daniel in CL:234996, the half_size_sectors should have
been checked in both places.

This CL reworks that part of the code to read easier.

BUG=none
BRANCH=none
TEST=unittest

Change-Id: I8faea3b094c375e4fd1a604a8fe759af88943fdf
Reviewed-on: https://chromium-review.googlesource.com/235792
Reviewed-by: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
Tested-by: Nam Nguyen &lt;namnguyen@chromium.org&gt;
Commit-Queue: Nam Nguyen &lt;namnguyen@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: Plumb the two disk sizes and external GPT param through</title>
<updated>2014-12-15T22:44:33+00:00</updated>
<author>
<name>Dan Ehrenberg</name>
<email>dehrenberg@chromium.org</email>
</author>
<published>2014-12-02T16:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=3f4d8d05ba4e32990c8584bd47cdf082d4604232'/>
<id>3f4d8d05ba4e32990c8584bd47cdf082d4604232</id>
<content type='text'>
This patch reinstates the external GPT support which was previously
committed and reverted. Improvements since last time include:
- Cleaned-up internal interface based on code review
- Function correctly on legacy bootloaders (e.g., depthcharge before
  NAND-related patches are added)
- Better comments
- Treat new field values = 0 -&gt; not use new feature
- Tests are added to ensure external GPT flag is passed down properly
The original commit had change-id
I5a77e417aea8ee9442d18c200d1b073aa5375ecf
Its commit message is reproduced below, and then an additional test.
----
To support an external GPT, disks have two new attributes:
- A binary flag indicating whether the GPT is in the same address
  space as the payloads or a separate one.
- The number of sectors of the streaming portion of storage, as
  opposed to the portion containing the GPT.
These have been added elsewhere to GptData (in cgptlib) and BlockDev
(in depthcharge). This patch adds the plumbing between those, including
in the DiskInfo interface between the firmware and vboot.
BUG=chromium:425677
BRANCH=none
TEST=Interactively wrote the GPT with cgpt and observed the following
boot with depthcharge to read the GPT from SPI and then read from
the proper locations in NAND flash.
TEST=make runalltests passes.
TEST=boots from USB with depthcharge from HEAD.

Change-Id: Ia7956517a7b9da0301f01fac5a10204f6d78cf4f
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234640
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch reinstates the external GPT support which was previously
committed and reverted. Improvements since last time include:
- Cleaned-up internal interface based on code review
- Function correctly on legacy bootloaders (e.g., depthcharge before
  NAND-related patches are added)
- Better comments
- Treat new field values = 0 -&gt; not use new feature
- Tests are added to ensure external GPT flag is passed down properly
The original commit had change-id
I5a77e417aea8ee9442d18c200d1b073aa5375ecf
Its commit message is reproduced below, and then an additional test.
----
To support an external GPT, disks have two new attributes:
- A binary flag indicating whether the GPT is in the same address
  space as the payloads or a separate one.
- The number of sectors of the streaming portion of storage, as
  opposed to the portion containing the GPT.
These have been added elsewhere to GptData (in cgptlib) and BlockDev
(in depthcharge). This patch adds the plumbing between those, including
in the DiskInfo interface between the firmware and vboot.
BUG=chromium:425677
BRANCH=none
TEST=Interactively wrote the GPT with cgpt and observed the following
boot with depthcharge to read the GPT from SPI and then read from
the proper locations in NAND flash.
TEST=make runalltests passes.
TEST=boots from USB with depthcharge from HEAD.

Change-Id: Ia7956517a7b9da0301f01fac5a10204f6d78cf4f
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234640
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cgpt: Support non-standard (smaller) entries table</title>
<updated>2014-12-12T23:15:08+00:00</updated>
<author>
<name>Nam T. Nguyen</name>
<email>namnguyen@chromium.org</email>
</author>
<published>2014-12-12T17:38:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=3200401242aec1521e7c4a8b1906366fcabfb1a2'/>
<id>3200401242aec1521e7c4a8b1906366fcabfb1a2</id>
<content type='text'>
The standard says that entries table must be at least 16384 bytes. On
some of our devices, the NOR section is only 8 KiB and used to store
both primary and secondary tables. On this device, we can only store 24
entries.

Therefore, this CL adds support for non-standard entry table. It adjusts
the MIN_NUMBER_OF_ENTRIES to 16, and replaces GPT_ENTRIES_SECTORS with
CalculateEntriesSectors.

BUG=chromium:441812
BRANCH=none
TEST=unittest

Change-Id: I6b85b35ce5612c7abb22142f8252bd0d45b676c5
Reviewed-on: https://chromium-review.googlesource.com/234996
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Commit-Queue: Nam Nguyen &lt;namnguyen@chromium.org&gt;
Tested-by: Nam Nguyen &lt;namnguyen@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard says that entries table must be at least 16384 bytes. On
some of our devices, the NOR section is only 8 KiB and used to store
both primary and secondary tables. On this device, we can only store 24
entries.

Therefore, this CL adds support for non-standard entry table. It adjusts
the MIN_NUMBER_OF_ENTRIES to 16, and replaces GPT_ENTRIES_SECTORS with
CalculateEntriesSectors.

BUG=chromium:441812
BRANCH=none
TEST=unittest

Change-Id: I6b85b35ce5612c7abb22142f8252bd0d45b676c5
Reviewed-on: https://chromium-review.googlesource.com/234996
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Commit-Queue: Nam Nguyen &lt;namnguyen@chromium.org&gt;
Tested-by: Nam Nguyen &lt;namnguyen@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: Move IsEntryUnused to gpt_misc</title>
<updated>2014-12-12T21:37:58+00:00</updated>
<author>
<name>Dan Ehrenberg</name>
<email>dehrenberg@chromium.org</email>
</author>
<published>2014-11-21T23:44:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=32a999d2c0e5bf8a1c0f6141d3db77a1dcc6f5af'/>
<id>32a999d2c0e5bf8a1c0f6141d3db77a1dcc6f5af</id>
<content type='text'>
Over in depthcharge, IsEntryUnused will be useful for presenting the
partition table to the kernel. This patch moves that function to
gpt_misc.[ch] for export to depthcharge.

TEST=Booted a kernel on NAND with all this compiled in
TEST=make runtests passed
BRANCH=none
BUG=none

Signed-off-by: Dan Ehrenberg &lt;dehrenberg@google.com&gt;
Change-Id: I56445d1a420fec4d8385ddffc5469b7d77eab576
Reviewed-on: https://chromium-review.googlesource.com/231455
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Commit-Queue: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
Tested-by: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Over in depthcharge, IsEntryUnused will be useful for presenting the
partition table to the kernel. This patch moves that function to
gpt_misc.[ch] for export to depthcharge.

TEST=Booted a kernel on NAND with all this compiled in
TEST=make runtests passed
BRANCH=none
BUG=none

Signed-off-by: Dan Ehrenberg &lt;dehrenberg@google.com&gt;
Change-Id: I56445d1a420fec4d8385ddffc5469b7d77eab576
Reviewed-on: https://chromium-review.googlesource.com/231455
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Commit-Queue: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
Tested-by: Daniel Ehrenberg &lt;dehrenberg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: GPT interface cleanup</title>
<updated>2014-12-11T03:12:14+00:00</updated>
<author>
<name>Dan Ehrenberg</name>
<email>dehrenberg@chromium.org</email>
</author>
<published>2014-12-09T21:42:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=b3d38f5c620da89662deb1a08971c5025d6c1132'/>
<id>b3d38f5c620da89662deb1a08971c5025d6c1132</id>
<content type='text'>
- Rename drive_sectors to streaming_drive_sectors, to contrast with
  gpt_drive_sectors
- Replace stored_on_device field with flags field for future
  extensibility

BUG=chromium:433433
TEST=make runtests
BRANCH=none

Change-Id: I785a3b735b8eb96f647a334659329db3ee43eb80
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234283
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Rename drive_sectors to streaming_drive_sectors, to contrast with
  gpt_drive_sectors
- Replace stored_on_device field with flags field for future
  extensibility

BUG=chromium:433433
TEST=make runtests
BRANCH=none

Change-Id: I785a3b735b8eb96f647a334659329db3ee43eb80
Signed-off-by: Dan Ehrenberg &lt;dehrenberg@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/234283
Reviewed-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow /etc/defaults/vboot_reference to customise some utilities</title>
<updated>2014-12-06T01:11:42+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-12-04T19:29:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=cfe83a827d40b310003fc6996b9978d8cf301444'/>
<id>cfe83a827d40b310003fc6996b9978d8cf301444</id>
<content type='text'>
The dev_debug_vboot program can sometimes interfere with
automated firmware testing because it takes too long to read the
BIOS flash. Limiting the sections of flash that are read may
help, but in some cases skipping this program entirely may be
better.

This CL does three things:

1. dev_debug_vboot will read only some sections of the BIOS
   flash, falling back to reading the whole thing only if it
   fails at that.

2. dev_debug_vboot will source /etc/default/vboot_reference if it
   exists. Putting DEV_DEBUG_FORCE=1 in that file will prevent
   dev_debug_vboot from reading the flash at all unless it's
   invoked with --force option.

3. The Makefile will create the /etc/default/vboot_reference file
   in the install directory, setting DEV_DEBUG_FORCE to the value
   in effect at build time. This will let a future CL change the
   default behavior for each target.

BUG=chromium:438854
BRANCH=none
TEST=manual

Built and tested on Samus. /etc/default/vboot_reference was
present, containing "DEV_DEBUG_FORCE=". The dev_debug_vboot
script ran normally.

Manually changing /etc/default/vboot_reference to contain
"DEV_DEBUG_FORCE=1" and rebooting caused dev_debug_vboot to stop
before reading the BIOS flash.

I also manually forced various flashrom invocations to fail to
test each part of the new flow.

Change-Id: Ib319dd16b9026162d01f435f15570ec8ba99c512
Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/233228
Reviewed-by: David Hendricks &lt;dhendrix@chromium.org&gt;
Reviewed-by: Stefan Reinauer &lt;reinauer@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dev_debug_vboot program can sometimes interfere with
automated firmware testing because it takes too long to read the
BIOS flash. Limiting the sections of flash that are read may
help, but in some cases skipping this program entirely may be
better.

This CL does three things:

1. dev_debug_vboot will read only some sections of the BIOS
   flash, falling back to reading the whole thing only if it
   fails at that.

2. dev_debug_vboot will source /etc/default/vboot_reference if it
   exists. Putting DEV_DEBUG_FORCE=1 in that file will prevent
   dev_debug_vboot from reading the flash at all unless it's
   invoked with --force option.

3. The Makefile will create the /etc/default/vboot_reference file
   in the install directory, setting DEV_DEBUG_FORCE to the value
   in effect at build time. This will let a future CL change the
   default behavior for each target.

BUG=chromium:438854
BRANCH=none
TEST=manual

Built and tested on Samus. /etc/default/vboot_reference was
present, containing "DEV_DEBUG_FORCE=". The dev_debug_vboot
script ran normally.

Manually changing /etc/default/vboot_reference to contain
"DEV_DEBUG_FORCE=1" and rebooting caused dev_debug_vboot to stop
before reading the BIOS flash.

I also manually forced various flashrom invocations to fail to
test each part of the new flow.

Change-Id: Ib319dd16b9026162d01f435f15570ec8ba99c512
Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/233228
Reviewed-by: David Hendricks &lt;dhendrix@chromium.org&gt;
Reviewed-by: Stefan Reinauer &lt;reinauer@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
