New issue
Advanced search Search tips

Issue 761229 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Provide a way to share all configuration across models

Project Member Reported by sjg@chromium.org, Sep 1 2017

Issue description

With unified builds, white label models should have exactly the same configuration. It is error-prone to have to repeat it each time.

We should allow a white-label model to share the configuration of another model to avoid this problem.
 
Project Member

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

Comment 2 by sjg@chromium.org, Oct 17 2017

Status: Started (was: Untriaged)

Comment 3 by sjg@chromium.org, Oct 17 2017

Labels: -Pri-3 Pri-1
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a

commit 5a8bd69a1afd18db83e57d7e2cec5e419e61f34a
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 17 20:02:45 2017

chromeos-config: Support shared configuration for white-label

White-label devices are almost electronically identical and need to share
most configuration, except a few things like the key ID and wallpaper.
Repeating the configuration is error-prone and wastes time.

Provide a way to share the configuration from another model. Local
settings and then not permitted, avoiding potential mistakes.

The approach here is that a single whitelabel model is created with the
shared configuration for all whitelabel models, and the other whitelabel
models share it. It is possible to have two sets of whitelabels if needed.

Validation is provided to ensure that whitelabel models do not specify
properties which they are supposed to share with other whitelabels. Any
property or node lookups return the correct information, taking into
account the whitelabel share.

This is all in one big CL so that the various implementations are
together for review. We should consider spltting it.

BUG= chromium:761229 
TEST=FEATURES=test emerge-coral chromeos-config-tools
PYTHONPATH=~/cosarm ./validate/validate_config \
~/cosarm/chroot/build/coral/usr/share/chromeos-config/config.dtb  \
~/cosarm/chroot/build/reef-uni/usr/share/chromeos-config/config.dtb \
README.md
PYTHONPATH=~/cosarm python validate/validate_config_unittest.py

Change-Id: Ia9a2c5a1d203b29d96442cfd6748697521e6b35c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/646995
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/validate/validate_config_unittest.py
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/cros_config_host_main_unittest.cc
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/README.md
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/validate/validate_config.py
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/libcros_config/cros_config_unittest.cc
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/libcros_config/cros_config.cc
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/cros_config_host_py/fdt_unittest.py
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/libcros_config/cros_config.h
[modify] https://crrev.com/5a8bd69a1afd18db83e57d7e2cec5e419e61f34a/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/7aede7d379e6a81aa19bdda9515dc0d5cd44b902

commit 7aede7d379e6a81aa19bdda9515dc0d5cd44b902
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 17 20:02:45 2017

chromeos-config: Enable logging to a file

At present tests generate no logging output that I can find. Send it to a
file to aid debugging.

BUG= chromium:761229 
TEST=FEATURES=test emerge-coral chromeos-config-tools
See that a 'log.test' file is available

Change-Id: I53d9796a7b9ef51e3f22c128cf70e201fc50ba05
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/721059
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/7aede7d379e6a81aa19bdda9515dc0d5cd44b902/chromeos-config/libcros_config/cros_config_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/fd9a407e6f56c8d8c3c6f56fbb3e8a4c531a605e

commit fd9a407e6f56c8d8c3c6f56fbb3e8a4c531a605e
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 17 20:02:45 2017

chromeos-config: Tidy up a common firmware schema condition

This is repeated several times which is error-prone and verbose. Move it
to a constant.

BUG= chromium:761229 
TEST=FEATURES=test emerge-coral chromeos-config-tools

Change-Id: I80c9bd96bae90ed33f78f02c52d3fe047a31cf50
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/721060
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/fd9a407e6f56c8d8c3c6f56fbb3e8a4c531a605e/chromeos-config/validate/validate_config.py

Comment 7 by sjg@chromium.org, Oct 17 2017

Base support is in. We need:

- firmware update support - https://chromium-review.googlesource.com/c/chromiumos/platform/firmware/+/722224
- firmware ebuild support - waiting on the move to cros_config_host in various ebuilds
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/956e7ee4e4be270865200e7407610cd9e0e972ab

commit 956e7ee4e4be270865200e7407610cd9e0e972ab
Author: Simon Glass <sjg@chromium.org>
Date: Wed Oct 18 00:43:00 2017

Revert "chromeos-config: Support shared configuration for white-label"

This reverts commit 5a8bd69a1afd18db83e57d7e2cec5e419e61f34a.

Reason for revert: Went through CQ but it is the only plausible candidate for ToT breakage.

