New issue
Advanced search Search tips

Issue 674459 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: Migrate ToT reference board factory code.

Project Member Reported by hungte@chromium.org, Dec 15 2016

Issue description

Continue to  issue 577601 , we want to make reference boards on ToT private overlays to "work" properly.

That includes:
 - clean up useless code
 - migrate to use new factory device API and config
 - rename chromeos-factory-board to factory-board
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 3 2017

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

commit 58db7cbf1462b5abf925867a3108b60647d163b1
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Dec 30 08:36:28 2016

device: Support JSON audio config (via config_utils).

During board overlay simplification, we found that most boards need
their own audio.conf. Changing YAML config to config_utils (JSON) gives
us few advantages:

 1. Supports additional schema checks. This is important because we did
    find few audio.conf with wrong action names ("disable_speaker"
    becomes "disable speaker") and it's hard to find such error.
    The audio.schema.json now supports all actions we've define.

 2. Supports reading audio config even within `factory.par`.

 3. Make py/config a more centralized place for all board customization.

BUG= chromium:674459 
TEST=make test; manually changed YAML config to JSON and loaded
     dut.audio successfully.

Change-Id: Ic87d1f22806f208ef51cfa8e03b2cf5869efd04c
Reviewed-on: https://chromium-review.googlesource.com/424294
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hsu Wei-Cheng <mojahsu@chromium.org>

[add] https://crrev.com/58db7cbf1462b5abf925867a3108b60647d163b1/py/device/audio/audio.json
[add] https://crrev.com/58db7cbf1462b5abf925867a3108b60647d163b1/py/device/audio/audio.schema.json
[modify] https://crrev.com/58db7cbf1462b5abf925867a3108b60647d163b1/py/device/audio/utils.py
[modify] https://crrev.com/58db7cbf1462b5abf925867a3108b60647d163b1/py/device/audio/base.py
[modify] https://crrev.com/58db7cbf1462b5abf925867a3108b60647d163b1/py/device/audio/tinyalsa.py

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1bfc6c476786740ca345a335c0c55198e8a17e73

commit 1bfc6c476786740ca345a335c0c55198e8a17e73
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Dec 30 10:28:42 2016

chromeos-base/factory: Support cutoff JSON config.

To support JSON based cutoff config, chromeos-factory should copy cutoff
config from py/config into cutoff/ resource.

BUG= chromium:674459 
TEST=manually create a cutoff.json in chromeos-factory-board/files/py/config
     then `emerge-reef factory`, seeing JSON in cutoff.tar.

Change-Id: Ib6c10dc869b1e8964e4c8aa4f51054455e6e36e0
Reviewed-on: https://chromium-review.googlesource.com/422804
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/1bfc6c476786740ca345a335c0c55198e8a17e73/chromeos-base/factory/factory-9999.ebuild

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 4 2017

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

commit 0ce13395ce4c59d4c903d8ec0145fb631a630231
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Dec 30 04:36:29 2016

cutoff: Allow reading from JSON config.

During the simplification of chromeos-factory-board, it's clear that
things will be easier if we can put all per-board customization into a
single place, with minimal changes. The JSON-based py/config is a better
place for all settings.

For reset shim, cutoff is extracted from the resource package prepared
by chromeos-base/factory so py/config/cutoff.json will be moved to same
folder with options.sh (/usr/share/cutoff) so options.sh has to read
cutoff.json from two places (../../py/config/cutoff for in-place-wiping,
and /usr/share/cutoff for reset shim).

BUG= chromium:674459 
TEST=make test

Change-Id: Ib428c1e6c87e5e33fbfdca11a9bfaaefc0fa6d58
Reviewed-on: https://chromium-review.googlesource.com/422620
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/0ce13395ce4c59d4c903d8ec0145fb631a630231/py/gooftool/wipe.py
[modify] https://crrev.com/0ce13395ce4c59d4c903d8ec0145fb631a630231/sh/cutoff/README.md
[modify] https://crrev.com/0ce13395ce4c59d4c903d8ec0145fb631a630231/sh/cutoff/options.sh
[add] https://crrev.com/0ce13395ce4c59d4c903d8ec0145fb631a630231/sh/cutoff/cutoff.schema.json

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 5 2017

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

commit 58fc5f88b7c5b2ae8bd449d184349b08dce7bc48
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Dec 30 05:39:57 2016

sh: Always do "ulimit -c unlimited" for Goofy.

When refactoring chromeos-factory-board, we found that almost all
projects prefer to have "ulimit -c unlimited" and is the only reason
left for having board_setup_factory.sh.

Move the ulimit command to `goofy_control.sh` so board_setup_factory.sh
can be eliminated for most of the projects.

BUG= chromium:674459 
TEST=Started Goofy.

Change-Id: I706062fc5f75fa699d63ad950f71797f9b9cd8d0
Reviewed-on: https://chromium-review.googlesource.com/423026
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/58fc5f88b7c5b2ae8bd449d184349b08dce7bc48/sh/goofy_control.sh

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 17 2017

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 18 2017

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 20 2017

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 6 2017

Status: Started (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 7 2017

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 8 2017

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 9 2017

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 10 2017

Project Member

Comment 22 by bugdroid1@chromium.org, Mar 10 2017

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 10 2017

Status: Fixed (was: Started)
All migration done.
Project Member

Comment 25 by bugdroid1@chromium.org, Mar 13 2017

Project Member

Comment 26 by bugdroid1@chromium.org, Mar 13 2017

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

commit 169049504b6e0dc149a5b45939b1ef975aa7de51
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Mar 13 16:19:24 2017

device: Remove unused GetBatteryRegisters.

The 'GetBatteryRegisters' was only ever implemented on Spring. For most
platforms, it's not necessary to capture battery registers in factory.
Even on Spring, it was solely used for fault analysis.

As a result, this should be removed from general implementation
(device/power.py) and standard test (pytests/charger.py).

BUG= chromium:674459 
TEST=make test

Change-Id: I33455e845046d8506ea647aeb761a6b34bc5843d
Reviewed-on: https://chromium-review.googlesource.com/453539
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/169049504b6e0dc149a5b45939b1ef975aa7de51/py/device/power.py
[modify] https://crrev.com/169049504b6e0dc149a5b45939b1ef975aa7de51/py/test/pytests/charger.py

Comment 27 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

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

Status: Archived (was: Fixed)

Sign in to add a comment