New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763234 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: Add a script or Python to merge HWID bundle files in setup/

Project Member Reported by hungte@chromium.org, Sep 8 2017

Issue description

For recent projects we need to "merge" multiple HWID bundle (as shar scripts) into a new single shar script.

There must be a script provided in setup/ to do this easily.
 
Cc: marcochen@chromium.org

Comment 2 by yhong@chromium.org, Sep 8 2017

To be clarify, the input of this script should be a lot of HWID bundles, right?  Do you think we should also accept HWID databases as input?
I think we can automatically detect if the given input file is a shell script (starting with "#!/bin/sh") or a plain HWID databases.

Comment 4 by yhong@chromium.org, Sep 8 2017

Since the repack process needs many logic which is duplicated in hwid repository, I think we should move all logic about creating HWID bundle into factory repository and let the "create_bundle" script in hwid repository call the tools in factory repository.
I thought it won't need too much logic, but if you need that, then yes you can move the whole script to factory repo.

However, please be aware that CPFE reads pack_stub from hwid repo, so I wonder if you'll need changes in CPFE - unless you'd keep the stub in private repo.

Comment 6 by yhong@chromium.org, Sep 8 2017

When I try to implement the script in CL:656752, I found an issue that since the bundle creator should verify the given HWID database, which was done by calling the hwid tool in chroot.  But all scripts in setup/ folder shouldn't have any dependency on chroot.  So here I come up with two possible solution:

1. Call `factory.par hwid verify-database` to verify the HWID databases, it should work since factory.par is included in `factory.zip`
2. Only accept HWID bundles as input, and apply other method to combine them together so that we don't rely on same logic as chromeos-hwid/create_bundle used.
I think we should use factory.par if possible.
If not, then we can still accept both bundles and config/database files - simply skipping verification.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 12 2017

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

commit ef4b889cadf814eaa3176701ec3374077f5f6cfe
Author: Yong Hong <yhong@chromium.org>
Date: Tue Sep 12 15:48:15 2017

hwid: Add a script for creating HWID bundle in setup/ folder.

This CL adds a script to create HWID bundle from multiple HWID bundles
or HWID databases.  If the given file is a HWID database, the script
will call `bin/hwid verify-database` first.

BUG= chromium:763234 
TEST=manually test

Change-Id: I4b2f1bc5cb7c7167ea1cbc6fb2bec8a5502cc28a
Reviewed-on: https://chromium-review.googlesource.com/656752
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[add] https://crrev.com/ef4b889cadf814eaa3176701ec3374077f5f6cfe/setup/create_hwid_bundle.sh

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/chromeos-hwid/+/2e812b2c8aecb35820f799a2af6bcfb948e38625

commit 2e812b2c8aecb35820f799a2af6bcfb948e38625
Author: Yong Hong <yhong@google.com>
Date: Wed Sep 13 08:51:02 2017

Comment 10 by yhong@chromium.org, Sep 13 2017

Labels: OS-Android
Status: Fixed (was: Assigned)
why label os=android?

Comment 12 by yhong@chromium.org, Sep 13 2017

Labels: -OS-Android

Comment 13 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 14 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment