cros factory: image_tool improvement |
|||
Issue description
`image_tool merge_rma` can be used to merge multiple RMA image into one universal shim. However, there is no easy way to:
1. List the content of universal shim
2. Update parts of universal shim
Proposal:
1. Add /dev_image/etc/cros_rma_metadata.json, which contains:
a list of {'board': ..., 'kernel': ..., 'rootfs': ...}
so we know the mapping from board to partitions. And new command:
image_tool show_rma xxx_rma.bin
to show the content of RMA shim based on this metadata.
2. With one, we should be able to update part of universal shim
image_tool rma --update <other parameters of rma subcommand>
,
Jul 24
,
Jul 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/30e9a152719f686179cd2d0efda9656229507b9f commit 30e9a152719f686179cd2d0efda9656229507b9f Author: Wei-Han Chen <stimim@google.com> Date: Tue Jul 31 06:08:17 2018 image_tool: rename RMA related subcommands * `image_tool rma` is renamed to `image_tool rma-create` * `image_tool merge_rma` is renamed to `image_tool rma-merge` Also make the old subcommands aliases of new subcommands, so the old scripts should work. Also fix the alias selection code to make alias work properly. However, we no longer support usage like: ln -s image_tool rma rma -o output ... BUG= chromium:866810 TEST=manual test TEST=make test Change-Id: Ied4a2da4d2ec1f8711d1b8e2fb659c4408457140 Reviewed-on: https://chromium-review.googlesource.com/1148303 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/30e9a152719f686179cd2d0efda9656229507b9f/py/tools/image_tool.py [modify] https://crrev.com/30e9a152719f686179cd2d0efda9656229507b9f/setup/README.md [modify] https://crrev.com/30e9a152719f686179cd2d0efda9656229507b9f/py/tools/image_tool_unittest.py [modify] https://crrev.com/30e9a152719f686179cd2d0efda9656229507b9f/README.md
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/41d7bbba8094831c55cd0c50937ee45bc95f412b commit 41d7bbba8094831c55cd0c50937ee45bc95f412b Author: Wei-Han Chen <stimim@google.com> Date: Wed Aug 01 21:52:23 2018 image_tool: add rma_metadata.json This file is added to RMA image under cros_payload folder to track number of boards and their corresponding install shim partitions. For example, a new created RMA shim with only one board should have rma_metadata.json as: [{"board": "BOARD", "kernel": 2, "rootfs": 3}] And when multiple RMA shim are merged by 'rma-merge' command, the metadata will be updated, e.g. [{"board": "BOARD_A", "kernel": 2, "rootfs": 3}, {"board": "BOARD_B", "kernel": 4, "rootfs": 5}, ] BUG= chromium:866810 TEST=manual test TEST=make test Change-Id: Ib64cc0e13842f988e7ac23e98f69d88bab552450 Reviewed-on: https://chromium-review.googlesource.com/1148304 Commit-Ready: Wei-Han Chen <stimim@chromium.org> Tested-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/41d7bbba8094831c55cd0c50937ee45bc95f412b/py/tools/image_tool.py [modify] https://crrev.com/41d7bbba8094831c55cd0c50937ee45bc95f412b/py/tools/image_tool_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/fecde3b8a1ad8f85f2fda60ea077b9b5c360f279 commit fecde3b8a1ad8f85f2fda60ea077b9b5c360f279 Author: Wei-Han Chen <stimim@google.com> Date: Wed Aug 01 21:52:23 2018 image_tool: add subcommand rma-show This command will parse cros_rma_metadata.json and cros_payloads to show the content of a RMA shim. BUG= chromium:866810 TEST=make test TEST=manual test Change-Id: I848c8ecfa18ccd265ea2f9e5b41065422d42f8d0 Reviewed-on: https://chromium-review.googlesource.com/1148305 Commit-Ready: Wei-Han Chen <stimim@chromium.org> Tested-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/fecde3b8a1ad8f85f2fda60ea077b9b5c360f279/py/tools/image_tool.py [modify] https://crrev.com/fecde3b8a1ad8f85f2fda60ea077b9b5c360f279/setup/README.md
,
Sep 7
|
|||
►
Sign in to add a comment |
|||
Comment 1 by hungte@chromium.org
, Jul 24