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

Issue 771187 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 703748



Sign in to add a comment

Implement cros_config_host in Python

Project Member Reported by sjg@chromium.org, Oct 3 2017

Issue description

We have cros_config for run-time config (which runs on the target) and cros_config_host for the build-time config.

At present both are written in C++. However as we are starting to add more logic to the latter and need to do similar things (in some cases) to validating (which will certainly be in Python), it seems reasonable to write cros_config_host in Python.

This should allow for faster development, although code duplication may remove some / all of that benefit depending on the approach. So long as we write tests properly it should still be maintainable.

This bug tracks building up the functionality to do this.
 
Project Member

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

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

commit d9ba10e324067b80792e7b403d1c65239d765612
Author: Alec Thilenius <athilenius@chromium.org>
Date: Fri Oct 06 01:06:48 2017

chromeos-config: Add a python device tree library and test

Add a device tree library in Python. This is based on crbug.com/698144 with lots
of cleanup. Also adds unit tests. This library will only be consumed by
cros_config_host, it is not intended for cros_config (board) use.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I0e6b761d2c00e30d30ca2b2a980a2533cdaf223e
Reviewed-on: https://chromium-review.googlesource.com/699191
Commit-Ready: Alec Thilenius <athilenius@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[add] https://crrev.com/d9ba10e324067b80792e7b403d1c65239d765612/chromeos-config/cros_config_host_py/fdt.py
[add] https://crrev.com/d9ba10e324067b80792e7b403d1c65239d765612/chromeos-config/cros_config_host_py/fdt_unittest.py
[add] https://crrev.com/d9ba10e324067b80792e7b403d1c65239d765612/chromeos-config/cros_config_host_py/fdt_util.py

Project Member

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

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

commit 57f3c023916e389a044962e5a286a5bfb1ef93e9
Author: Alec Thilenius <athilenius@chromium.org>
Date: Fri Oct 06 10:57:45 2017

chromeos-config: Add general run_tests.sh to cros_config

Removed the old file globing (running tests directly from the ebuild) to a new
run_tests.sh script in cros_config.

BUG= chromium:771187 
TEST=FEATURES=test emerge chromeos-base/chromeos-config-tools
CQ-DEPEND=CL:700756

Change-Id: I62f0c712c1070cf1e77f44725f11f78976fc1b9d
Reviewed-on: https://chromium-review.googlesource.com/698872
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: C Shapiro <shapiroc@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/57f3c023916e389a044962e5a286a5bfb1ef93e9/chromeos-base/chromeos-config-tools/chromeos-config-tools-9999.ebuild

Project Member

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

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

commit 608ebe36db71712f24054ef976900300c4180444
Author: Alec Thilenius <athilenius@chromium.org>
Date: Fri Oct 06 10:57:45 2017

chromeos-config: Added python test functionality

