Make HWID config database files "project specific", not "overlay specific". |
||||
Issue descriptionFrom the experience of reef projects and the discussion of reef 2.0 projects, it seems more clear that everyone agrees allowing multiple projects to share same HWID config file is not the preferred way in future, especially when there are different OEM and ODMs involved. Issues in sharing HWID: - Information leak. Different OEM may see each other's build phase, names, rules, and components. - Fail to make CL changes. Partners use CPFE self-service tool to submit changes, and we're seeing lots of conflicts when two projects are trying to make changes in parallel. This is even worse since partners do not have access to internal gerrit, so they can't solve conflicts by git. The only solution now is to create another CL. - Complexity in building rules. All HWID rules will need to have another dimension layer of checking project, which makes it harder to maintain and figure out what's going on. Also, it forced every component-based checks not able to run, and must go to the rules section. For example, we expect 'region' to be a list of approved regions, but if HWID is shared, the region will need to be a "superset of all approved countries" and each project has to write its own python style rules for specifying the target countries. As a result, we do need to change HWID from "one HWID config file for one overlay" to "each project should have its own overlay". There may be many things to do, at least including: - Make sure CPFE ACL controls HWID per project, not per overlay - Make sure we can add a HWID file that does not have an overlay for it, both to CPFE and to factory code - Fix factory code that assumes the association between HWID, board, and overlay - Consider a better way for factory bundle to pick up right HWID files yhong@, can you work on this? You can start by seeing what doesn't work yet, and make design docs if you see problems. akahuang@, can you guide yhong on this? Thanks! phoenixshen@/littlecvr@, I think you'll want to think about how to do the bundle thing.
,
May 25 2017
CPFE ACLs are already based around projects. From looking at boards.yaml I see that probably the electro project is using the reef HWID config file. Would just need to create an electro HWID config file, add it to boards.yaml and then choose "electro" from CPFE. In this case, you might want to rename boards.yaml to projects.yaml or devices.yaml. And, to avoid confusion you'd want to remove the REEF entry in the boards.yaml once it's been split into its different projects to avoid confusion. If removed, then CPFE will return an error if someone tries to update the config.
,
Jun 16 2017
,
Jul 6 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/chromeos-hwid/+/9429928076c5ade06892f35177f9f1199b01beaf commit 9429928076c5ade06892f35177f9f1199b01beaf Author: Yong Hong <yhong@google.com> Date: Thu Jul 06 04:54:54 2017
,
Jul 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/d47b59fcd9947e26874ab8fec216d23bce7eed3a commit d47b59fcd9947e26874ab8fec216d23bce7eed3a Author: Yong Hong <yhong@chromium.org> Date: Thu Jul 06 08:33:12 2017 hwid: Use `ProbeProject()` instead of `ProbeBoard()` This commit replaces calling `ProbeBoard()` by calling `ProbeProject()` if the caller want to get the project name since the assumption that board name is equal to project name won't be true in the future. BUG= chromium:721582 TEST=make test, manually test on DUT Change-Id: Ia355637609076d1ea58f05b4a75791f73b9a7230 Reviewed-on: https://chromium-review.googlesource.com/538517 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> [modify] https://crrev.com/d47b59fcd9947e26874ab8fec216d23bce7eed3a/py/hwid/v3/hwid_cmdline.py [modify] https://crrev.com/d47b59fcd9947e26874ab8fec216d23bce7eed3a/py/device/info.py [modify] https://crrev.com/d47b59fcd9947e26874ab8fec216d23bce7eed3a/py/hwid/v3/database.py [modify] https://crrev.com/d47b59fcd9947e26874ab8fec216d23bce7eed3a/py/hwid/v3/common.py
,
Jul 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/be8abd079579d193f04a77b0bcab548e38faa237 commit be8abd079579d193f04a77b0bcab548e38faa237 Author: Yong Hong <yhong@chromium.org> Date: Fri Jul 07 07:57:18 2017 goofy_remote: Remove the assumption of project=board HWID bundle name is `hwid_v3_bundle_<PROJECT_NAME>`, where PROJECT_NAME might be differ from BOARD_NAME. BUG= chromium:721582 TEST=None Change-Id: I182aac4f368959421c9998f2a7d387483c7bff0a Reviewed-on: https://chromium-review.googlesource.com/561041 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wei-Han Chen <stimim@chromium.org> [modify] https://crrev.com/be8abd079579d193f04a77b0bcab548e38faa237/py/goofy/goofy_remote.py
,
Jul 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/877984439bc14d592cff8b4ebef3f309ed478740 commit 877984439bc14d592cff8b4ebef3f309ed478740 Author: Yong Hong <yhong@chromium.org> Date: Fri Jul 07 11:09:58 2017 factory_flow: Fix the assumption of board=project Since the board name might be differ from the project name, we should use `hwid_v3_bundle_<PROJECT_NAME>.sh` as the file name of the hwid bundle instead of `hwid_v3_bundle_<BOARD_NAME>.sh`. BUG= chromium:721582 TEST=make test, manually test Change-Id: Icf365b79ffdd07ff3e4f6b3b5b8b0face201a08f Reviewed-on: https://chromium-review.googlesource.com/560806 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org> [modify] https://crrev.com/877984439bc14d592cff8b4ebef3f309ed478740/py/factory_flow/create_bundle.py [modify] https://crrev.com/877984439bc14d592cff8b4ebef3f309ed478740/py/factory_flow/common.py [modify] https://crrev.com/877984439bc14d592cff8b4ebef3f309ed478740/py/factory_flow/usb_install.py [modify] https://crrev.com/877984439bc14d592cff8b4ebef3f309ed478740/py/factory_flow/create_bundle_unittest.py [modify] https://crrev.com/877984439bc14d592cff8b4ebef3f309ed478740/py/factory_flow/start_server.py
,
Jul 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/7bc003ceccf3cedbc3081013a7ebf9b9f6a884b4 commit 7bc003ceccf3cedbc3081013a7ebf9b9f6a884b4 Author: Yong Hong <yhong@chromium.org> Date: Mon Jul 10 13:11:05 2017 hwid database: Rename boards.yaml to projects.yaml After CL:*9429928 merged, we need to get the hwid databases information from chromesos-hwid/projects.yaml instead of chromeos-hwid/boards.yaml. BUG= chromium:721582 TEST=make test, ./factory_bundle_info --projects_yaml projects.yaml Change-Id: I53aa110cbb2daa1cb3bfa2b8980e7f35a32be726 Reviewed-on: https://chromium-review.googlesource.com/561017 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Youcheng Syu <youcheng@chromium.org> [modify] https://crrev.com/7bc003ceccf3cedbc3081013a7ebf9b9f6a884b4/py/hwid/v3/verify_db_pattern.py [modify] https://crrev.com/7bc003ceccf3cedbc3081013a7ebf9b9f6a884b4/py/tools/factory_bundle_info.py [modify] https://crrev.com/7bc003ceccf3cedbc3081013a7ebf9b9f6a884b4/py/hwid/v3/valid_hwid_db_unittest.py
,
Jul 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67 commit 1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67 Author: Yong Hong <yhong@chromium.org> Date: Wed Jul 12 14:48:07 2017 hwid database: Unify the hwid bundle name This change replaces the way of getting the hwid bundle name by wrapping it into a function named `GetHWIDBundleName` in `py/hwid/v3/common.py`. BUG= chromium:721582 TEST=make test Change-Id: Ib46775b5bfb904db5ab4ae398256c81f14952972 Reviewed-on: https://chromium-review.googlesource.com/564747 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/goofy/goofy_remote.py [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/hwid/v3/common_unittest.py [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/factory_flow/create_bundle.py [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/factory_flow/start_server.py [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/factory_flow/usb_install.py [modify] https://crrev.com/1a4b8f01250df3eba3fe4aaef0dbf6cd3eb38d67/py/hwid/v3/common.py
,
Jul 13 2017
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/5408f65a9bf1f2f9bfea46302c2612bb3218ca4f commit 5408f65a9bf1f2f9bfea46302c2612bb3218ca4f Author: Yong Hong <yhong@chromium.org> Date: Thu Jul 13 13:51:36 2017 gooftool: Changes the argument name for project specific hwid As hwid database is project specific instead of board specific now, the program argument name for specifying which hwid database to use should be changed from "--board" to "--project". BUG= chromium:721582 TEST=None Change-Id: I92aad8a2146a974260007f569c29f23aa4a01b68 Reviewed-on: https://chromium-review.googlesource.com/566797 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Wei-Han Chen <stimim@chromium.org> [modify] https://crrev.com/5408f65a9bf1f2f9bfea46302c2612bb3218ca4f/py/gooftool/commands.py [modify] https://crrev.com/5408f65a9bf1f2f9bfea46302c2612bb3218ca4f/py/gooftool/core.py
,
Jul 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/2ce1d41006ab27dbe6145fc3758ebd35b51f564d commit 2ce1d41006ab27dbe6145fc3758ebd35b51f564d Author: Yong Hong <yhong@chromium.org> Date: Fri Jul 14 12:51:51 2017 automator: Use build_board to get the board name Since hwid database is project specific now, `hwid.v3.common.ProbeBoard` is not a recommand way to get the board. BUG= chromium:721582 TEST=manually test on dut Change-Id: Idb8982f473333d91bec8b0ffb64a8df487a5d791 Reviewed-on: https://chromium-review.googlesource.com/567613 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/2ce1d41006ab27dbe6145fc3758ebd35b51f564d/py/test/e2e_test/automator.py
,
Jul 26 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/chromeos-hwid/+/f6dfc2d20a5ee66992adf29dac762acc6a5373e0 commit f6dfc2d20a5ee66992adf29dac762acc6a5373e0 Author: Yong Hong <yhong@google.com> Date: Wed Jul 26 07:56:48 2017
,
Jul 26 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-overlay/+/0e1504beb91fac6efa2849cfb0245f6aa0016b1d commit 0e1504beb91fac6efa2849cfb0245f6aa0016b1d Author: Yong Hong <yhong@google.com> Date: Wed Jul 26 07:57:01 2017
,
Jul 26 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-overlay/+/c7008baeda0b38796150a54764c3059a941dccac commit c7008baeda0b38796150a54764c3059a941dccac Author: Yong Hong <yhong@google.com> Date: Wed Jul 26 18:34:44 2017
,
Jul 26 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/chromeos-hwid/+/04fb59f86e484445e9d88d369493d173301373c5 commit 04fb59f86e484445e9d88d369493d173301373c5 Author: Yong Hong <yhong@google.com> Date: Wed Jul 26 18:34:44 2017
,
Jul 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/91eb0216e2b3bc798cd5165897c1a26dab88a49a commit 91eb0216e2b3bc798cd5165897c1a26dab88a49a Author: Yong Hong <yhong@chromium.org> Date: Wed Jul 26 18:34:44 2017 hwid: Stop guessing the hwid database name from given board name We add an assumption that the board name gived by `--board` argument of hwid/v3/hwid_cmdline.py will be exactly the hwid database file name so that hwid/v3/hwid_cmdline.py won't need to guess the hwid database file name. BUG= chromium:721582 TEST=make test CQ-DEPEND=CL:*408571 Change-Id: I7e7ca08161da816df2a558c8f96067eff69e574c Reviewed-on: https://chromium-review.googlesource.com/576017 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/91eb0216e2b3bc798cd5165897c1a26dab88a49a/py/hwid/v3/hwid_cmdline.py
,
Jul 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/ffad996c87ce61a95e05cedc8c266506707dc1b8 commit ffad996c87ce61a95e05cedc8c266506707dc1b8 Author: Yong Hong <yhong@chromium.org> Date: Fri Jul 28 04:39:05 2017 hwid: Rename the field `board` to `project` As the hwid database is project specific, the field `board` in the hwid database should be replaced by `project`. After this change, the hwid database is no longer related to board. BUG= chromium:721582 TEST=make test, manually test on dut Change-Id: I3433023e61b7c63ee82fcbcc1cdc73ff441beda7 Reviewed-on: https://chromium-review.googlesource.com/569325 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/hwid_rule_functions.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/database.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/new_test_probe_result_hwid_utils.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db.yaml [rename] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/TEST_PROJECT [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/hwid_cmdline.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/hwid_utils_unittest.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_new_db.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db_builder.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/README.md [rename] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/NEW_TEST_PROJECT [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/decoder.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/encoder.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db_wrong_checksum_field.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/common.py [copy] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db_legacy.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/database_unittest.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/hwid_utils.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/builder_unittest.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/decoder_unittest.py [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db_no_checksum.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/testdata/test_db_duplicated_keys.yaml [modify] https://crrev.com/ffad996c87ce61a95e05cedc8c266506707dc1b8/py/hwid/v3/builder.py
,
Jul 28 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/chromeos-hwid/+/690794845de2be4f7e18ceb68b51bbf565754d67 commit 690794845de2be4f7e18ceb68b51bbf565754d67 Author: Yong Hong <yhong@google.com> Date: Fri Jul 28 12:45:00 2017
,
Jul 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/b89625ebd211881c7f39e3f506e190dbac7f426a commit b89625ebd211881c7f39e3f506e190dbac7f426a Author: Yong Hong <yhong@chromium.org> Date: Fri Jul 28 19:28:04 2017 hwid: Implement `ProbeProject()` method This change implements a way to get the project name on a DUT. BUG= chromium:721582 TEST=make test, manually test on DUT Change-Id: I7d2465af1421bacaafa33f9a36070489f68a8a3c Reviewed-on: https://chromium-review.googlesource.com/588036 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Chih-Yu Huang <akahuang@chromium.org> [modify] https://crrev.com/b89625ebd211881c7f39e3f506e190dbac7f426a/py/hwid/v3/common.py
,
Aug 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/e03dcfd361a85f6cb3586edd5628319f62edf1bc commit e03dcfd361a85f6cb3586edd5628319f62edf1bc Author: Yong Hong <yhong@chromium.org> Date: Wed Aug 02 15:15:59 2017 hwid: Modify `ProbeProject()` to tolerate error on calling mosys. Ignore the exception caused by calling process error of `mosys platform chassis` command so that `ProbeProject()` method can work on old chromebook projects. BUG= chromium:721582 TEST=None Change-Id: I074a3a1a46175da16e3489010d53e1ad5e88691e Reviewed-on: https://chromium-review.googlesource.com/597580 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Youcheng Syu <youcheng@chromium.org> [modify] https://crrev.com/e03dcfd361a85f6cb3586edd5628319f62edf1bc/py/hwid/v3/common.py
,
Aug 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/fa415e6867dbe65bb6b1ecde975f61bf428cceb3 commit fa415e6867dbe65bb6b1ecde975f61bf428cceb3 Author: Yong Hong <yhong@chromium.org> Date: Tue Aug 08 08:11:40 2017 hwid: Remove unused function The function `ProbeBoard()` is unused after hwid database become project specific instead of board specific so this change just remove this unused function. BUG= chromium:721582 TEST=make test Change-Id: I080e45d851bd63c3c0e02dc77564c554a8fba5a3 Reviewed-on: https://chromium-review.googlesource.com/588037 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Chih-Yu Huang <akahuang@chromium.org> [modify] https://crrev.com/fa415e6867dbe65bb6b1ecde975f61bf428cceb3/py/hwid/v3/common.py
,
Aug 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/fe570e03c154396e4a58a5211f534aa4b2f608fc commit fe570e03c154396e4a58a5211f534aa4b2f608fc Author: Yong Hong <yhong@chromium.org> Date: Thu Aug 10 06:33:06 2017 hwid: Remove legacy arguments This change removes `--board` or similar arguments for project specific things. BUG= chromium:721582 TEST=make test CQ-DEPEND=CL:*414668 Change-Id: Idfea2f597e483621fdbb0d9328763f4a0550a03c Reviewed-on: https://chromium-review.googlesource.com/575803 Commit-Ready: Yong Hong <yhong@chromium.org> Tested-by: Yong Hong <yhong@chromium.org> Reviewed-by: Chih-Yu Huang <akahuang@chromium.org> [modify] https://crrev.com/fe570e03c154396e4a58a5211f534aa4b2f608fc/py/hwid/v3/verify_db_pattern.py [modify] https://crrev.com/fe570e03c154396e4a58a5211f534aa4b2f608fc/py/hwid/v3/hwid_cmdline.py
,
Apr 13 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by hungte@chromium.org
, May 11 2017