New issue
Advanced search Search tips

Issue 834237 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: A python based GPT tool.

Project Member Reported by hungte@chromium.org, Apr 18 2018

Issue description

Currently Chrome OS imaging relies on cgpt, which is a dynamically linked C program without good LBA support.

And it's a problem when we want to deploy the factory process, setup scripts to partners, who may be using a X86-32 Ubuntu machine.

The early effort has been done in https://chromium-review.googlesource.com/477814, which implements a Python module that can read and parse GPT header and partition records, but it didn't support any 'modify' commands like add/create.

This issue is reviewed again when we're working on  issue 738360 , which tries to simplify and unify all the tools for setting up Chrome OS factory software environment. It seems more clear now it would be more convenient if there's a Python based GPT tool.

And the last related issue is  issue 832160 , which requests for adding block size support in the GPT tool.

With all the issues above, it comes more clear we should extend pygpt into a full cgpt replacement.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6977ae122eb32ecd23914d97ecb1436dfb846189

commit 6977ae122eb32ecd23914d97ecb1436dfb846189
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Apr 20 14:12:25 2018

pygpt: Support taking path argument for LoadFromFile.

The LoadFromFile takes a file stream which is not convenient for most
use cases outside pygpt. Changed to support both file stream or a string
path.

BUG= chromium:834237 
TEST=make test

Change-Id: I7f1f3ad009546b9aca4dfaa72c658fdea5887de0
Reviewed-on: https://chromium-review.googlesource.com/1013450
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/6977ae122eb32ecd23914d97ecb1436dfb846189/py/tools/image_tool.py
[modify] https://crrev.com/6977ae122eb32ecd23914d97ecb1436dfb846189/py/utils/pygpt.py
[modify] https://crrev.com/6977ae122eb32ecd23914d97ecb1436dfb846189/py/utils/sys_utils.py

Project Member

Comment 2 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d3a2e9a6f77942f3828cc54151d892c9abdb8bda

commit d3a2e9a6f77942f3828cc54151d892c9abdb8bda
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Apr 20 14:12:26 2018

pygpt: Correct Resize calculation.

When resizing, we should keep FirstUsableLBA unchanged. There is no
reason to enlarge partition table sections by looking at the gap between
partition entries and first usable LBA. And for backup partitions, there
is also no reason to pad more blocks.

As a result, the calculation should be pretty simple:
 1. Find new Backup LBA (as total blocks - 1).
 2. Calculate the LastUsableLBA by BackupLBA - size of backup partition table.
 3. Make sure the new LastUsable LBA is not less than any partition's LastLBA.

By the new algorithm, GetMinUsedLBA is not needed. Also GetMaxUsedLBA
should look at any partitions (even if there are unused partitions
before it) that has claimed space (i.e., TYPE_GUID is not UNUSED).

BUG= chromium:834237 
TEST=make test

Change-Id: I70a9d59bc34b4dea02dfc9aa718e167dcc35970d
Reviewed-on: https://chromium-review.googlesource.com/1018741
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/d3a2e9a6f77942f3828cc54151d892c9abdb8bda/py/utils/pygpt.py

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/49ac3c2f6c53c73fae0abb3a08a7b9d995302909

commit 49ac3c2f6c53c73fae0abb3a08a7b9d995302909
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Apr 20 19:57:03 2018

pygpt: Extend named tuple objects into more useful objects with properties.

The raw implementation of pygpt.GPT is exposing objects in pure named
tuples, which makes it pretty hard to use since every pygpt user (for
example image_tool) has to implement the logic of LBA calculation,
encoding and decoding of UTF-16 strings, GUID conversion, ... etc.

This change tries to enhance the named tuple classes by extending
helpful properties in derived classes, making it more similar to the
Partition object defined in image_tool.

Additionally, as discovered in image_tool.Partition, the GPT objects may
need more information that is not available in GPT, for instance disk
image file name or block size. This is solved by the __dict__ in
GPTObject objects and maintained in Clone and ReadFrom.

With all these changes, we can now largely simplify the manipulation of
GPT objects using the help functions and properties.

BUG= chromium:834237 
TEST=make test

Change-Id: I3f3ca55fb50efc503851c493aa4ccb279029e6d8
Reviewed-on: https://chromium-review.googlesource.com/1013451
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/49ac3c2f6c53c73fae0abb3a08a7b9d995302909/py/utils/pygpt_unittest.py
[modify] https://crrev.com/49ac3c2f6c53c73fae0abb3a08a7b9d995302909/py/tools/image_tool.py
[modify] https://crrev.com/49ac3c2f6c53c73fae0abb3a08a7b9d995302909/py/utils/pygpt.py
[modify] https://crrev.com/49ac3c2f6c53c73fae0abb3a08a7b9d995302909/py/utils/sys_utils.py

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/4dfd330efa5f49530f4cb27bc9a1baa4f3a28ba8

commit 4dfd330efa5f49530f4cb27bc9a1baa4f3a28ba8
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Apr 20 19:57:04 2018

pygpt: Change all exceptions to GPTError.

To make it easier for tracking, changing all runtime exceptions to
GPTError.

BUG= chromium:834237 
TEST=make test

Change-Id: I1d1bb2f69d858808d14ef0740a488cd8af37ac51
Reviewed-on: https://chromium-review.googlesource.com/1013452
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/4dfd330efa5f49530f4cb27bc9a1baa4f3a28ba8/py/utils/pygpt.py

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5cb0c317116d4363a5348e26ef8b38e856cf679d

commit 5cb0c317116d4363a5348e26ef8b38e856cf679d
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Apr 20 19:57:05 2018

pygpt: Change sub command so it can be reused by other commands.

Revise pygpt sub command system so it's more like image_tool, and can be
invoked directly from image_tool.

The ultimate goal will be to invoke pygpt as python module within
image_tool without shell execution.

BUG= chromium:834237 
TEST=make test

Change-Id: I62c746409302f6ec9a8bf3345d8317b6abe32ebb
Reviewed-on: https://chromium-review.googlesource.com/1013453
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/5cb0c317116d4363a5348e26ef8b38e856cf679d/py/tools/image_tool.py
[modify] https://crrev.com/5cb0c317116d4363a5348e26ef8b38e856cf679d/py/utils/pygpt.py

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6c3575a6329841be8ff6ca37d148312438529c56

commit 6c3575a6329841be8ff6ca37d148312438529c56
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 24 07:29:59 2018

pygpt: Add 'create' command.

The 'cgpt create' command initialized a new GPT header and need to do
same thing in pygpt.

BUG= chromium:834237 
TEST=make test

Change-Id: I963fda9e41c67b00794216add1f1424bc84caaaa
Reviewed-on: https://chromium-review.googlesource.com/1013454
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/6c3575a6329841be8ff6ca37d148312438529c56/py/utils/pygpt_unittest.py
[modify] https://crrev.com/6c3575a6329841be8ff6ca37d148312438529c56/py/utils/pygpt.py

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c6e009c2c09a8cd200c6f45b9604620c807922ec

commit c6e009c2c09a8cd200c6f45b9604620c807922ec
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 24 07:30:00 2018

pygpt: Add 'boot' command and support PMBR.

The 'boot' command is introduced from cgpt to manipulate PMBR and boot records.

BUG= chromium:834237 
TEST=make test

Change-Id: I21862bdfe7a8b65aced89b59395490f0cbb345ae
Reviewed-on: https://chromium-review.googlesource.com/1013455
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/c6e009c2c09a8cd200c6f45b9604620c807922ec/py/utils/pygpt_unittest.py
[modify] https://crrev.com/c6e009c2c09a8cd200c6f45b9604620c807922ec/py/utils/pygpt.py

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c34d89c3264a1f2cd351d3fde9de49f21fedab8c

commit c34d89c3264a1f2cd351d3fde9de49f21fedab8c
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 24 20:31:18 2018

pygpt: Add 'legacy' command.

