History log of /external/vboot_reference/tests/run_cgpt_tests.sh
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d53b6684a2b451e41d9af84829b08a0c3325792f 15-Dec-2014 Nam T. Nguyen <namnguyen@chromium.org> cgpt: Rework number of entries calculation

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 <dehrenberg@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
3200401242aec1521e7c4a8b1906366fcabfb1a2 12-Dec-2014 Nam T. Nguyen <namnguyen@chromium.org> cgpt: Support non-standard (smaller) entries table

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 <wfrichar@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
ab899591808dd3e5f955ab7693b54a83389cd35f 14-Nov-2014 Nam T. Nguyen <namnguyen@chromium.org> vboot: cgpt: Treat drive_path as the GPT storage

Previously, "cgpt" called out to "flashrom" directly to read and write
NOR area. This CL removes that dependency and always treats "drive_path"
as the storage of GPT structs. This makes it consistent that whatever
device that cgpt reads from or writes to is always the device that
stores GPT structs. We only need to pass in the size of the drive that
contains the partitions, but we do not need to access to that drive.

More information is in the bug.

BUG=chromium:432611
BRANCH=none
TEST=unittest
CQ-DEPEND=CL:228942

Change-Id: Id0139adf70463cec4f2924de8b9a4725dbec822b
Reviewed-on: https://chromium-review.googlesource.com/229736
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
6ee52d9a929d00e871e7316240b54f381146fbc6 24-Oct-2014 Nam T. Nguyen <namnguyen@chromium.org> vboot: cgpt: Support writing GPT structs to NOR flash

This CL allows the GPT headers and partition entry arrays to be stored
in a NOR flash device. Instead of treating both the NOR and NAND devices
as one (in a sandwich way), this CL writes and reads the GPT structs
independently of the actual device that houses the partitions.
Therefore, the first usable LBA of the partitions will be at 0, and the
last usable LBA is at the end of the NAND.

+------------------------+
| NOR houses GPT structs |
+------------------------+
|
0 | Index into
v v
+------------------------+
| NAND houses partitions |
+------------------------+

Note that the "my_lba", "alternate_lba", "entries_lba" in the GPT headers
are no longer meaningful.

Consumers of cgptlib will have to set "stored_on_device" to either
GPT_STORED_ON_DEVICE or GPT_STORED_OFF_DEVICE, and "gpt_drive_sectors"
to the number of 512-byte sectors available to store GPT structs.

The NOR read and write operations are done by "flashrom".

BUG=chromium:425677
BRANCH=none
TEST=unittest
TEST=build with DEBUG, cgpt create/add/show on a stumpy-moblab

Change-Id: I083b3c94da3b0bb3da1a7b10c6969774080a2afd
Reviewed-on: https://chromium-review.googlesource.com/226800
Reviewed-by: Nam Nguyen <namnguyen@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
42c08cb2dac102509491810361e239fbde52b9e0 02-Apr-2013 Albert Chaulk <achaulk@chromium.org> Add MTD test script

So the quick & dirty hack is to just modify the cgpt command to be
cgpt -N=<MTD magic> <rest of the commands>

There are a couple limitations of the MTD command versions that will cause
them to always fail, so they're skipped if the second argument is empty - boot,
adding unknown GUIDs and more than 15 partitions.

BUG=chromium:221745
TEST=MTD version of run_cgpt_tests.sh passes
BRANCH=none

Original-Change-Id: Ida0debdefdc736f38e616801f6a40e67d393f405
Reviewed-on: https://gerrit.chromium.org/gerrit/47177
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
(cherry picked from commit 53fd488fc772e2ed964331fe98eaa21d2a1e471b)

Change-Id: Id7af245cc0e8c2dc00fe9ceab9ce0be0e47882ec
Reviewed-on: https://gerrit.chromium.org/gerrit/49796
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
da77e6953c96f9bb52a04dc32b337066144879aa 25-Aug-2012 Bill Richardson <wfrichar@chromium.org> cgpt: Fix error in modifying size of an existing partition

Modifying the size of an existing partition without modifying the start as
well assumed the start was at block 0. Sometimes it was caught, often it
wasn't.

Fix the error, add a test to catch the problem.

BUG=chrome-os-partner:13090
BRANCH=all
TEST=manual

make && make runtests

Change-Id: I4f5a5031a90a3e78d886ed3573f61305316a3f1f
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31418
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
263ffdfdd710a33a2a12ee33179f088292b2864f 24-Aug-2012 Bill Richardson <wfrichar@chromium.org> Rename $GPT as $CGPT, just for clarity.

I'm about to add a new test to fix some borkage with cgpt. First step is to
clean up the script a little bit.

BUG=none (yet)
BRANCH=all
TEST=manual

