expand servo functionality for automatic power measurments |
||||||||||||||||
Issue descriptionTracker bug for changes to extend servo functionality to allow for easier automation of power measurements. ⛆ |
|
|
,
Sep 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/d35e9875e7f7c116609529b2950a63b783c2bec2 commit d35e9875e7f7c116609529b2950a63b783c2bec2 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Sep 06 06:01:10 2017 servo: introduce servo_metadata drv to unify calls for metadata This CL removes servo_type drv in favor of a servo_metadata drv to collect all sorts of information that are about a specific servo invocation. To that end, this CL: - pulls out the hard-coded serial check from servo_server & adds it to the metadata drv - metadata reports the type as servo_type did previously - introduces new dut-control config_files command that lists all configuration files used to invoke the servo server instance. BUG=chromium:760267 TEST=manual sudo servod -b poppy -c poppy_r1_r2.xml & dut-control serialname serialname:<id> dut-control servo_type servo_type:<type> dut-control config_files <list of comma separated config files including poppy_r1_r2.xml> Change-Id: I7972c0e3995d3353289bc3e649e8f12b90f71ce0 Reviewed-on: https://chromium-review.googlesource.com/587439 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> [modify] https://crrev.com/d35e9875e7f7c116609529b2950a63b783c2bec2/servo/servo_server.py [modify] https://crrev.com/d35e9875e7f7c116609529b2950a63b783c2bec2/servo/drv/__init__.py [add] https://crrev.com/d35e9875e7f7c116609529b2950a63b783c2bec2/servo/drv/servo_metadata.py [delete] https://crrev.com/cfd4c4acc2ded626f39fcd97e797634aea5a937e/servo/drv/servo_type.py [modify] https://crrev.com/d35e9875e7f7c116609529b2950a63b783c2bec2/servo/data/common.xml
,
Oct 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/2087e32b63dd9a4bc1039b0bac08818df4e8f9c4 commit 2087e32b63dd9a4bc1039b0bac08818df4e8f9c4 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Sat Oct 21 03:04:14 2017 servo: expose ec_system_powerstate command This change allows to read the powerstate the dut is in through a servod instance running. It will report the same output as the ec console command 'powerinfo' BUG=chromium:760267 TEST=manual <start servod on a dut> dut-control ec_system_powerstate > S0ix Change-Id: Ie5c4b1ce2ca590ae7fb5b3a090c33043b42e4da9 Reviewed-on: https://chromium-review.googlesource.com/642170 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/2087e32b63dd9a4bc1039b0bac08818df4e8f9c4/servo/data/uart_common.xml [modify] https://crrev.com/2087e32b63dd9a4bc1039b0bac08818df4e8f9c4/servo/drv/ec.py
,
Oct 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/236308d937ead14a4489a27106ccd6c224b268c2 commit 236308d937ead14a4489a27106ccd6c224b268c2 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Oct 24 05:39:03 2017 servo: login handler This CL adds support for the servo commands -login:[yes|no] -login (to return current status) -login_password (default root) -login_username (default test0000) This allows automated scripts to beat the login hurdle in the beginning of the boot sequence. BUG=chromium:760267 TEST=manual testing Change-Id: I1f809bb6af9ec423696400c525b0fd81d033da43 Reviewed-on: https://chromium-review.googlesource.com/724218 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> [add] https://crrev.com/236308d937ead14a4489a27106ccd6c224b268c2/servo/drv/login.py [modify] https://crrev.com/236308d937ead14a4489a27106ccd6c224b268c2/servo/drv/__init__.py [modify] https://crrev.com/236308d937ead14a4489a27106ccd6c224b268c2/servo/data/uart_common.xml [modify] https://crrev.com/236308d937ead14a4489a27106ccd6c224b268c2/servo/drv/pty_driver.py
,
Oct 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/29574f31bdb8d81b275c06cd99993c5570fd31ef commit 29574f31bdb8d81b275c06cd99993c5570fd31ef Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Oct 24 05:39:07 2017 servo: guard ec_board from garbage in the ec console In some cases, there is so much output in the ec console that ec_board cannot reliably retrieve the board name. This change ensures that the ec_board command can parse the board name without any other output in the ec console. BUG=chromium:760267 TEST=manual dut-control -p 9997 ec_board > ec_board:soraka Change-Id: I9a19ba89d4f9602b7ee11142d8574b070448dbb9 Reviewed-on: https://chromium-review.googlesource.com/724420 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/29574f31bdb8d81b275c06cd99993c5570fd31ef/servo/drv/ec.py
,
Oct 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/655865be2e0647e057c32f4d632144a0209b7a78 commit 655865be2e0647e057c32f4d632144a0209b7a78 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Oct 24 05:39:04 2017 servo: ec_gpio command usage: dut-control -p $SERVO_PORT ec_gpio > 1 AC_PRESENT . . . This command allows for programatic retrieval of the ec GPIO state. We use this to annotate power measurements for instance. BUG=chromium:760267 TEST=manual testing Change-Id: I8a8e806e3552bf62d034618715ff9d74f59ba10e Reviewed-on: https://chromium-review.googlesource.com/724421 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> [modify] https://crrev.com/655865be2e0647e057c32f4d632144a0209b7a78/servo/data/uart_common.xml [modify] https://crrev.com/655865be2e0647e057c32f4d632144a0209b7a78/servo/drv/ec.py
,
Dec 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/1c6897da76e9f642fa5505df7cc8b91400fd617d commit 1c6897da76e9f642fa5505df7cc8b91400fd617d Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Fri Dec 22 06:50:32 2017 vboot: introduce get_gbb_flags.sh introduce get_gbb_flags.sh command to make automatic annotation of power measurements easier. Also, fix issue where declaring local variables on same line as executing a command would obfuscate error code, thus not triggering set -c and continuing execution. https://github.com/koalaman/shellcheck/wiki/SC2155 Usage: $ /usr/share/vboot/bin/get_gbb_flags.sh [...] ChromeOS GBB set flags: 0x00000329. $ /usr/share/vboot/bin/get_gbb_flags.sh -e [...] ChromeOS GBB set flags: 0x00000329. ChromeOS GBB set flags listed: GBB_FLAG_DEV_SCREEN_SHORT_DELAY GBB_FLAG_FORCE_DEV_SWITCH_ON GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK GBB_FLAG_FAFT_KEY_OVERIDE GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC BUG=chromium:760267 BRANCH=none TEST=manual emerge-soraka vboot_reference cros deploy <IP> vboot_reference (on DUT) /usr/share/vboot/bin/get_gbb_flags.sh -e <same output as above> Change-Id: Idb3b993706c03e7f2831eed2cef12a04b9469fea [add] https://crrev.com/1c6897da76e9f642fa5505df7cc8b91400fd617d/scripts/image_signing/gbb_flags_common.sh [modify] https://crrev.com/1c6897da76e9f642fa5505df7cc8b91400fd617d/Makefile [modify] https://crrev.com/1c6897da76e9f642fa5505df7cc8b91400fd617d/scripts/image_signing/set_gbb_flags.sh [add] https://crrev.com/1c6897da76e9f642fa5505df7cc8b91400fd617d/scripts/image_signing/get_gbb_flags.sh
,
Jan 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b2c0874867db754f96c7979c1b234cf4c578bc3f commit b2c0874867db754f96c7979c1b234cf4c578bc3f Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Thu Jan 11 08:23:09 2018 vboot: introduce get_gbb_flags.sh introduce get_gbb_flags.sh command to make automatic annotation of power measurements easier. Also, fix issue where declaring local variables on same line as executing a command would obfuscate error code, thus not triggering set -c and continuing execution. https://github.com/koalaman/shellcheck/wiki/SC2155 Usage: $ /usr/share/vboot/bin/get_gbb_flags.sh [...] ChromeOS GBB set flags: 0x00000329. $ /usr/share/vboot/bin/get_gbb_flags.sh -e [...] ChromeOS GBB set flags: 0x00000329. ChromeOS GBB set flags listed: GBB_FLAG_DEV_SCREEN_SHORT_DELAY GBB_FLAG_FORCE_DEV_SWITCH_ON GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK GBB_FLAG_FAFT_KEY_OVERIDE GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC BUG=chromium:760267 BRANCH=none TEST=manual emerge-soraka vboot_reference cros deploy <IP> vboot_reference (on DUT) /usr/share/vboot/bin/get_gbb_flags.sh -e <same output as above> Change-Id: Idb3b993706c03e7f2831eed2cef12a04b9469fea (cherry picked from commit 1c6897da76e9f642fa5505df7cc8b91400fd617d) Reviewed-on: https://chromium-review.googlesource.com/861602 Reviewed-by: Shelley Chen <shchen@chromium.org> Commit-Queue: Shelley Chen <shchen@chromium.org> Tested-by: Shelley Chen <shchen@chromium.org> [add] https://crrev.com/b2c0874867db754f96c7979c1b234cf4c578bc3f/scripts/image_signing/gbb_flags_common.sh [modify] https://crrev.com/b2c0874867db754f96c7979c1b234cf4c578bc3f/Makefile [modify] https://crrev.com/b2c0874867db754f96c7979c1b234cf4c578bc3f/scripts/image_signing/set_gbb_flags.sh [add] https://crrev.com/b2c0874867db754f96c7979c1b234cf4c578bc3f/scripts/image_signing/get_gbb_flags.sh
,
Jan 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/055bd188538021d515fdf0e61eed9a20f131cb49 commit 055bd188538021d515fdf0e61eed9a20f131cb49 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Fri Jan 19 01:40:36 2018 servo: create common ap-driver Beating the login hurdle is one aspect that several servo automations might want to share. This CL introduces a common driver for AP console communication that houses tools to beat the login hurdle on the AP console. Going forward common utilities to do work on the AP console should be housed in ap.py, and automation drivers that interact with the AP console should inherit from or use an instance of the ap driver. CL also shores up the logic and increases the speed to beat the login hurdle. BUG=chromium:760267 TEST=manual sudo servod -b $BOARD dut-control login login:no dut-control login:yes dut-control login login:yes Change-Id: I253abf30e4f0c90bc915b31b8fe57d9b3a9ed4c0 Reviewed-on: https://chromium-review.googlesource.com/870028 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/055bd188538021d515fdf0e61eed9a20f131cb49/servo/terminal_freezer.py [delete] https://crrev.com/221071bc2592c0b5d7ef068ce866de5a78540653/servo/drv/login.py [modify] https://crrev.com/055bd188538021d515fdf0e61eed9a20f131cb49/servo/drv/__init__.py [modify] https://crrev.com/055bd188538021d515fdf0e61eed9a20f131cb49/servo/data/uart_common.xml [add] https://crrev.com/055bd188538021d515fdf0e61eed9a20f131cb49/servo/drv/ap.py
,
Jan 26 2018
,
Mar 20 2018
,
Mar 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/8142d266fa53aa38e0106e06a8f7a21e9d83dfce commit 8142d266fa53aa38e0106e06a8f7a21e9d83dfce Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Mar 21 17:53:27 2018 servo: leverage pwr_avg where available pwr_avg was recently introduced as an ec command that provides a one minute averaged reading of current, voltage, and power. This change introduces the ec code and xml files required to leverage this. Now there is: - avg_ppvar_vbat_mw - avg_ppvar_vbat_ma - avg_ppvar_vbat_mv Since the command is fairly new, the code also explicitly checks for the command being available, and returns a more informative error if the failure is due to pwr_avg not being available on that ec image. Any code, such as power scripts, can then decide higher up in the stack if pwr_avg being unavailable is a deal breaker or if it's okay to default to ppvar_vbat_mw. BUG=chromium:752320, chromium:760267 TEST=manual $ dut-control avg_ppvar_vbat_mw avg_ppvar_vbat_mw:5572 (on dut without the command) $ dut-control avg_ppvar_vbat_mw Problem with ['avg_ppvar_vbat_mw'] :: cmd |pwr_avg| is not available on the ec. Change-Id: I4b9efeaa87a5c5f6ca932cfa2cec7cb135f7d388 Reviewed-on: https://chromium-review.googlesource.com/888281 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/8142d266fa53aa38e0106e06a8f7a21e9d83dfce/servo/data/ec_common.xml [modify] https://crrev.com/8142d266fa53aa38e0106e06a8f7a21e9d83dfce/servo/drv/ec.py
,
Mar 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/00da4d345b2f4807ab0c9648465d56144b2cbb27 commit 00da4d345b2f4807ab0c9648465d56144b2cbb27 Author: Todd Broch <tbroch@chromium.org> Date: Thu Mar 22 03:48:41 2018 servo: ec: Add battery_tempc control. As battery pack provides temperature lets create a control to read the value. BUG=chromium:760267 TEST=manual, sudo servod -b chell & dut-control ppvar_vbat_mv ppvar_vbat_ma ppvar_vbat_mw battery_tempc battery_tempc:24.2 ppvar_vbat_ma:312 ppvar_vbat_mv:12750 ppvar_vbat_mw:3993.88 Change-Id: I34c8393fb386b0e3beb20a3aaf1136942ec09731 Reviewed-on: https://chromium-review.googlesource.com/923410 Commit-Ready: Puthikorn Voravootivat <puthik@chromium.org> Tested-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> [modify] https://crrev.com/00da4d345b2f4807ab0c9648465d56144b2cbb27/servo/data/ec_common.xml [modify] https://crrev.com/00da4d345b2f4807ab0c9648465d56144b2cbb27/servo/drv/ec.py
,
Mar 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/6fbca6b1f33726e198309d65d38ba3a0231188a0 commit 6fbca6b1f33726e198309d65d38ba3a0231188a0 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Thu Mar 22 10:01:23 2018 servo: refactor generate_ina_controls.py Making generate_ina_controls.py more modular, and removing large hard-coded strings. This is to allow for easier extensions, and improve readability on what ina controls are being generated. This also introduces a new method to generate multiple, identical INA files used on different revisions. For instance, poppy rev 1 and rev 2 have the same INA map. To make boostrapping servod easier, this change now allows for a |revs| attribute inside the [inas].py files. |revs| is a list of revisions where this INA map applies to. See poppy_2.py for an example. Also move logic out of Makefile, and into setup.py. This way simply adding a new .py file with an inas attribute will try to generate new controls. No need to explicitly add it in the Makefile. Lastly, we've had issues before with the INA .py file formatting so this includes a helper to generate a Skeleton configuration file and help to make new files. BUG=chromium:760267 TEST=manual testing - generate poppy_r3.xml with new file - generate poppy_r3.xml with old file diff & see that the only difference is the order of some attribtues. Change-Id: I479aabc0e313adc39a30de3e07ae1d8060028069 Reviewed-on: https://chromium-review.googlesource.com/848873 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> [modify] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/Makefile [add] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/README.INA.md [add] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/__init__.py [add] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/make_ina_skeleton.py [modify] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/generate_ina_controls.py [rename] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/servo/data/poppy_2.py [modify] https://crrev.com/6fbca6b1f33726e198309d65d38ba3a0231188a0/setup.py
,
Mar 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/169cf1e78e1e43005ba4f1a38f04d9fe7290987c commit 169cf1e78e1e43005ba4f1a38f04d9fe7290987c Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Thu Mar 22 22:24:41 2018 servo: add ina retrieval mechanism. Usage: dut-control (power|current|shunt_voltage|bus_voltage|raw_|raw_calib)_rails > power_rails:ppvar_batt_r_mw, pp3300_dsw_ec_mw, ... > raw_rails:ppvar_batt_r, pp3300_dsw_ec, ... This change introduces a power_tools drv and configuration to separate out current and future power measurement commands. Right now servo gets configured with a power rail map, but the user still needs to be aware of what rails are in that map to call the controls. This simplifies scripts to collect power data. BUG=chromium:760267 TEST=manual testing $ sudo servod -b poppy -c poppy_r0.xml $ dut-control -p $PORT power_rails power_rails:pp3300_dsw_ec_mw, pp3300_dx_wlan_mw, pp3300_dx_edp_mw, pp3300_dsw_mw, pp5000_a_mw, pp3300_a_mw, ppvar_pwr_in_bb_mw, ppvar_batt_r_mw, pp3300_dx_base_mw $ dut-control -p $PORT bus_voltage_rails bus_voltage_rails:pp3300_dsw_ec_mv, pp3300_dx_wlan_mv, pp3300_dx_edp_mv, pp3300_dsw_mv, pp5000_a_mv, pp3300_a_mv, pp1800_a_mv, pp1800_u_dram_mv, pp1200_vddq_mv, pp1000_a_mv, pp975_io_mv, pp850_prim_core_mv, ppvar_gt_vin_mv, ppvar_sa_vin_mv, ppvar_vcc_vin_mv, ppvar_pwr_in_bb_mv', ppvar_batt_r_mv, pp3300_dx_base_mv Change-Id: I003a7a3e88756052db33bf37d5e6951dbf8fccf8 Reviewed-on: https://chromium-review.googlesource.com/848874 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [add] https://crrev.com/169cf1e78e1e43005ba4f1a38f04d9fe7290987c/servo/data/power_tools.xml [modify] https://crrev.com/169cf1e78e1e43005ba4f1a38f04d9fe7290987c/servo/data/generate_ina_controls.py [modify] https://crrev.com/169cf1e78e1e43005ba4f1a38f04d9fe7290987c/servo/drv/__init__.py [add] https://crrev.com/169cf1e78e1e43005ba4f1a38f04d9fe7290987c/servo/drv/power_tools.py
,
Mar 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/3decf3449f5cb9f134e0a7efadf32c563e88c6cf commit 3decf3449f5cb9f134e0a7efadf32c563e88c6cf Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Fri Mar 23 21:50:49 2018 servo: abstract ina configuration for power measurement This CL introduces a list of quick-configs for the servo command <ina_name>_cfg_reg to servo to abstract the ina type, and how to configure it for power measurements. The quick configs introduced here are: - regular_power // S0 measurements - regular_power_no_hw_avg // S0 measurements w/out avg (for debug) - low_power // < S0 measurements - low_power_no_hw_avg // < S0 measurements w/out avg (for debug) This allows for quick power collection scripts to only require a standardized call of: dut-control <ina_name>_cfg_reg:<low_power|regular_power> to properly configure the inas. So any script measuring power only needs one list: the ina list. BUG=chromium:760267 TEST=manual (1) servod -b poppy -c poppy_r1_r2.xml (2) dut-control ppvar_batt_r_cfg_reg:low_power (3) dut-control ppvar_batt_r_cfg_reg > 0x27ff (4) dut-control pp3300_dx_wlan_cfg_reg:low_power (4) dut-control pp3300_dx_wlan_cfg_reg > 0x7f27 The above example where (2) - ppvar_batt_r_mw is ina 219 The above example where (4) - pp3300_dx_wlan is ina 3221 Change-Id: I103930e6e8b0bc10326ce6cf08d81b2ac3d823da Reviewed-on: https://chromium-review.googlesource.com/617395 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/3decf3449f5cb9f134e0a7efadf32c563e88c6cf/servo/drv/ina2xx.py [modify] https://crrev.com/3decf3449f5cb9f134e0a7efadf32c563e88c6cf/servo/data/generate_ina_controls.py [modify] https://crrev.com/3decf3449f5cb9f134e0a7efadf32c563e88c6cf/servo/data/common.xml
,
Apr 3 2018
Suggestion for a new patch: When generate Sweetberry board and scenarios files - If a certain power rail has resistor size 0 or if it is 'false', generate it only in board file, not in scenario file. This way powerlog.py won't actually query Sweetberry for this power rail. I am asking for this patch because Sweetberry firmware, rather than powerlog.py, (see change https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/905427) can't properly handle when resistor size is 0. This is different from using servo to query power rails. In the servo's case, voltage is still accessible when resistor size is 0.
,
Apr 6 2018
Having an error with sudo emerge hdctools. I encountered this error when I am trying to generate the sweetberry config from nami_rev0_inas.py, could you take a look?
Traceback (most recent call last):
File "setup.py", line 62, in <module>
'dut-control = servo.dut_control:main',
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 32, in run
ina_generator.GenerateINAControls(data_dir)
File "build/servo/data/generate_ina_controls.py", line 510, in GenerateINAControls
ina_pkg))
File "build/servo/data/generate_ina_controls.py", line 237, in __init__
self._board_content, self._scenario_content = self.DumpADCs(ina_pkg.inas)
File "build/servo/data/generate_ina_controls.py", line 271, in DumpADCs
'channel': slv - 64}))
TypeError: unsupported operand type(s) for -: 'str' and 'int'
,
Apr 6 2018
Suggestion for a new patch: When generating servo / sweetberry config from .py files in hdctools, cast slave address from str to int. Note: some inas have 3 channels, and the slave address is in the format of 0x40:1, this should not be a problem when generating .xml, but will be a problem when generating sweetberry configs. One suggestion: generate sweetberry channels based on order of rails in .py file, not based on slave address?
,
Apr 6 2018
one more bug -
.board file is in the format of [{},{},{}]. The comma is missing.
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/daa794dad16137c06c0e4cd455e26c6780820091 commit daa794dad16137c06c0e4cd455e26c6780820091 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Mon Apr 16 16:20:22 2018 servo: fix powertools Refactor before final submit of crrev.com/c/848874 introduced typos that make the code crash. BUG=chromium:760267 TEST=manual $ sudo servod -b soraka -c poppy_r3.xml $ dut-control -p $PORT power_rails power_rails:pp3300_dsw_ec_mw, pp1000_a_mw, pp3300_dx_edp_mw, pp3300_dsw_mw, pp3300_dx_wlan_mw, pp3300_h1_mw, pp1800_a_mw, pp1800_u_dram_mw, pp975_io_mw, ppvar_batt_r_mw, pp850_prim_core_mw, pp1200_vddq_mw, ppvar_sys_bl_mw, pp5000_a_mw, pp3300_a_mw, ppvar_dx_base_mw, pp3300_dx_touch_mw, ppvar_pwr_in_bb_mw Change-Id: I81b9098bfd80fe6caf90ac5b62aa264c777db8af Reviewed-on: https://chromium-review.googlesource.com/1004556 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/daa794dad16137c06c0e4cd455e26c6780820091/servo/drv/power_tools.py
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/913746f172abf91e2253ec526e124e242035c885 commit 913746f172abf91e2253ec526e124e242035c885 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Mon Apr 16 16:20:39 2018 servo: fix sweetberry config generation - cast slv addresses into int if they are a string in the config file - output valid pretty-printed json for .board file BUG=chromium:760267 TEST=manual testing made a dummy config - json is properly comma separated now - 0x40, and '0x40' both output the same result Change-Id: I897460bfbd729016c060efc2417c1cb2708c7fed Reviewed-on: https://chromium-review.googlesource.com/1004654 Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Mengqi Guo <mqg@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/913746f172abf91e2253ec526e124e242035c885/servo/data/generate_ina_controls.py
,
Apr 19 2018
,
May 1 2018
,
May 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/a9e3afaf6a77a7918c92e03d54b2423ba4f4af05 commit a9e3afaf6a77a7918c92e03d54b2423ba4f4af05 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Sat May 05 03:37:45 2018 servo: improve powertools.py (1) Share data across rail-types, so that we don't do unnecessary recomputation. With this change, calling: dut-control -p $PORT power_rails dut-control -p $PORT current_rails will allow current_rails to leverage that power_rails already parsed the data previously. (2) create a common rail getter function that leverages the xml configuration to specify what rails to return, thus reducing code-size. BUG=chromium:760267 TEST=manual testing with print statements Change-Id: I451f137ec7e5de8053691a5991ca42e0870db0d4 Reviewed-on: https://chromium-review.googlesource.com/1018602 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/a9e3afaf6a77a7918c92e03d54b2423ba4f4af05/servo/data/power_tools.xml [modify] https://crrev.com/a9e3afaf6a77a7918c92e03d54b2423ba4f4af05/servo/drv/power_tools.py
,
May 9 2018
,
Jul 16
,
Jul 17
,
Jul 27
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/cd68cd250118217a471e34cfbcfc18c7cf9347f3 commit cd68cd250118217a471e34cfbcfc18c7cf9347f3 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Fri Jul 27 15:51:03 2018 stats_manager: prepare StatsManager to be a utility used in hdctools This is the first CL in a series of CLs to start using StatsManager in servo/hdctools (package depends on ec-devutils, as in this package). This CL: - beefs up StatsManager to handle unavailable units more gracefully - adds a few more tests to stats_manager_unittest.py - adds some minor unit testing for powerlog's file retrieval logic BRANCH=None BUG=chromium:760267 TEST=manual testing, unit tests still pass, powerlog still works Change-Id: Ifcdfcc482008484fbc21326c6f087ebf466c3e74 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140025 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/cd68cd250118217a471e34cfbcfc18c7cf9347f3/extra/usb_power/stats_manager.py [modify] https://crrev.com/cd68cd250118217a471e34cfbcfc18c7cf9347f3/extra/usb_power/powerlog.py [add] https://crrev.com/cd68cd250118217a471e34cfbcfc18c7cf9347f3/extra/usb_power/powerlog_unittest.py [modify] https://crrev.com/cd68cd250118217a471e34cfbcfc18c7cf9347f3/extra/usb_power/stats_manager_unittest.py
,
Jul 31
,
Jul 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/46ba3c02d7e1749818aab5794d4051f111499ab6 commit 46ba3c02d7e1749818aab5794d4051f111499ab6 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Jul 31 23:37:03 2018 stats_manager: remove expliting printing from stats_manager StatsManager is a library shared across some modules. It shouldn't print anything itself, but rather use logging & return a formatted summary that can be printed. Also take this opportunity to replace majority of explicit print calls in powerlog with logger module. BRANCH=None BUG=chromium:760267 TEST=manual testing, output as expected still for powerlog Change-Id: I0ed2ccaa45bbd1261119a1446110beadb075c1a2 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140026 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/46ba3c02d7e1749818aab5794d4051f111499ab6/extra/usb_power/stats_manager.py [modify] https://crrev.com/46ba3c02d7e1749818aab5794d4051f111499ab6/extra/usb_power/powerlog.py [modify] https://crrev.com/46ba3c02d7e1749818aab5794d4051f111499ab6/extra/usb_power/stats_manager_unittest.py
,
Jul 31
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/9b4909334c5b2531e9dd08d81ca00f51ddd1a906 commit 9b4909334c5b2531e9dd08d81ca00f51ddd1a906 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Jul 31 23:37:03 2018 stats_manager: replace prefixes with flags in StatsManager StatsManager right now uses a '__' prefix to indicate that sample_msecs should be the first key in the summary. Additionally, there is a NOSHOW_PREFIX to potentially hide rails in the summary. This CL replaces that approach with constructor arguments to feed into the StatsManager what rails to hide, and the order to print a summary. This results in cleaner code, and less information leakage across classes as hiding & sorting becomes an implementation detail. It also adds two new unit tests to StatsManagerTest to verify this behavior works as intended. As a nit this CL also replaces AddValue with AddSample as Sample is more descriptive for the use-cases. BRANCH=None BUG=chromium:760267 TEST=manual testing, same output as before, and unittests still pass Change-Id: I52ca0d85c4600691fce8d4c74fd2a81fc4aa440f Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140027 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/9b4909334c5b2531e9dd08d81ca00f51ddd1a906/extra/usb_power/stats_manager.py [modify] https://crrev.com/9b4909334c5b2531e9dd08d81ca00f51ddd1a906/extra/usb_power/powerlog.py [modify] https://crrev.com/9b4909334c5b2531e9dd08d81ca00f51ddd1a906/extra/usb_power/stats_manager_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/b3b220a8869479aad5dbfd0a11903ce5d28c6c4b commit b3b220a8869479aad5dbfd0a11903ce5d28c6c4b Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Aug 01 07:05:03 2018 stats_manager: StatsManager returns file save locations Some test code currently duplicates knowledge by telling StatsManager where to save a file and then having to figure out where it stored the files again. This CL has StatsManager return the save locations to simplfy code. This potentially allows for informative logging on where information was stored. BRANCH=None BUG=chromium:760267 TEST=unit tests still pass Change-Id: I54b5873a4a3ddade9a73da0792c1947445759ad4 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140028 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/b3b220a8869479aad5dbfd0a11903ce5d28c6c4b/extra/usb_power/stats_manager.py [modify] https://crrev.com/b3b220a8869479aad5dbfd0a11903ce5d28c6c4b/extra/usb_power/stats_manager_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/aad29cce9475d04e3c92e5a6636ef04c335458ef commit aad29cce9475d04e3c92e5a6636ef04c335458ef Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Aug 01 07:05:03 2018 stats_manager: Avoid losing data In the case of multiple StatsManager, we might get data clobbered. That's particularly bad on long-running tests. This CL introduces two methods to make sure output files are unique in a directory. (1) on init, the user can supply a StatsManagerID (smid) that will be prepended to all output files. E.g. if the smid is 'ec' the summary will be stored at ec_summary.txt (2) should that fail because multiple StatsManagers are using the same smid supplied (or none were supplied) a simple file rotation is done where an integer suffix keeps getting incremented until the filename is unique. E.g. if summary.txt already exists, then summary1.txt will be created. This is not threadsafe at all so the user still have to use some caution to avoid clobbering their own data. BRANCH=None BUG=chromium:760267 TEST=unit tests still all pass Change-Id: I6cc083259362ee20e0242b94ac7cbb1228a06a7a Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140029 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/aad29cce9475d04e3c92e5a6636ef04c335458ef/extra/usb_power/stats_manager.py [modify] https://crrev.com/aad29cce9475d04e3c92e5a6636ef04c335458ef/extra/usb_power/stats_manager_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/c7670aeaa3c67890a3a001795a6f7127656df264 commit c7670aeaa3c67890a3a001795a6f7127656df264 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Aug 01 07:05:04 2018 stats_manager: add title banner pretty-printing If a title is supplied it now gets printed centralized on top of the summary when calling SummaryToString. BRANCH=None BUG=chromium:760267 TEST=unit tests are passing Change-Id: I7c59896ebac82d2ee7b632fd18350b9b4fff2c24 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140030 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/c7670aeaa3c67890a3a001795a6f7127656df264/extra/usb_power/stats_manager.py [modify] https://crrev.com/c7670aeaa3c67890a3a001795a6f7127656df264/extra/usb_power/stats_manager_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/5a060f1a56f915dca41f4ee77673f66a89a5d0ea commit 5a060f1a56f915dca41f4ee77673f66a89a5d0ea Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Aug 01 07:05:05 2018 stats_manager: accept_nan support This CL introduces a flag to StatsManager that allows for 'NaN' values to be recorded inside StatsManager. The motivation here is that if a sample fails to record it might be more desirable to record a 'NaN' than to just skip the sample, to keep timelines correct, and to not hide errors in the test-run. Also adds necessary tests for that behavior. BRANCH=None BUG=chromium:806146, chromium:760267 TEST=unit tests still pass Change-Id: If17b7f52ba4a05e9e007c73bfa5d667fe36b74b3 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140031 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/5a060f1a56f915dca41f4ee77673f66a89a5d0ea/extra/usb_power/stats_manager.py [modify] https://crrev.com/5a060f1a56f915dca41f4ee77673f66a89a5d0ea/extra/usb_power/stats_manager_unittest.py
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/60881d6546a1b8833ff7e5e675bb901112d89c42 commit 60881d6546a1b8833ff7e5e675bb901112d89c42 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Aug 01 07:05:05 2018 stats_manager: more informative nan summary output Now for the formatted output string, if any value a domain is NaN, the domains gets tagged with a * and a help text gets added at the end of the summary to highlight this issue. CQ-DEPEND=CL:1140025 BRANCH=None BUG=chromium:806146, chromium:760267 TEST=unit tests added & pass Change-Id: I30791053bb1645065fa2bfd8305cc840a4a88031 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1140032 Reviewed-by: Mengqi Guo <mqg@chromium.org> [modify] https://crrev.com/60881d6546a1b8833ff7e5e675bb901112d89c42/extra/usb_power/stats_manager.py [modify] https://crrev.com/60881d6546a1b8833ff7e5e675bb901112d89c42/extra/usb_power/stats_manager_unittest.py
,
Nov 22
,
Dec 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee commit 504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Tue Dec 25 06:06:22 2018 vboot: introduce get_gbb_flags.sh introduce get_gbb_flags.sh command to make automatic annotation of power measurements easier. Also, fix issue where declaring local variables on same line as executing a command would obfuscate error code, thus not triggering set -c and continuing execution. https://github.com/koalaman/shellcheck/wiki/SC2155 Usage: $ /usr/share/vboot/bin/get_gbb_flags.sh [...] ChromeOS GBB set flags: 0x00000329. $ /usr/share/vboot/bin/get_gbb_flags.sh -e [...] ChromeOS GBB set flags: 0x00000329. ChromeOS GBB set flags listed: GBB_FLAG_DEV_SCREEN_SHORT_DELAY GBB_FLAG_FORCE_DEV_SWITCH_ON GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK GBB_FLAG_FAFT_KEY_OVERIDE GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC BUG=chromium:760267 BRANCH=none TEST=manual emerge-soraka vboot_reference cros deploy <IP> vboot_reference (on DUT) /usr/share/vboot/bin/get_gbb_flags.sh -e <same output as above> Change-Id: Idb3b993706c03e7f2831eed2cef12a04b9469fea (cherry picked from commit 1c6897da76e9f642fa5505df7cc8b91400fd617d) Reviewed-on: https://chromium-review.googlesource.com/c/1390774 Reviewed-by: Cheng-Han Yang <chenghan@chromium.org> Commit-Queue: Cheng-Han Yang <chenghan@chromium.org> Tested-by: Cheng-Han Yang <chenghan@chromium.org> [add] https://crrev.com/504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee/scripts/image_signing/gbb_flags_common.sh [modify] https://crrev.com/504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee/Makefile [modify] https://crrev.com/504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee/scripts/image_signing/set_gbb_flags.sh [add] https://crrev.com/504204fe2c7d83c0e4dc99eadcf9cea6c9e59dee/scripts/image_signing/get_gbb_flags.sh
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5380ec8fe483ebbb4a4f61ccfa859370e13003e7 commit 5380ec8fe483ebbb4a4f61ccfa859370e13003e7 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Fri Jan 11 07:30:22 2019 vboot: introduce get_gbb_flags.sh introduce get_gbb_flags.sh command to make automatic annotation of power measurements easier. Also, fix issue where declaring local variables on same line as executing a command would obfuscate error code, thus not triggering set -c and continuing execution. https://github.com/koalaman/shellcheck/wiki/SC2155 Usage: $ /usr/share/vboot/bin/get_gbb_flags.sh [...] ChromeOS GBB set flags: 0x00000329. $ /usr/share/vboot/bin/get_gbb_flags.sh -e [...] ChromeOS GBB set flags: 0x00000329. ChromeOS GBB set flags listed: GBB_FLAG_DEV_SCREEN_SHORT_DELAY GBB_FLAG_FORCE_DEV_SWITCH_ON GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK GBB_FLAG_FAFT_KEY_OVERIDE GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC BUG=chromium:760267 BRANCH=none TEST=manual emerge-soraka vboot_reference cros deploy <IP> vboot_reference (on DUT) /usr/share/vboot/bin/get_gbb_flags.sh -e <same output as above> Change-Id: Idb3b993706c03e7f2831eed2cef12a04b9469fea (cherry picked from commit 1c6897da76e9f642fa5505df7cc8b91400fd617d) Reviewed-on: https://chromium-review.googlesource.com/c/1405221 Reviewed-by: Cheng-Han Yang <chenghan@chromium.org> Commit-Queue: Cheng-Han Yang <chenghan@chromium.org> Tested-by: Cheng-Han Yang <chenghan@chromium.org> [add] https://crrev.com/5380ec8fe483ebbb4a4f61ccfa859370e13003e7/scripts/image_signing/gbb_flags_common.sh [modify] https://crrev.com/5380ec8fe483ebbb4a4f61ccfa859370e13003e7/Makefile [modify] https://crrev.com/5380ec8fe483ebbb4a4f61ccfa859370e13003e7/scripts/image_signing/set_gbb_flags.sh [add] https://crrev.com/5380ec8fe483ebbb4a4f61ccfa859370e13003e7/scripts/image_signing/get_gbb_flags.sh |
|||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by coconutruben@chromium.org
, Aug 29 2017