Add 'legacy' command, which also introduced the 'is_secondary' property.

The legacy command switches GPT primary header signatures and also
allows making it 'ignored'.

BUG= chromium:834237 
TEST=make test

Change-Id: I7cbbce60ae0760911a3f012a3c6764c5da0e40a3
Reviewed-on: https://chromium-review.googlesource.com/1013456
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/c34d89c3264a1f2cd351d3fde9de49f21fedab8c/py/utils/pygpt_unittest.py
[modify] https://crrev.com/c34d89c3264a1f2cd351d3fde9de49f21fedab8c/py/utils/pygpt.py

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/fcd1a8d4c075a2db5f60179bce8a8dc331a5bd66

commit fcd1a8d4c075a2db5f60179bce8a8dc331a5bd66
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 24 20:31:19 2018

pygpt: Add 'add' command.

The 'add' is the most powerful command that can add, change, or delete a
partition entry.

BUG= chromium:834237 
TEST=make test

Change-Id: Ib22a9892114d79778d61161435b189c27fd71565
Reviewed-on: https://chromium-review.googlesource.com/1015040
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/fcd1a8d4c075a2db5f60179bce8a8dc331a5bd66/py/utils/pygpt_unittest.py
[modify] https://crrev.com/fcd1a8d4c075a2db5f60179bce8a8dc331a5bd66/py/utils/pygpt.py

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/9f6165fc94fc8f9fa63e851c74ec234d99095c5f

commit 9f6165fc94fc8f9fa63e851c74ec234d99095c5f
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 25 21:40:38 2018

tools: image_tool: Replace cgpt by pygpt.

Invoke pygpt as python module or as standalone utility. This helps
preventing dependency on `cgpt` utility and is more flexible.

BUG= chromium:738360 , chromium:834237 
TEST=make test; bundle/setup/image_tool preflash -o disk.bin

Change-Id: Ie49d7dbce16e6821d17dfd3c16a1d8aadfa97c7e
Reviewed-on: https://chromium-review.googlesource.com/1013437
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/9f6165fc94fc8f9fa63e851c74ec234d99095c5f/py/tools/image_tool.py

Project Member

Comment 11 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/fe724f8fbf7fd73f06a36f29fd959ba481b9bf44

commit fe724f8fbf7fd73f06a36f29fd959ba481b9bf44
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 25 21:40:38 2018

pygpt: Add 'prioritize' command.

The 'prioritize' command alters 'priority' partition attribute.

BUG= chromium:834237 
TEST=make test

Change-Id: I31acbe283392985fba530521f7d0d3cbe821e84b
Reviewed-on: https://chromium-review.googlesource.com/1016227
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/fe724f8fbf7fd73f06a36f29fd959ba481b9bf44/py/utils/pygpt_unittest.py
[modify] https://crrev.com/fe724f8fbf7fd73f06a36f29fd959ba481b9bf44/py/utils/pygpt.py

Project Member

Comment 12 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/f641d301f303b452c2e5d57b696bbcd1784979b1

commit f641d301f303b452c2e5d57b696bbcd1784979b1
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 25 21:40:39 2018

pygpt: Add 'find' command.

The 'find' provides a way for scripts to scan and find partitions,
especially to find the kernel partition by boot GUID.

BUG= chromium:834237 
TEST=make test

Change-Id: Ib61f0aa60eab95a3cbd1b9a6b759f0e2aa000e93
Reviewed-on: https://chromium-review.googlesource.com/1016228
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/f641d301f303b452c2e5d57b696bbcd1784979b1/py/utils/pygpt_unittest.py
[modify] https://crrev.com/f641d301f303b452c2e5d57b696bbcd1784979b1/py/utils/pygpt.py

Status: Fixed (was: Started)
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c51966869479afe06611a952913925938c6d0007

commit c51966869479afe06611a952913925938c6d0007
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sat Apr 28 01:05:19 2018

pygpt: Replace GetValidPartitions() by GetUsedPartitions().

The GetValidPartitions() is confusing because most other GPT tools don't
really stop processing when reached first empty (unused) entry.

