Make Arm device support cros_config |
||||
Issue descriptionDru is an arm and non-unibuild device. In order to make sure UI can read the physical power button position info from cros_config. We need to make arm device support cros_config first.
,
Apr 12 2018
Thanks! I'll add a few details about the design I thinking of when I get to it.
,
Apr 13 2018
Design ideas: Add a new identity property called: `compatible` (optional) List of 'compatible' strings which use this SKU table. The strings can contain * as a wildcard character. If any of the strings match any of the compatible strings in the device tree, then this SKU map is used. This is the identity-matching method using by ARM devices. When this property is used, the smbios-name-match and platform-name cannot be provided. Within identity.cc: Use the string list in the file '/proc/device-tree/compatible' available on all ARM devices. This is provided by the kernel. It consists of a list of nul-terminated strings. An example is: google,bob-rev2\0google,bob-rev3\0google,bob\0google,gru\0rockchip,rk3399\0 Loop through all strings looking for a match in the property above. Use this to determine whether the SKU table should be used. That is pretty simple, but hopefully it is enough to get us started. It should be fairly easy to implement in cros_config, and even mosys.
,
Apr 13 2018
Assigning this to Charles since he indicated interest in doing it. Otherwise I'm happy to take a look next week. Should be able to do an initial test on 'bob' while we wait for real hardware.
,
Apr 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/5e6bbe4b4a7f388486a20ffce0967ebac1f57df2 commit 5e6bbe4b4a7f388486a20ffce0967ebac1f57df2 Author: C Shapiro <shapiroc@chromium.org> Date: Sat Apr 21 06:01:48 2018 chromeos-config: Add ARM identity attribute Converted the identity tuple to a oneof for x86 and ARM. Updated the README.md generator to support oneofs appropriately also. BUG= chromium:832278 TEST=unit tests Change-Id: Ia05d0a4ae2a10bc9dc3ef0cc8f18329574a13deb Reviewed-on: https://chromium-review.googlesource.com/1019355 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Gregory Meinke <gmeinke@chromium.org> [modify] https://crrev.com/5e6bbe4b4a7f388486a20ffce0967ebac1f57df2/chromeos-config/README.md [modify] https://crrev.com/5e6bbe4b4a7f388486a20ffce0967ebac1f57df2/chromeos-config/cros_config_host/generate_schema_doc.py [modify] https://crrev.com/5e6bbe4b4a7f388486a20ffce0967ebac1f57df2/chromeos-config/cros_config_host/cros_config_schema.yaml
,
Apr 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/2b72d9188a3501790167e3cdf1d81125e5c359c1 commit 2b72d9188a3501790167e3cdf1d81125e5c359c1 Author: C Shapiro <shapiroc@chromium.org> Date: Tue Apr 24 22:40:27 2018 chromeos-config: Add support for per-arch init In order to implement ARM support and keep the ARM implementation decoupled from the x86 implementation, the basic identity structure is going to be split up. This is the first in a series of changes to support this: 1) Break up the X86 and ARM identity implementations. 2) [THIS PATCH] Change cros_config to pass identity object CrosConfigImpl as CrosConfigIdentityX86. This will allow the impl classes to have two overrides that take the respective x86 or ARM identity impls. 3) Update tests to construct their own identity instances and pass to CrosConfig for init. 4) Add new ARM based implementation of Identity and stitch in based on the aforementioned refactoring changes. BUG= chromium:832278 TEST=FEATURES=test emerge-reef chromeos-config-tools Change-Id: Ia7aa4cdcbfaa948bdf30e27038616e14bbda8e1e Reviewed-on: https://chromium-review.googlesource.com/1024742 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/cros_config_main.cc [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config.cc [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_fdt.cc [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_impl.h [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_unittest.cc [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_json.cc [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_json.h [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config.h [modify] https://crrev.com/2b72d9188a3501790167e3cdf1d81125e5c359c1/chromeos-config/libcros_config/cros_config_fdt.h
,
Apr 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/4873414e9df18d471f43ca1995dfae04b4049fcb commit 4873414e9df18d471f43ca1995dfae04b4049fcb Author: C Shapiro <shapiroc@chromium.org> Date: Tue Apr 24 22:40:26 2018 chromeos-config: Break up x86 identity impl In order to implement ARM support and keep the ARM implementation decoupled from the x86 implementation, the basic identity structure is going to be split up. This is the first in a series of changes to support this: 1) THIS PATCH 2) Change cros_config to pass identity object CrosConfigImpl as CrosConfigIdentityX86. This will allow the impl classes to have two overrides that take the respective x86 or ARM identity impls. 3) Update tests to construct their own identity instances and pass to CrosConfig for init. 4) Add new ARM based implementation of Identity and stitch in based on the aforementioned refactoring changes. BUG= chromium:832278 TEST=FEATURES=test emerge-reef chromeos-config-tools Change-Id: I4be55183b6f5bbb1adac7166346068d84e027a0b Reviewed-on: https://chromium-review.googlesource.com/1025010 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> [add] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/libcros_config/identity_x86.h [modify] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/libcros_config/cros_config.cc [modify] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/libcros_config/identity.h [modify] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/libcros_config/identity.cc [modify] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/chromeos-config.gyp [add] https://crrev.com/4873414e9df18d471f43ca1995dfae04b4049fcb/chromeos-config/libcros_config/identity_x86.cc
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/370b9dfe85947406a70a666ced630c9db612a92d commit 370b9dfe85947406a70a666ced630c9db612a92d Author: C Shapiro <shapiroc@chromium.org> Date: Thu Apr 26 06:00:04 2018 chromeos-config: Added ARM support Finished the cros_config implementation to support ARM based identity detection. The only bit that remains is mosys support for ARM and completing some testing on an ARM device. BUG= chromium:832278 TEST=unit test Change-Id: I54a88a7204f8ed6689af473fef2f49bc07e8e07d Reviewed-on: https://chromium-review.googlesource.com/1026706 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> [add] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/test_arm.yaml [add] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/identity_arm.cc [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config.cc [add] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/test_arm.json [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_fdt.cc [add] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/identity_arm.h [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_impl.h [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_unittest.cc [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_json.cc [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_json.h [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/chromeos-config-test-setup.sh [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/cros_config_host/cros_config_schema_unittest.py [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/chromeos-config.gyp [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config.h [modify] https://crrev.com/370b9dfe85947406a70a666ced630c9db612a92d/chromeos-config/libcros_config/cros_config_fdt.h
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/5179fb7e26220811005fe039b756efe2f09b3137 commit 5179fb7e26220811005fe039b756efe2f09b3137 Author: C Shapiro <shapiroc@chromium.org> Date: Thu Apr 26 06:00:05 2018 chromeos-config: Add platform_name for ARM Platform name is used and reported in mosys for both X86 and ARM platforms... so fixing the schema accordingly to support this. BUG= chromium:832278 TEST=unit tests Change-Id: Ib3953e6aa622c9cfcd80996ee42b8e1ec5ddd753 Reviewed-on: https://chromium-review.googlesource.com/1028476 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Lann Martin <lannm@chromium.org> [modify] https://crrev.com/5179fb7e26220811005fe039b756efe2f09b3137/chromeos-config/README.md [modify] https://crrev.com/5179fb7e26220811005fe039b756efe2f09b3137/chromeos-config/cros_config_host/cros_config_schema.yaml
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/f6c7b96cdb70df2e0c007c7d4716c04d1f24d6fe commit f6c7b96cdb70df2e0c007c7d4716c04d1f24d6fe Author: C Shapiro <shapiroc@chromium.org> Date: Thu Apr 26 06:00:06 2018 chromeos-config: ARM C Bindings support Add support to generate ARM based C bindings also as part of the YAML transform to support mosys. BUG= chromium:832278 TEST=unit Change-Id: I243f37ebce3f96b4a332f102a80b8eb24766306c Reviewed-on: https://chromium-review.googlesource.com/1028621 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lann Martin <lannm@chromium.org> [modify] https://crrev.com/f6c7b96cdb70df2e0c007c7d4716c04d1f24d6fe/chromeos-config/cros_config_host/cros_config_schema.py [modify] https://crrev.com/f6c7b96cdb70df2e0c007c7d4716c04d1f24d6fe/chromeos-config/cros_config_host/cros_config_schema_unittest.py [add] https://crrev.com/f6c7b96cdb70df2e0c007c7d4716c04d1f24d6fe/chromeos-config/libcros_config/test_arm.c
,
Apr 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/944fb699d8ba1c57860d8a552023eb5423c660c5 commit 944fb699d8ba1c57860d8a552023eb5423c660c5 Author: C Shapiro <shapiroc@chromium.org> Date: Fri Apr 27 04:10:06 2018 mosys: Add cros_config ARM support Built in ARM based support for cros_config c implementation that exists within mosys. BUG= chromium:832278 TEST=emerge-reef mosys and 'mosys plaform customization' Change-Id: If513fe47c798a4438e99add0b585192cf374cb99 Reviewed-on: https://chromium-review.googlesource.com/1026874 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: C Shapiro <shapiroc@google.com> [modify] https://crrev.com/944fb699d8ba1c57860d8a552023eb5423c660c5/lib/cros_config/cros_config.c [modify] https://crrev.com/944fb699d8ba1c57860d8a552023eb5423c660c5/lib/cros_config/cros_config_struct.c [modify] https://crrev.com/944fb699d8ba1c57860d8a552023eb5423c660c5/include/lib/cros_config_struct.h
,
Apr 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/143c35675e10d553674ad223eec9d81fc18b4331 commit 143c35675e10d553674ad223eec9d81fc18b4331 Author: C Shapiro <shapiroc@chromium.org> Date: Fri Apr 27 04:10:06 2018 mosys: Remove has_ec option for gru This option is set for all devices and is unnecessary right now. For a cros_config based implemenation using the generate config, we don't want any additional flags that aren't coming directly from the yaml config. Instead of adding to the yaml config, just removing for now since it's never actually triggering a different branch. BUG= chromium:832278 TEST=emerge-scarlet mosys and tested locally Change-Id: If401a71bd4b32337d2fce10ad41a789a93270ac7 Reviewed-on: https://chromium-review.googlesource.com/1028354 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Jason Clinton <jclinton@chromium.org> [modify] https://crrev.com/143c35675e10d553674ad223eec9d81fc18b4331/platform/gru/gru.h [modify] https://crrev.com/143c35675e10d553674ad223eec9d81fc18b4331/platform/gru/gru.c [modify] https://crrev.com/143c35675e10d553674ad223eec9d81fc18b4331/platform/gru/eeprom.c
,
Apr 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/mosys/+/6d9caff2b63cfa9043de6a1b3e7569dd50cb1c6e commit 6d9caff2b63cfa9043de6a1b3e7569dd50cb1c6e Author: C Shapiro <shapiroc@chromium.org> Date: Fri Apr 27 04:10:07 2018 mosys: Add cros_config support for gru Adds mosys support for gru for any ARM based overlays that want to enable cros_config as an option. BUG= chromium:832278 TEST=emerge-scarlet Change-Id: Ie516d7bb09ba95a2eae61d70f6b6fa94ac345621 Reviewed-on: https://chromium-review.googlesource.com/1028362 Commit-Ready: C Shapiro <shapiroc@google.com> Tested-by: C Shapiro <shapiroc@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/6d9caff2b63cfa9043de6a1b3e7569dd50cb1c6e/platform/gru/gru.c [modify] https://crrev.com/6d9caff2b63cfa9043de6a1b3e7569dd50cb1c6e/platform/gru/sys.c
,
Apr 27 2018
,
Apr 27 2018
The common work here is done any any ARM overlay can now use this. A working example of this for dru is at: https://chrome-internal-review.googlesource.com/c/chromeos/overlays/overlay-scarlet-private/+/601171
,
Apr 27 2018
Great! That covers the rest of the Chrome OS devices. |
||||
►
Sign in to add a comment |
||||
Comment 1 by minch@chromium.org
, Apr 12 2018