Renamed test-readme.sh to run_tests.sh and made is a general purpose script for
running all test in cros_config (for now that's just python scripts).

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools
CQ-DEPEND=CL:698872

Change-Id: I34144f409af382bb844290c20a51438cbc10e02e
Reviewed-on: https://chromium-review.googlesource.com/700756
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: C Shapiro <shapiroc@google.com>

[delete] https://crrev.com/e3e6a7f7d3a013274a4ce0b1dd609e7be37877aa/chromeos-config/test-readme.sh
[add] https://crrev.com/608ebe36db71712f24054ef976900300c4180444/chromeos-config/run_tests.sh

Comment 5 by sjg@chromium.org, Oct 6 2017

Blocking: 703748

Comment 6 by sjg@chromium.org, Oct 6 2017

Owner: athilenius@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 7 2017

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

commit b81751b142d466963f653b89daa2ff66675e57d8
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 07 22:33:37 2017

chromeos-config: Add python cros_config_host and libcros_config_host

Add a cros_config_host.py and libcros_config_host. This is the Python CLI
interface for CrosConfig, as well as the Python API. The objective of the API
is to cleanly insulate the caller from any notion of the backing config. The CLI
is easy, specialized access to that library.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I18091f185bed9852e1c416efd310b25af2661663
Reviewed-on: https://chromium-review.googlesource.com/701658
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[add] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[add] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/cros_config_host_py/cros_config_host.py
[add] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/run_tests.sh
[modify] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/cros_config_host_py/fdt_unittest.py
[add] https://crrev.com/b81751b142d466963f653b89daa2ff66675e57d8/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

commit 206d78634e557d1d56dd998795eebc419b151428
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 07 22:33:38 2017

chromeos-config: Switch fdt.py and libcros_config_host.py to use OrderedDict

Order in the fdt tree of nodes and properties was not preserved in the original
dictionaries. Switched form standard Python dicts to OrderedDict. Updated tests
accordingly.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I18e31eb15f3402a4c3a893cf0c415fc4ac3c52ba
Reviewed-on: https://chromium-review.googlesource.com/705819
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/206d78634e557d1d56dd998795eebc419b151428/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/206d78634e557d1d56dd998795eebc419b151428/chromeos-config/cros_config_host_py/fdt.py
[modify] https://crrev.com/206d78634e557d1d56dd998795eebc419b151428/chromeos-config/cros_config_host_py/fdt_unittest.py
[modify] https://crrev.com/206d78634e557d1d56dd998795eebc419b151428/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

commit f29a9555afa7ee7f744d475d41b6312eea6662a2
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 07 22:33:38 2017

chromeos-config: Add a 'get' subcommand for cros_config_host.py

The 'get' subcommand prints a property (given by path + prop parameters) in the
Chrome OS configuration. You can specify a single model to look in with --model
or use all models (prints one property per line) with --all-models.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I8b3b16fa82e4fd79553320da612a65aa2931b861
Reviewed-on: https://chromium-review.googlesource.com/705923
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/f29a9555afa7ee7f744d475d41b6312eea6662a2/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/f29a9555afa7ee7f744d475d41b6312eea6662a2/chromeos-config/cros_config_host_py/cros_config_host.py

Project Member

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

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

commit ec99be3f3167c849a10fb81d7b04085e9278e07e
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 10 03:07:53 2017

chromeos-config: Expand setUp() method in FDT unit tests

All tests require that a scan be done, so move this into the setUp()
method. This saves having to remember to do it in each test.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Signed-off-by: Simon Glass <sjg@chromium.org>

Change-Id: I8ab34a2d025262aab91e1b7e660cf3fd12d12b1a
Reviewed-on: https://chromium-review.googlesource.com/706605
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Alec Thilenius <athilenius@chromium.org>

[modify] https://crrev.com/ec99be3f3167c849a10fb81d7b04085e9278e07e/chromeos-config/cros_config_host_py/fdt_unittest.py

Project Member

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

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

commit f74680b932d73de91e46d96fd7edef49d4ef6d18
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 10 19:19:06 2017

chromeos-config: Fix a few nits in cros_config_host.py

Fit a typo of 'its' and an incorrect comment.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I33b69013696b0afc5dfa54d63bf61746e4fdaf83
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706607

[modify] https://crrev.com/f74680b932d73de91e46d96fd7edef49d4ef6d18/chromeos-config/cros_config_host_py/cros_config_host.py

Project Member

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

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

commit e68dc23bb45ce38d74b2487220a6e9bc10c318d6
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 10 19:19:06 2017

chromeos-config: Remember the Fdt object

When looking up phandles we will need to use the Fdt object that
was created in the CrosConfig constructor. Adjust the code to do
this.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

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

[modify] https://crrev.com/e68dc23bb45ce38d74b2487220a6e9bc10c318d6/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

commit 805898cf9944a7a48fbc577fb5d71b38760f7902
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 10 19:19:06 2017

chromeos-config: Add a symlink for cros_config_host.py

Add a symlink so that this tool can be installed in /usr/bin or similar.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools
With other changes, see that the Python file is installed on the path

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

[add] https://crrev.com/805898cf9944a7a48fbc577fb5d71b38760f7902/chromeos-config/cros_config_host_py/cros_config_host_py

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 12 2017

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

commit 454ea8c63b2c8962408675ca1388029a26744801
Author: Simon Glass <sjg@chromium.org>
Date: Thu Oct 12 07:09:33 2017

chromeos-config: Add support for installing touch firmware

The touch firmware binding allows firmware to be shared among different
models. Add a new 'get-touch-firmware-files' command which outputs a
de-duped list of firmware files and their symlinks.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I99e0043281bba5dc2118a8b59f1479b99951bab3
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706611
Commit-Ready: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Alec Thilenius <athilenius@chromium.org>

[modify] https://crrev.com/454ea8c63b2c8962408675ca1388029a26744801/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/454ea8c63b2c8962408675ca1388029a26744801/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/454ea8c63b2c8962408675ca1388029a26744801/chromeos-config/cros_config_host_py/cros_config_host.py
[modify] https://crrev.com/454ea8c63b2c8962408675ca1388029a26744801/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 12 2017

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

commit 2d69e227d039c3320cc13722e986c45ee902e675
Author: Simon Glass <sjg@chromium.org>
Date: Thu Oct 12 18:12:01 2017

chromeos-config: Add a setup file

Add a Python setup.py file so that the Python-based tools can be
installed.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

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

[add] https://crrev.com/2d69e227d039c3320cc13722e986c45ee902e675/chromeos-config/setup.py
[add] https://crrev.com/2d69e227d039c3320cc13722e986c45ee902e675/chromeos-config/cros_config_host_py/__init__.py

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 12 2017

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

commit e39008ed94bed9e256591c80b3bdab8bebbeb24a
Author: Simon Glass <sjg@chromium.org>
Date: Thu Oct 12 18:25:08 2017

cros-unibuils: Add support for installing touch firmware

Add an implementation of touch firmware installation. This uses the
cros_config_host tool (Python version) to get a list of files and symlinks
to install.

BUG= chromium:771187 
TEST=FEATURES=emerge-reef-uni --nodeps  chromeos-touch-firmware-baseboard-reef
See that it installs the touch firmware files

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

[modify] https://crrev.com/e39008ed94bed9e256591c80b3bdab8bebbeb24a/eclass/cros-unibuild.eclass

Project Member

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

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

commit 875880aa30e51f7c0196068e2fe581ebd0a1ada1
Author: Simon Glass <sjg@chromium.org>
Date: Sat Oct 14 10:18:33 2017

chromeos-config: Add a function to obtain merged properties

We have the same code in two places at present. Move it into a function.
Also there is no point in returning properties that are not used (e.g the
phandle node and 'reg' properties), so filter those out.

BUG= chromium:771187 , chromium:774498 
TEST=./run_tests.sh

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

[modify] https://crrev.com/875880aa30e51f7c0196068e2fe581ebd0a1ada1/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/875880aa30e51f7c0196068e2fe581ebd0a1ada1/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

commit 802bdb6acf0a9bde8c25cf986625e3bb190a9ccf
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 14 21:20:44 2017

chromeos-config: Add get-firmware-uris to cros_config_host_py CLI

Finish piping GetFirmwareUris through to the CLI via the command
addition 'get-firmware-uris'.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I8bc62c2ad8116d3b7884781d5a53c8b580a4e51d
Reviewed-on: https://chromium-review.googlesource.com/719605
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>

[modify] https://crrev.com/802bdb6acf0a9bde8c25cf986625e3bb190a9ccf/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/802bdb6acf0a9bde8c25cf986625e3bb190a9ccf/chromeos-config/cros_config_host_py/cros_config_host.py

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 15 2017

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

commit aefa0eed8e842a98ebd1c8d95abc5b3de7d83c80
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 14 21:21:02 2017

chromeos-config: Remove string comparisons from unit tests

Remove string comparisons from cros_config_host_unittest.py and added
very basic sanity checks. Also fixed an sort-order bug.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I92b1cea787b88d4ad2837be49940fbd72030bbf4
Reviewed-on: https://chromium-review.googlesource.com/719974
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/aefa0eed8e842a98ebd1c8d95abc5b3de7d83c80/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/aefa0eed8e842a98ebd1c8d95abc5b3de7d83c80/chromeos-config/cros_config_host_py/cros_config_host.py

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 15 2017

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

commit 67d8ff89f052455cdebba74ba1b64bf53ae13386
Author: Alec Thilenius <athilenius@chromium.org>
Date: Sat Oct 14 21:21:12 2017

chromeos-config: Removed second testGetSharedFirmwareUris

Removed the second testGetSharedFirmwareUris from the
cros_config_host_unittest.py unit test as it was decided to be
unnecessary.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I4caa08e3b965f4bc77beed46a3ad74c3e084d28e
Reviewed-on: https://chromium-review.googlesource.com/720017
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/67d8ff89f052455cdebba74ba1b64bf53ae13386/chromeos-config/cros_config_host_py/cros_config_host_unittest.py

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 15 2017

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

commit 5b6f7308ec1850a297159e47a9833c32c63d1cac
Author: Simon Glass <sjg@chromium.org>
Date: Sun Oct 15 04:28:52 2017

chromeos-config: Drop the __init__.py file

This is not needed and causes chromite's cli/cros/lint_autotest_unittest
test to fail in an obscure way.

BUG= chromium:771187 
TEST=run trybot for coral-paladin with this and CL:707174
Change-Id: If35245ff62e0f80a36fe9a50c2df3638c9a5c437
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/720166
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[delete] https://crrev.com/c76d777c5dc45ae0a20edc2aec38682087d9b9ff/chromeos-config/cros_config_host_py/__init__.py

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 15 2017

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

commit f16a0ccd4740838002b15a723f83a538885ee7dc
Author: Simon Glass <sjg@chromium.org>
Date: Sun Oct 15 17:26:11 2017

chromeos-config-tools: Install Python tools

Run the setup script to install Python tools in this package. At present
we only have cros_config_host_py.

BUG= chromium:771187 
TEST=sudo emerge chromeos-config-tools
See that cros_config_host_py is now available in the chroot

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

[modify] https://crrev.com/f16a0ccd4740838002b15a723f83a538885ee7dc/chromeos-base/chromeos-config-tools/chromeos-config-tools-9999.ebuild

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 16 2017

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

commit 67728e47bd42f897e857715bcda965b3e89540eb
Author: Simon Glass <sjg@chromium.org>
Date: Mon Oct 16 13:10:05 2017

chromeos-config: Use our own phandle map in CrosConfig

It is odd that looking up a phandle within CrosConfig returns an fdt.Node
instead of a CrosConfig.Node. This cannot work at present since
CrosConfig.Node objects are not  created for all nodes.

Fix this by building our own phandle dict at the start.

Note: We should consider renaming CrosConfig.Node as it is a bit confusing
that they are called the same.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools
Change-Id: I30341116d5119435c94e917841e4c76a4471a23c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/720442
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/67728e47bd42f897e857715bcda965b3e89540eb/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 16 2017

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

commit c93d7fce0d4934ba771e5dff47dc00edad387f84
Author: Alec Thilenius <athilenius@chromium.org>
Date: Mon Oct 16 13:10:16 2017

chromeos-config: Follow phandles in cros_config_host_py

Adjust the library to return a valid property for paths which involve
shared nodes. The cros_config_host_py 'get' command will now follow
phandles for shared nodes.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools
$ cros_config_host_py /build/coral/usr/share/chromeos-config/config.dtb \
	--model astronaut get /firmware/build-targets coreboot
coral

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

[modify] https://crrev.com/c93d7fce0d4934ba771e5dff47dc00edad387f84/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/c93d7fce0d4934ba771e5dff47dc00edad387f84/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/c93d7fce0d4934ba771e5dff47dc00edad387f84/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 16 2017

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

commit f6088e2f67952966d8200a65a02863923d9f7a43
Author: Simon Glass <sjg@chromium.org>
Date: Mon Oct 16 16:30:04 2017

chromeos-config: Export a few protected members

Two functions are used outside the class. There does not seem to be any
good reason to mark them private as they are core functions of the
internal API.

Update them to be public.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools
Change-Id: I0e9ee73be59f9874d6ec854a7278276c84327f1e
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/721001
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/f6088e2f67952966d8200a65a02863923d9f7a43/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/f6088e2f67952966d8200a65a02863923d9f7a43/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 26 by bugdroid1@chromium.org, Oct 16 2017

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

commit 7d3341c85a8df4e0f974d78929e7b6925c711765
Author: Simon Glass <sjg@chromium.org>
Date: Mon Oct 16 16:30:18 2017

chromeos-config: Fix indentation for the 'mapping' binding

This is indented too far. Fix it.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

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

[modify] https://crrev.com/7d3341c85a8df4e0f974d78929e7b6925c711765/chromeos-config/README.md

Project Member

Comment 27 by bugdroid1@chromium.org, Oct 16 2017

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

commit aac65844f8fdbb78076c9e870685228341d0c1b6
Author: Simon Glass <sjg@chromium.org>
Date: Mon Oct 16 16:30:37 2017

chromeos-config: Tidy up help and comments with touch firmware

One of the help lines can be removed. Also we may as well comment the
touch firmware to avoid confusion.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

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

[modify] https://crrev.com/aac65844f8fdbb78076c9e870685228341d0c1b6/chromeos-config/cros_config_host_py/cros_config_host.py
[modify] https://crrev.com/aac65844f8fdbb78076c9e870685228341d0c1b6/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 16 2017

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

commit 15d1b20da56ddc1dadf75784236ab9bcbfdc233a
Author: Alec Thilenius <athilenius@chromium.org>
Date: Mon Oct 16 21:13:57 2017

cros-unibuild: Switch eclass get_model_list to using cros_config_host_py

Replace the eclass implementation for 'get_model_list' and
'get_model_list_nonroot' with the new cros_config_host_py tool.

BUG= chromium:771187 
TEST=FEATURES=emerge-reef-uni chromeos-firmware-reef

Change-Id: Ie496698162c8ca0fb762b49fb56dc277363dee8d
Reviewed-on: https://chromium-review.googlesource.com/719218
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/15d1b20da56ddc1dadf75784236ab9bcbfdc233a/eclass/cros-unibuild.eclass

Project Member

Comment 29 by bugdroid1@chromium.org, Oct 16 2017

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

commit 60c0141af681327dbd4137beef0c22a8ed676e61
Author: Alec Thilenius <athilenius@chromium.org>
Date: Mon Oct 16 21:13:58 2017

cros-unibuild: Switch eclass to use get-firmware-uri

Switch eclass over to use calls to the cros_config_host_py
get-firmware-uris command in place of fdtget and shell.

BUG= chromium:771187 
TEST=FEATURES=emerge-reef-uni chromeos-firmware-reef

Change-Id: Ib5091f82e23f502c92e06d555dcc664c00715cf7
Reviewed-on: https://chromium-review.googlesource.com/719387
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/60c0141af681327dbd4137beef0c22a8ed676e61/eclass/cros-unibuild.eclass
[modify] https://crrev.com/60c0141af681327dbd4137beef0c22a8ed676e61/eclass/cros-firmware.eclass

Project Member

Comment 30 by bugdroid1@chromium.org, Oct 16 2017

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

commit 778d053d58c6c36bf5907b72a8ef0d7c745eab99
Author: Alec Thilenius <athilenius@chromium.org>
Date: Mon Oct 16 21:13:57 2017

cros-unibuild: Switch eclass to use cros_config_host_py

Replace the eclass implementation for 'get_model_conf_value'
and 'get_model_conf_value_nonroot' with calls to the new
cros_config_host_py tool. They will ONLY follow phandles for
the /firmware node though.

BUG= chromium:771187 
TEST=FEATURES=emerge-reef-uni chromeos-firmware-reef
CQ-DEPEND=CL:719376

Change-Id: I6187f62ec570bb9c4a10be33961ff543ff5c12af
Reviewed-on: https://chromium-review.googlesource.com/719496
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/778d053d58c6c36bf5907b72a8ef0d7c745eab99/eclass/cros-unibuild.eclass

Project Member

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

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

commit d277f34d8632de075d3d0135309a88f35266ffa5
Author: Simon Glass <sjg@chromium.org>
Date: Tue Oct 17 22:05:02 2017

chromeos-config: Allow models without touch firmware

Not all models will have touch firmware, at least when the config is
incomplete at the start of a project. Update the tool to support this.

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

Change-Id: Iea37dd4d3e86ae8ac226658a6d4edaeb261a5943
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/723801
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/d277f34d8632de075d3d0135309a88f35266ffa5/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/d277f34d8632de075d3d0135309a88f35266ffa5/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

commit 22b78c7f2d1b6d5dc040d53e4c949b6ff0c891d6
Author: Simon Glass <sjg@chromium.org>
Date: Wed Oct 18 00:43:09 2017

Revert "chromeos-config: Allow models without touch firmware"

This reverts commit d277f34d8632de075d3d0135309a88f35266ffa5.

Reason for revert: Just in case

Original change's description:
> chromeos-config: Allow models without touch firmware
>
> Not all models will have touch firmware, at least when the config is
> incomplete at the start of a project. Update the tool to support this.
>
> BUG= chromium:771187 
> TEST=FEATURES=test emerge-coral chromeos-config-tools
>
> Change-Id: Iea37dd4d3e86ae8ac226658a6d4edaeb261a5943
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/723801
> Reviewed-by: Jason Clinton <jclinton@chromium.org>
> Reviewed-by: YH Lin <yueherngl@chromium.org>
> Tested-by: YH Lin <yueherngl@chromium.org>

Bug:  chromium:771187 
Change-Id: Ib09953d63e8925398b9f54a96331343e71e2f876
Reviewed-on: https://chromium-review.googlesource.com/724129
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/22b78c7f2d1b6d5dc040d53e4c949b6ff0c891d6/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py

Project Member

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

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

commit 7b6462b388fbe343d3c50facb6cc07873448d2a0
Author: Alec Thilenius <athilenius@chromium.org>
Date: Wed Oct 18 21:28:57 2017

chromeos-config: Add get-firmware-build-targets to lib and cli

Add a function to the lib to return a list of all build-targets of the
given type for all models (de-duplicated). Exposed this in the CLI as
the command get-firmware-build-targets.

BUG= chromium:771187 
TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools

Change-Id: I23e9f51160c210d66f76a08e848128d897c2e0bf
Reviewed-on: https://chromium-review.googlesource.com/721728
Commit-Ready: Alec Thilenius <athilenius@chromium.org>
Tested-by: Alec Thilenius <athilenius@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/7b6462b388fbe343d3c50facb6cc07873448d2a0/chromeos-config/libcros_config/test.dts
[modify] https://crrev.com/7b6462b388fbe343d3c50facb6cc07873448d2a0/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py
[modify] https://crrev.com/7b6462b388fbe343d3c50facb6cc07873448d2a0/chromeos-config/cros_config_host_py/cros_config_host_unittest.py
[modify] https://crrev.com/7b6462b388fbe343d3c50facb6cc07873448d2a0/chromeos-config/cros_config_host_py/cros_config_host.py
[modify] https://crrev.com/7b6462b388fbe343d3c50facb6cc07873448d2a0/chromeos-config/cros_config_host_py/libcros_config_host.py

Project Member

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

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

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

chromeos-config: Add tests for models without touch firmware

Not all models will have touch firmware, at least when the config is
incomplete at the start of a project. Update the tool to support this.

Use a set for comparison since the ordering is not defined.

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

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

[modify] https://crrev.com/412fc152c6a99ea156205b9801cb5ea3ea6f5631/chromeos-config/cros_config_host_py/libcros_config_host_unittest.py

Status: Fixed (was: Untriaged)

Sign in to add a comment