New issue
Advanced search Search tips

Issue 728078 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

mosys: Add new platform commands "sku" and "brand".

Project Member Reported by hungte@chromium.org, May 31 2017

Issue description

Design doc: go/cros-factory-coral

To identify devices in a better way, we need mosys to add new commands.

'sku' prints SKU number information if available.
'brand' prints RLZ brand code, which used to be in VPD or /opt/oem.

 
Project Member

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

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/60747f5c5961ea2bad06e91a4e60ca9d3d0eccda

commit 60747f5c5961ea2bad06e91a4e60ca9d3d0eccda
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sat Jun 03 09:02:41 2017

core: Add commands "brand" and "sku".

To support identifying a device, we need more information to be
retrieved dynamically from mosys. Also revised the retrieval of
identifiers in platform.c.

The new commands are:
 sku - prints SKU number if available.
 brand - prints RLZ brand code if available.

Fallback functions are implemented as probe_* in misc/probe.c.
Note brand and chassis may need to look up SKU number to decide
their value in future, so the callbacks (sys->sku_number and
probe_sku_number) were declared to return an integer.

BRANCH=none
BUG= chromium:728078 
TEST=mosys platform brand
     mosys platform chassis
     mosys platform sku

Change-Id: Id49ede94a30b8fecd83217dc0a497dd9b87954db
Reviewed-on: https://chromium-review.googlesource.com/519043
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>

[modify] https://crrev.com/60747f5c5961ea2bad06e91a4e60ca9d3d0eccda/core/command/platform.c
[modify] https://crrev.com/60747f5c5961ea2bad06e91a4e60ca9d3d0eccda/include/mosys/platform.h
[modify] https://crrev.com/60747f5c5961ea2bad06e91a4e60ca9d3d0eccda/lib/misc/probe.c
[modify] https://crrev.com/60747f5c5961ea2bad06e91a4e60ca9d3d0eccda/include/lib/probe.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/2f9149b879159c08212599e75e97c119cb130210

commit 2f9149b879159c08212599e75e97c119cb130210
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jun 08 06:45:40 2017

core: Add command "customization".

To support identifying a device, we also want to migrate VPD
"customization_id" to a value decided by mosys.

The new command is:
 customization - prints customization ID (usually from VPD) if available.

Fallback functions are implemented as probe_* in misc/probe.c.

BRANCH=none
BUG= chromium:728078 
TEST=mosys platform customization

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

[modify] https://crrev.com/2f9149b879159c08212599e75e97c119cb130210/core/command/platform.c
[modify] https://crrev.com/2f9149b879159c08212599e75e97c119cb130210/include/mosys/platform.h
[modify] https://crrev.com/2f9149b879159c08212599e75e97c119cb130210/lib/misc/probe.c
[modify] https://crrev.com/2f9149b879159c08212599e75e97c119cb130210/include/lib/probe.h

Comment 3 by hungte@chromium.org, Jul 14 2017

Owner: hungte@chromium.org
Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 6 2017

Labels: merge-merged-factory-gru-9017.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/5e128777e549fe64edfe9eb5f663d8f4426fcbea

commit 5e128777e549fe64edfe9eb5f663d8f4426fcbea
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Sep 06 01:02:55 2017

CHERRY-PICK: core: Add commands "brand" and "sku".

To support identifying a device, we need more information to be
retrieved dynamically from mosys. Also revised the retrieval of
identifiers in platform.c.

The new commands are:
 sku - prints SKU number if available.
 brand - prints RLZ brand code if available.

Fallback functions are implemented as probe_* in misc/probe.c.
Note brand and chassis may need to look up SKU number to decide
their value in future, so the callbacks (sys->sku_number and
probe_sku_number) were declared to return an integer.

BRANCH=none
BUG= chromium:728078 
TEST=mosys platform brand
     mosys platform chassis
     mosys platform sku

Original Change-Id: Id49ede94a30b8fecd83217dc0a497dd9b87954db
Original Reviewed-on: https://chromium-review.googlesource.com/519043
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>

Change-Id: I1840b067014ff777f88a221926b03524b651edf4
Reviewed-on: https://chromium-review.googlesource.com/650167
Reviewed-by: Philip Chen <philipchen@chromium.org>
Tested-by: 海鹏 何 <robert_he@asus.com>
Commit-Queue: 海鹏 何 <robert_he@asus.com>

[modify] https://crrev.com/5e128777e549fe64edfe9eb5f663d8f4426fcbea/core/command/platform.c
[modify] https://crrev.com/5e128777e549fe64edfe9eb5f663d8f4426fcbea/include/mosys/platform.h
[modify] https://crrev.com/5e128777e549fe64edfe9eb5f663d8f4426fcbea/lib/misc/probe.c
[modify] https://crrev.com/5e128777e549fe64edfe9eb5f663d8f4426fcbea/include/lib/probe.h

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

Status: Archived (was: Fixed)

Sign in to add a comment