We should change that to GetUsedPartitions(), especially Partition
objects now have meta 'number' so it is still possible to track back
the location in partition table.

BUG= chromium:834237 
TEST=make test

Change-Id: I3234243ff88abfdee60d982cbd471e3301e9b816
Reviewed-on: https://chromium-review.googlesource.com/1017720
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/c51966869479afe06611a952913925938c6d0007/py/utils/pygpt_unittest.py
[modify] https://crrev.com/c51966869479afe06611a952913925938c6d0007/py/tools/image_tool.py
[modify] https://crrev.com/c51966869479afe06611a952913925938c6d0007/py/utils/pygpt.py
[modify] https://crrev.com/c51966869479afe06611a952913925938c6d0007/py/utils/sys_utils.py

Project Member

Comment 15 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5f0dea47f887f0a8ad088635112a6ab3ca906346

commit 5f0dea47f887f0a8ad088635112a6ab3ca906346
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu May 03 05:20:32 2018

pygpt: Revise by adding partition number (NR) based API.

When talking about the partition entries, most programs will refer that
by 1-based "number of record (NR)". In PyGPT, partitions were stored in
a list and that makes accessing to partition in GPT requires a 0-based
index, and leaving lots of "number - 1" calculation everywhere.

As learned from image_tool, it is more natural to access partitions
using number (NR) so we are adding GetPartition to fetch partition
objects using 1-based number, and a new UpdatePartition that also looks
at number to find the location to update.
Also changed ExpandPartition to take number for input argument.

Note in GPT.Partition, there is a meta value for partition number so we
don't need to explicitly specify number again in UpdatePartition if we
want to update partition back to same location.

BUG= chromium:834237 
TEST=make test

Change-Id: Ieceeb83183fffb315e0509b97cabe1f71efcb28e
Reviewed-on: https://chromium-review.googlesource.com/1017721
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/5f0dea47f887f0a8ad088635112a6ab3ca906346/py/utils/pygpt_unittest.py
[modify] https://crrev.com/5f0dea47f887f0a8ad088635112a6ab3ca906346/py/tools/image_tool.py
[modify] https://crrev.com/5f0dea47f887f0a8ad088635112a6ab3ca906346/py/utils/pygpt.py
[modify] https://crrev.com/5f0dea47f887f0a8ad088635112a6ab3ca906346/py/utils/sys_utils.py

Project Member

Comment 16 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/3b4916735d0bf3bf7494f3a9e6b3254c8ffa6c79

commit 3b4916735d0bf3bf7494f3a9e6b3254c8ffa6c79
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu May 03 05:20:33 2018

pygpt: Check header and partition table integrity.

Add 'CheckIntegrity' function to make sure no partitions overlap with
each other, also there is no CRC error.

BUG= chromium:834237 
TEST=make test

Change-Id: Ida374bd0004a077732b08c82faad4d21909b209f
Reviewed-on: https://chromium-review.googlesource.com/1017722
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/3b4916735d0bf3bf7494f3a9e6b3254c8ffa6c79/py/utils/pygpt.py

Project Member

Comment 17 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/bf8aa27f8f8eea1a72fa75c430846c5a580cd9b4

commit bf8aa27f8f8eea1a72fa75c430846c5a580cd9b4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu May 03 05:20:33 2018

pygpt: Use native GUID.

The comparison between str, str(uuid.UUID()).upper is hard to maintain.
Change all arguments to be GPT.GUID type so it's easier to compare and
manipulate with uuid.UUID type objects.

BUG= chromium:834237 
TEST=make test

Change-Id: I77e97db8b4fec5cd21b39939d0fb72706a3be113
Reviewed-on: https://chromium-review.googlesource.com/1017723
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/bf8aa27f8f8eea1a72fa75c430846c5a580cd9b4/py/utils/pygpt_unittest.py
[modify] https://crrev.com/bf8aa27f8f8eea1a72fa75c430846c5a580cd9b4/py/tools/image_tool.py
[modify] https://crrev.com/bf8aa27f8f8eea1a72fa75c430846c5a580cd9b4/py/utils/pygpt.py