make && make runtests

Change-Id: I2311b5eb20aff80c4a0435cf1d10331c679af3c0
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31379
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
23429d3d782f7506fb4747356974294cce08ac47 30-Apr-2012 Bill Richardson <wfrichar@chromium.org> Let cgpt open devices in read-only mode when possible.

BUG=chromium-os:12430
TEST=manual

Running "make; make runtests" in src/platform/vboot_refererence will test
this change. Tests for use on a Chromebook are described in the bug report,
but will require a USB or SD card that has a physical write-protect switch.

Change-Id: I16a67bad3b59bec0981f4064f51fb1a29da65a90
Reviewed-on: https://gerrit.chromium.org/gerrit/21474
Tested-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
/external/vboot_reference/tests/run_cgpt_tests.sh
3430b32667937a75c7a3afc83f8f7a601a8187f7 29-Nov-2010 Bill Richardson <wfrichar@chromium.org> Add 'prioritize' command to cgpt tool.

This lets us reorder the priority of all the kernel partitions with a single
command, instead of a bunch of complicated and error-prone shell script
logic.

Change-Id: I21d39763ec5a748488d5319a987bcfe7c34ce4d0

BUG=chromium-os:9167
TEST=manual

In the chroot, do this:

cd ~/trunk/src/platform/vboot_reference
make
make runtests
make clean

Everything should pass.

Review URL: http://codereview.chromium.org/5352005
/external/vboot_reference/tests/run_cgpt_tests.sh
8b7baafee194d83e9fdb29006f3d8e235d4e114b 08-Sep-2010 Gaurav Shah <gauravsh@chromium.org> Fix autotest Makefile for vboot_reference.

Update list of scripts and test binaries - slightly more involved since the test runner scripts and the test binaries themselves reside in different directories.

BUG=none
TEST=manual (Ran make, went into the tests/ directory and ran the tests)

Change-Id: I97bd36d806726f6005e35490173cfcd0300add95

Review URL: http://codereview.chromium.org/3326014
/external/vboot_reference/tests/run_cgpt_tests.sh
793e1b41563a3dc580dc1fc0030ebebbe039835d 20-Aug-2010 Bill Richardson <wfrichar@chromium.org> Run the cgpt tests in a separate directory.

I'm getting ready to add a bunch more cgpt tests. This is just to clear the
way.

Change-Id: I5cb781e85938b94da9c59528872ddfd386712726

Review URL: http://codereview.chromium.org/3162023
/external/vboot_reference/tests/run_cgpt_tests.sh
70e9509a2748c0ee8646d77f2a0e6fcbb1446505 15-Jun-2010 vbendeb <vbendeb@chromium.org> Rework the vboot_reference make system.

After this change the generated files are placed in a
separate tree (such thet they don't show in the
`git status' output anymore) and the dependencies are
followed properly (if a .h file changes the
appropriate .o files and apps get rebuilt).

Tested as follows:

> $ make clean
> $ make # build succeeds
> $ git status # shows clean directory
> $ RUNTESTS=1 make # (captured test output matches that of the test run before any changes)
> $ touch ./vboot_firmware/include/tlcl.h
> $ make # make succeeds
> $ find build -type f -newer ./vboot_firmware/include/tlcl.h
build/vboot_firmware/lib/rollback_index.o
build/vboot_firmware/lib/rollback_index.o.d
build/vboot_firmware/a.out
build/vboot_fw.a
build/utility/vbutil_key
build/utility/kernel_utility.d
build/utility/vbutil_key.d
build/utility/verify_data
build/utility/load_kernel_test.d
build/utility/vbutil_keyblock.d
build/utility/vbutil_kernel
build/utility/vbutil_kernel.d
build/utility/firmware_utility
build/utility/signature_digest_utility.d
build/utility/kernel_utility
build/utility/verify_data.d
build/utility/vbutil_keyblock
build/utility/signature_digest_utility
build/utility/load_kernel_test
build/utility/firmware_utility.d
build/tests/vboot_common3_tests
build/tests/vboot_common2_tests
build/host/a.out
$ >

Review URL: http://codereview.chromium.org/2845001
/external/vboot_reference/tests/run_cgpt_tests.sh
f1372d9109d638fbb1a177a89ebaf64e7ee0637e 11-Jun-2010 Bill Richardson <wfrichar@chromium.org> Nearly complete rewrite of cgpt tool.

This fixes a number of bugs, adds a bunch of commands, and essentially makes
cgpt ready to use as a replacement for gpt. Still to do is to add commands
and options that will let it generated intentionally bad partitions, for use
in testing.

Review URL: http://codereview.chromium.org/2719008
/external/vboot_reference/tests/run_cgpt_tests.sh