Original change's description:
> chromeos-config: Support shared configuration for white-label
> 
> White-label devices are almost electronically identical and need to share
> most configuration, except a few things like the key ID and wallpaper.
> Repeating the configuration is error-prone and wastes time.
> 
> Provide a way to share the configuration from another model. Local
> settings and then not permitted, avoiding potential mistakes.
> 
> The approach here is that a single whitelabel model is created with the
> shared configuration for all whitelabel models, and the other whitelabel
> models share it. It is possible to have two sets of whitelabels if needed.
> 
> Validation is provided to ensure that whitelabel models do not specify
> properties which they are supposed to share with other whitelabels. Any
> property or node lookups return the correct information, taking into
> account the whitelabel share.
> 
> This is all in one big CL so that the various implementations are
> together for review. We should consider spltting it.
> 
> BUG= chromium:761229 
> TEST=FEATURES=test emerge-coral chromeos-config-tools
> PYTHONPATH=~/cosarm ./validate/validate_config \
> ~/cosarm/chroot/build/coral/usr/share/chromeos-config/config.dtb  \
> ~/cosarm/chroot/build/reef-uni/usr/share/chromeos-config/config.dtb \
> README.md
> PYTHONPATH=~/cosarm python validate/validate_config_unittest.py
> 
> Change-Id: Ia9a2c5a1d203b29d96442cfd6748697521e6b35c
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/646995
> Reviewed-by: Jason Clinton <jclinton@chromium.org>

Bug:  chromium:761229 
Change-Id: I42e71be256548baa002f0baf1e59f5ea611e9cdb
Reviewed-on: https://chromium-review.googlesource.com/724300
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ningning Xia <nxia@chromium.org>

[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/validate/validate_config_unittest.py
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/cros_config_host_main_unittest.cc
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/README.md
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/validate/validate_config.py
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/libcros_config/cros_config_unittest.cc
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/libcros_config/cros_config.cc
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/cros_config_host_py/fdt_unittest.py
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/libcros_config/cros_config.h
[modify] https://crrev.com/956e7ee4e4be270865200e7407610cd9e0e972ab/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 18 2017

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

commit d02bcef3fd10b2304e28224f81d05c5bf2a9a5a2
Author: Simon Glass <sjg@chromium.org>
Date: Wed Oct 18 17:30:43 2017

pack_firmware: Support firmware for whitelabel devices

Whitelabel devices share almost all settings with another device. Add
support for this by pulling required settings from the correct place.

BUG= chromium:761229 
TEST=PYTHONPATH=~/cosarm python pack_firmware_unittest.py && \
    PYTHONPATH=~/cosarm python pack_firmware_functest.py

Change-Id: I1b8613e7f02589f4174a3cc23ec137840123f860
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/722224
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/d02bcef3fd10b2304e28224f81d05c5bf2a9a5a2/pack_firmware_functest.py
[modify] https://crrev.com/d02bcef3fd10b2304e28224f81d05c5bf2a9a5a2/pack_firmware.py
[modify] https://crrev.com/d02bcef3fd10b2304e28224f81d05c5bf2a9a5a2/test/config_base.dtsi

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a61b583adb67f351ba41b24a91359b3ce1779c95

commit a61b583adb67f351ba41b24a91359b3ce1779c95
Author: Simon Glass <sjg@chromium.org>
Date: Wed Oct 18 21:28:58 2017

chromeos-config: Support shared configuration for white-label

White-label devices are almost electronically identical and need to share
most configuration, except a few things like the key ID and wallpaper.
Repeating the configuration is error-prone and wastes time.

Provide a way to share the configuration from another model. Local
settings and then not permitted, avoiding potential mistakes.

The approach here is that a single whitelabel model is created with the
shared configuration for all whitelabel models, and the other whitelabel
models share it. It is possible to have two sets of whitelabels if needed.

Validation is provided to ensure that whitelabel models do not specify
properties which they are supposed to share with other whitelabels. Any
property or node lookups return the correct information, taking into
account the whitelabel share.

This is all in one big CL so that the various implementations are
together for review. We should consider spltting it.

BUG= chromium:761229 
TEST=FEATURES=test emerge-coral chromeos-config-tools
PYTHONPATH=~/cosarm ./validate/validate_config \
~/cosarm/chroot/build/coral/usr/share/chromeos-config/config.dtb  \
~/cosarm/chroot/build/reef-uni/usr/share/chromeos-config/config.dtb \
README.md
PYTHONPATH=~/cosarm python validate/validate_config_unittest.py

Change-Id: Ida5f5d3f596de1951bd0c113187fb03bcf445aba
Reviewed-on: https://chromium-review.googlesource.com/726160
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/validate/validate_config_unittest.py
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/cros_config_host_main_unittest.cc
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/README.md
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/validate/validate_config.py
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/libcros_config/cros_config_unittest.cc
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/libcros_config/cros_config.cc
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/cros_config_host_py/fdt_unittest.py
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/libcros_config/cros_config.h
[modify] https://crrev.com/a61b583adb67f351ba41b24a91359b3ce1779c95/chromeos-config/cros_config_host_py/libcros_config_host.py

Comment 11 by sjg@chromium.org, Nov 4 2017

Labels: Unibuild

Comment 12 by sjg@chromium.org, Nov 6 2017

Status: Fixed (was: Started)
This has been in there for several weeks, marking fixed.

Sign in to add a comment