Project Member

Comment 18 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/86ca4bb89d7aa254c36e520bce7581571152c497

commit 86ca4bb89d7aa254c36e520bce7581571152c497
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu May 03 11:47:36 2018

pygpt, image_tool: Refactor from namedtuple to class with restricted __slots__.

pygpt and image_tool uses GPT fields using name instead of numeric
instead often so it is better to use customized class instead of named
tuple. This also prevents hacking Python inheritance by @GPTBlob.

With the new class and field description, we also abandoned the
CLONE_CONVERTERS. The execution time is unfortunately increased because
now we always do type conversion when creating objects (previously we
create different properties, for example TypeGUID (string) and type_guid
(GUID)). However this makes it easier to maintain and access GPT data
fields.

image_tool now also extends pygpt.GPT directly instead of creating a
wrapper class.

BUG= chromium:834237 
TEST=make test

Change-Id: Ieef1bdc33b8a606677ec2a8dd8c98360845e381e
Reviewed-on: https://chromium-review.googlesource.com/1027250
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/86ca4bb89d7aa254c36e520bce7581571152c497/py/utils/pygpt_unittest.py
[modify] https://crrev.com/86ca4bb89d7aa254c36e520bce7581571152c497/py/tools/image_tool.py
[modify] https://crrev.com/86ca4bb89d7aa254c36e520bce7581571152c497/py/tools/image_tool_unittest.py
[modify] https://crrev.com/86ca4bb89d7aa254c36e520bce7581571152c497/py/utils/pygpt.py

Project Member

Comment 19 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/048ac5e91d9e9561819b5653c510db7906ee8bb1

commit 048ac5e91d9e9561819b5653c510db7906ee8bb1
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri May 04 10:02:11 2018

pygpt: Fix execution failure in show and prioritize command.

There was one typo in the property name (forget to change in last
refactoring): type_guid should be TypeGUID.

BUG= chromium:834237 
TEST=make test

Change-Id: I1ce10b4a019bc6e7df79073ed2b97cea1caa6d83
Reviewed-on: https://chromium-review.googlesource.com/1042326
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/048ac5e91d9e9561819b5653c510db7906ee8bb1/py/utils/pygpt.py

Project Member

Comment 20 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/e0d1fa7639565028b49c866d58dbe3348c77113d

commit e0d1fa7639565028b49c866d58dbe3348c77113d
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed May 16 15:34:40 2018

pygpt: Add new ExecuteCommandLine helper function for GPTCommand.SubCommand.

Some tool programs, for example image_tool, may want to run pygpt
command line sub commands (GPTCommand.SubCommand).

The new ExecuteCommandLine provides a simpler way to invoke quickly,
without worrying about how to deal with argparser.

BUG= chromium:834237 
TEST=make test

Change-Id: I66fb9a8c38aef4973c5394a9d6ede38bf930a0fa
Reviewed-on: https://chromium-review.googlesource.com/1058047
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/e0d1fa7639565028b49c866d58dbe3348c77113d/py/utils/pygpt.py

Project Member

Comment 21 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/138389f1ae2463e53ef28b8dfa6302b5f413a9da

commit 138389f1ae2463e53ef28b8dfa6302b5f413a9da
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed May 16 23:42:50 2018

pygpt: Correct 'prioritize' command when new active kernel has priority=0

When running 'prioritize' on a kernel partition as priority=0, we have
to update the highest value by +1.

BUG= chromium:834237 
TEST=make test

Change-Id: I6adb6da4da41b15e786cada7d1d621104346d376
Reviewed-on: https://chromium-review.googlesource.com/1059231
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/138389f1ae2463e53ef28b8dfa6302b5f413a9da/py/utils/pygpt_unittest.py
[modify] https://crrev.com/138389f1ae2463e53ef28b8dfa6302b5f413a9da/py/utils/pygpt.py

Sign in to add a comment