summaryrefslogtreecommitdiff
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* hammer: Add don boardShou-Chieh Hsu2021-03-051-0/+1
| | | | | | | | | | | | | | | | A close hammer derivative. BRANCH=kukui BUG=b:176570185 TEST=make BOARD=don Signed-off-by: Shou-Chieh Hsu <shouchieh@google.com> Change-Id: I8e3005ac07df1bb2dc6ef519a806fb093a1f7656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2735214 Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Tested-by: Shou-Chieh Hsu <shouchieh@chromium.org>
* board/icarus: initial it81202 based boardDino Li2021-03-031-0/+2
| | | | | | | | | | | | | | | | This change is based on jacuzzi's board code and modified for it81202. BUG=b:180668427 BRANCH=none TEST=- Booted to kernel. - Battery charging/discharging works fine. - LEDs works fine. Change-Id: Ie6e7763fe7bd652ae87e69ddbba08c5022b0818c Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706663 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* flash_fp_mcu: Fix Guybrush's gpiochip base from 320 -> 256Bhanu Prakash Maiya2021-03-011-6/+6
| | | | | | | | | | | | BRANCH=none BUG=b:181349369 TEST=None. Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Change-Id: I822d91e26448e3ed9ee0bd2f6abe2ffdc016b345 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727864 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_fp_mcu: Fix Zork's gpiochip base from 320 -> 256Bhanu Prakash Maiya2021-03-011-6/+6
| | | | | | | | | | | | | | | | | On Zork's SoC change was caused by changing the amount of reserved space for GPIO banks from 0x300 to 0x400. This resulted in base change. Previous: 512 - 192 = 320 Current: 512 - 256 = 256 BRANCH=none BUG=b:181349369 TEST=1. Run flash_fp_mcu on Zork device with FW 13434.212 Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Change-Id: Ied4a5fd9281d59f1bfa30a4ee9677f9a0a11387e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727863 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* genvif: Trigger OverCurrent Protection by CONFIG_USBC_OCPDenis Brockus2021-02-251-2/+2
| | | | | | | | | | | | | | | BUG=b:181194535 BRANCH=none TEST=make buildall TEST=Check base VIF output Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ic1d9415137570e0d52cd8393c36df572e515deef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2716158 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* util/iteflash: ftdi_usb_purge_buffers is deprecatedPatrick Georgi2021-02-241-0/+3
| | | | | | | | | | | | | | | According to http://developer.intra2net.com/mailarchive/html/libftdi/2018/msg00105.html there has been a renaming going on. To support both old and new libftdi disable the deprecation warning (that we then promote to an error). Signed-off-by: Patrick Georgi <pgeorgi@google.com> Change-Id: I1df660cb7e8d8c8a410a8d9ee5e4a45108dad493 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692690 Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
* gdbinit: Add trailing newlineCraig Hesling2021-02-181-1/+1
| | | | | | | | | | | | BRANCH=none BUG=none TEST=none Change-Id: I6c518e6d1cf98de0f69a75f6952e2e9ed55a147e Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2703454 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* gdbinit: Change reg32 to ec-reg32Craig Hesling2021-02-181-2/+3
| | | | | | | | | | | | | | | This makes it easier to find ec-* commands using tab complete. BRANCH=none BUG=none TEST=BOARD=nucleo-h743zi GDBPORT=2331 GDBSERVER=segger gdb-multiarch > ec-reg32 0x08000b6c 4 Change-Id: Id61d130f2350b4830df4f1db552aba072d00c06e Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2703453 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* gdbinit: Fix ec-connnect cmdCraig Hesling2021-02-181-2/+2
| | | | | | | | | | | | | | | | When running this command, you would receive a python indention error and it would fail. BRANCH=none BUG=none TEST=BOARD=nucleo-h743zi GDBPORT=2331 GDBSERVER=segger gdb-multiarch > ec-connect Change-Id: I0b0800949d24ad1603a97ee436a6b8a3bec967f7 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2703452 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_jlink: Pythonify the ip checkCraig Hesling2021-02-171-1/+1
| | | | | | | | | | | BRANCH=none BUG=none TEST=./util/flash_jlink.py --ip '' --board=nucleo-h743zi --image ./build/nucleo-h743zi/ec.bin Change-Id: Ibe5ec4d64173c83be837bcd08143d57a1d354d15 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2701193 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_jlink: Add nucleosCraig Hesling2021-02-171-0/+3
| | | | | | | | | | | | | BRANCH=none BUG=none TEST=./util/flash_jlink.py --ip '' --board=nucleo-h743zi --image ./build/nucleo-h743zi/ec.bin TEST=./util/flash_jlink.py --ip '' --board=nucleo-dartmonkey --image ./build/nucleo-dartmonkey/ec.bin TEST=Can't test nucleo-f412zg, but confirmed the spelling is correct. Change-Id: I4d09bddb7640c74b8803b48530d243111940d2e1 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2701192 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* extra/util: replace deprecated sys_siglist with strsignalAdrian Ratiu2021-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Starting with Glibc 2.32: * The deprecated arrays sys_siglist, _sys_siglist, and sys_sigabbrev are no longer available to newly linked binaries, and their declarations have been removed from <string.h>. They are exported solely as compatibility symbols to support old binaries. All programs should use strsignal instead. https://sourceware.org/pipermail/libc-announce/2020/000029.html BUG=chromium:1171287 BRANCH=none TEST=Local builds on x86_64 / eve and arm / kevin. Sent SIGINT to iteflash and verified output. Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com> Change-Id: I8b4deaf8743c806a9610863648b345be3b35e1b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2698188 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
* CBI: Add rework_id fieldstabilize-rust-13795.B-mainThejaswani Puta thejaswani.putta@intel.com2021-02-162-18/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field will be used to describe all the reworks performed on a board which includes the mandatory, optional and feature reworks. Also modified existing command handlers under ectool and cbi-util tool to support 64 bit length data. Includes build fix for targets where long int is not 64 bits. BUG: b:170385859 BUILD TEST: make BOARD=<BOARD_NAME> -j; make runfuzztests make runhosttests setup_board, cros_workon & emerge-<32-bit target> ec-utils TEST: ./cbi-util create --file ~/cbi_image --board_version 1 --oem_id 2 --sku_id 255 --dram_part_num "01654329efghac" --model_id 15 --rework_id 123456789123456712 --size 256 CBI image is created successfully TEST: ./cbi-util show --file ~/cbi_image CBI image: /home/thejaswani/cbi_image TOTAL_SIZE: 47 Data Field: name: value (hex, tag, size) BOARD_VERSION: 1 (0x1, 0, 1) OEM_ID: 2 (0x2, 1, 1) SKU_ID: 255 (0xff, 2, 1) MODEL_ID: 15 (0xf, 5, 1) REWORK_ID: 123456789123456712 (0x1b69b4bacd05ec8, 9, 8) DRAM_PART_NUM: 01654329efghac (3, 15) Data validated successfully TEST: hexdump -C ~/cbi_image 00000000 43 42 49 1e 00 00 2f 00 00 01 01 01 01 02 02 01 |CBI.../.........| 00000010 ff 05 01 0f 09 08 c8 5e d0 ac 4b 9b b6 01 03 0f |.......^..K.....| 00000020 30 31 36 35 34 33 32 39 65 66 67 68 61 63 00 ff |01654329efghac..| 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000100 TEST: localhost ~ # ectool cbi set 9 98765432 8 localhost ~ # ectool cbi get 9 As uint: 98765432 (0x5e30a78) As binary: 78 0a e3 05 00 00 00 00 localhost ~ # ectool cbi set 9 123456789123456712 8 localhost ~ # ectool cbi get 9 As uint: 123456789123456712 (0x1b69b4bacd05ec8) As binary: c8 5e d0 ac 4b 9b b6 01 localhost ~ # ectool cbi set 9 1234 2 localhost ~ # ectool cbi get 9 As uint: 1234 (0x4d2) As binary: d2 04 TEST: > cbi(from EC Console) 2021-01-19 20:59:56 [80.979692 CBI Reading board info] 2021-01-19 20:59:56 CBI_VERSION: 0x0000 2021-01-19 20:59:56 TOTAL_SIZE: 54 2021-01-19 20:59:56 BOARD_VERSION: 1 (0x1) 2021-01-19 20:59:56 OEM_ID: (Error 1) 2021-01-19 20:59:56 MODEL_ID: (Error 1) 2021-01-19 20:59:56 SKU_ID: 655361 (0xa0001) 2021-01-19 20:59:56 FW_CONFIG: 199683 (0x30c03) 2021-01-19 20:59:56 PCB_SUPPLIER: (Error 1) 2021-01-19 20:59:56 SSFC: (Error 1) 2021-01-19 20:59:56 REWORK_ID: 1234 (0x4d2) 2021-01-19 20:59:56 43 42 49 8c 00 00 36 00 00 01 01 02 04 01 00 0a |CBI...6.........| 2021-01-19 20:59:56 00 06 04 03 0c 03 00 03 19 4d 54 35 33 45 35 31 |.........MT53E51| 2021-01-19 20:59:56 32 4d 36 34 44 34 4e 57 2d 30 34 36 20 57 54 3a |2M64D4NW-046 WT:| 2021-01-19 20:59:56 45 00 09 02 d2 04 ff ff ff ff ff 7f ff ff ff ff |E...............| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2020-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| Signed-off-by: Thejaswani Puta <thejaswani.putta@intel.com> Change-Id: I073a119d43c94cd266503a0fc972a62134b3385f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2693746 Tested-by: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> Commit-Queue: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* flash_fp_mcu: Minor spacing fixCraig Hesling2021-02-121-1/+1
| | | | | | | | | | | BRANCH=none BUG=none TEST=none Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iece845abd9897abd1e341a8dbae6b0fe2aa85a29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686924 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_ec: look for npcx_monitor.bin relative to EC imageCaveh Jalali2021-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a local EC build, npcx_monitor.bin can be found at a well known location relative to ec.bin (chip/npcx/spiflashfw). So, add that to the search path. flash_ec was failing to find npcx_monitor.bin when only using the --image flag for a local build: util/flash_ec --image build/${BOARD}/ec.bin as it was looking for npcx_monitor.bin in the same directory as ec.bin. The layout in /build/${BOARD}/firmware/... has ec.bin and npcx_monitor.bin in the same directory, but a local build in the EC tree uses build/${BOARD}/chip/npcx/spiflashfw/npcx_monitor.bin. Also, adding the ${BOARD} environment variable as the default board type when --board is not specified. This matches the behavior of the makefiles. In this case, we can invoke flash_ec without arguments. BRANCH=none BUG=b:132350402 TEST=used flash_ec to update the EC on brya Change-Id: I669f52cc4fe480ae23914d9fcbe67aadd18ed6c3 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2689597 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
* flash_fp_mcu: Add initial support for strongbadCraig Hesling2021-02-111-1/+36
| | | | | | | | | | | | | | | | | | Caveats * Need to fix modalias for strongbad * Need to fix driver binding so that the gpios are not reset * Need to fix external nrst pull BRANCH=none BUG=b:145245345, b:172966748, b:179533783, b:179530529, b:179839337 TEST=emerge-strongbad chromeos-base/ec-utils-test cros deploy dut1 chromeos-base/ec-utils-test ./flash_fp_mcu custom-strongbad-evt-image.bin Change-Id: I33d8fee21a2afbf8f5c399e6cb47c2095d833f57 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654737 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_fp_mcu: Add check for drivers that change nrst and boot0Craig Hesling2021-02-111-1/+15
| | | | | | | | | | | | | | This helps identifying driver/device-tree configs that are tampering with the nrst and boot0 pin states. BRANCH=none BUG=b:179530529 TEST=Deploy to coachz with driver that reset nrst and boot0 pins Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ia5d603f8ce49022e48b7b1d623c3b2da6926a6ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686579 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_fp_mcu: Refactor to use gpio functionCraig Hesling2021-02-111-20/+41
| | | | | | | | | | | | | | This makes the script a bit more readable and allows for implementing more generic gpio handling. BRANCH=none BUG=b:145245345 TEST=Test on hatch Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I80e3b9c7e322d53bb3eecfcb9da47cacc3de919c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2658367 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Revert "CBI: Add rework_id field"Peter Marheine2021-02-102-93/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 48ce00b56ce350cbec0e67b1b489aaa145c2b3a4. Reason for revert: fails to build on targets where unsigned long is not 64 bits BUG: chromium:1176495 Original change's description: > CBI: Add rework_id field > > This field will be used to describe all the reworks performed on > a board which includes the mandatory, optional and feature reworks. > > Also modified existing command handlers under ectool and cbi-util tool > to support 64 bit length data. > > BUG: b:170385859 > TEST: ./cbi-util create --file ~/cbi_image --board_version 1 > --oem_id 2 --sku_id 255 --dram_part_num "01654329efghac" > --model_id 15 --rework_id 123456789123456712 --size 256 > CBI image is created successfully > > TEST: ./cbi-util show --file ~/cbi_image > CBI image: /home/thejaswani/cbi_image > TOTAL_SIZE: 47 > Data Field: name: value (hex, tag, size) > BOARD_VERSION: 1 (0x1, 0, 1) > OEM_ID: 2 (0x2, 1, 1) > SKU_ID: 255 (0xff, 2, 1) > MODEL_ID: 15 (0xf, 5, 1) > REWORK_ID: 123456789123456712 (0x1b69b4bacd05ec8, 9, 8) > DRAM_PART_NUM: 01654329efghac (3, 15) > Data validated successfully > > TEST: hexdump -C ~/cbi_image > 00000000 43 42 49 1e 00 00 2f 00 00 01 01 01 01 02 02 01 |CBI.../.........| > 00000010 ff 05 01 0f 09 08 c8 5e d0 ac 4b 9b b6 01 03 0f |.......^..K.....| > 00000020 30 31 36 35 34 33 32 39 65 66 67 68 61 63 00 ff |01654329efghac..| > 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > * > 00000100 > > TEST: > localhost ~ # ectool cbi set 9 98765432 8 > localhost ~ # ectool cbi get 9 > As uint: 98765432 (0x5e30a78) > As binary: 78 0a e3 05 00 00 00 00 > > localhost ~ # ectool cbi set 9 123456789123456712 8 > localhost ~ # ectool cbi get 9 > As uint: 123456789123456712 (0x1b69b4bacd05ec8) > As binary: c8 5e d0 ac 4b 9b b6 01 > > localhost ~ # ectool cbi set 9 1234 2 > localhost ~ # ectool cbi get 9 > As uint: 1234 (0x4d2) > As binary: d2 04 > > TEST: > > cbi(from EC Console) > 2021-01-19 20:59:56 [80.979692 CBI Reading board info] > 2021-01-19 20:59:56 CBI_VERSION: 0x0000 > 2021-01-19 20:59:56 TOTAL_SIZE: 54 > 2021-01-19 20:59:56 BOARD_VERSION: 1 (0x1) > 2021-01-19 20:59:56 OEM_ID: (Error 1) > 2021-01-19 20:59:56 MODEL_ID: (Error 1) > 2021-01-19 20:59:56 SKU_ID: 655361 (0xa0001) > 2021-01-19 20:59:56 FW_CONFIG: 199683 (0x30c03) > 2021-01-19 20:59:56 PCB_SUPPLIER: (Error 1) > 2021-01-19 20:59:56 SSFC: (Error 1) > 2021-01-19 20:59:56 REWORK_ID: 1234 (0x4d2) > 2021-01-19 20:59:56 43 42 49 8c 00 00 36 00 00 01 01 02 04 01 00 0a |CBI...6.........| > 2021-01-19 20:59:56 00 06 04 03 0c 03 00 03 19 4d 54 35 33 45 35 31 |.........MT53E51| > 2021-01-19 20:59:56 32 4d 36 34 44 34 4e 57 2d 30 34 36 20 57 54 3a |2M64D4NW-046 WT:| > 2021-01-19 20:59:56 45 00 09 02 d2 04 ff ff ff ff ff 7f ff ff ff ff |E...............| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2020-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > > Change-Id: Ic8163ceaec55c429c9836f9a1e75d0de31ea072b > Signed-off-by: Thejaswani Puta <thejaswani.putta@intel.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2641127 > Reviewed-by: Keith Short <keithshort@chromium.org> > Commit-Queue: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> > Tested-by: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> Change-Id: Ifc4625446018b5a2d666205b2c9c649e75cdc138 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2684078 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org> Tested-by: Peter Marheine <pmarheine@chromium.org>
* CBI: Add rework_id fieldThejaswani Puta thejaswani.putta@intel.com2021-02-102-18/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field will be used to describe all the reworks performed on a board which includes the mandatory, optional and feature reworks. Also modified existing command handlers under ectool and cbi-util tool to support 64 bit length data. BUG: b:170385859 TEST: ./cbi-util create --file ~/cbi_image --board_version 1 --oem_id 2 --sku_id 255 --dram_part_num "01654329efghac" --model_id 15 --rework_id 123456789123456712 --size 256 CBI image is created successfully TEST: ./cbi-util show --file ~/cbi_image CBI image: /home/thejaswani/cbi_image TOTAL_SIZE: 47 Data Field: name: value (hex, tag, size) BOARD_VERSION: 1 (0x1, 0, 1) OEM_ID: 2 (0x2, 1, 1) SKU_ID: 255 (0xff, 2, 1) MODEL_ID: 15 (0xf, 5, 1) REWORK_ID: 123456789123456712 (0x1b69b4bacd05ec8, 9, 8) DRAM_PART_NUM: 01654329efghac (3, 15) Data validated successfully TEST: hexdump -C ~/cbi_image 00000000 43 42 49 1e 00 00 2f 00 00 01 01 01 01 02 02 01 |CBI.../.........| 00000010 ff 05 01 0f 09 08 c8 5e d0 ac 4b 9b b6 01 03 0f |.......^..K.....| 00000020 30 31 36 35 34 33 32 39 65 66 67 68 61 63 00 ff |01654329efghac..| 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000100 TEST: localhost ~ # ectool cbi set 9 98765432 8 localhost ~ # ectool cbi get 9 As uint: 98765432 (0x5e30a78) As binary: 78 0a e3 05 00 00 00 00 localhost ~ # ectool cbi set 9 123456789123456712 8 localhost ~ # ectool cbi get 9 As uint: 123456789123456712 (0x1b69b4bacd05ec8) As binary: c8 5e d0 ac 4b 9b b6 01 localhost ~ # ectool cbi set 9 1234 2 localhost ~ # ectool cbi get 9 As uint: 1234 (0x4d2) As binary: d2 04 TEST: > cbi(from EC Console) 2021-01-19 20:59:56 [80.979692 CBI Reading board info] 2021-01-19 20:59:56 CBI_VERSION: 0x0000 2021-01-19 20:59:56 TOTAL_SIZE: 54 2021-01-19 20:59:56 BOARD_VERSION: 1 (0x1) 2021-01-19 20:59:56 OEM_ID: (Error 1) 2021-01-19 20:59:56 MODEL_ID: (Error 1) 2021-01-19 20:59:56 SKU_ID: 655361 (0xa0001) 2021-01-19 20:59:56 FW_CONFIG: 199683 (0x30c03) 2021-01-19 20:59:56 PCB_SUPPLIER: (Error 1) 2021-01-19 20:59:56 SSFC: (Error 1) 2021-01-19 20:59:56 REWORK_ID: 1234 (0x4d2) 2021-01-19 20:59:56 43 42 49 8c 00 00 36 00 00 01 01 02 04 01 00 0a |CBI...6.........| 2021-01-19 20:59:56 00 06 04 03 0c 03 00 03 19 4d 54 35 33 45 35 31 |.........MT53E51| 2021-01-19 20:59:56 32 4d 36 34 44 34 4e 57 2d 30 34 36 20 57 54 3a |2M64D4NW-046 WT:| 2021-01-19 20:59:56 45 00 09 02 d2 04 ff ff ff ff ff 7f ff ff ff ff |E...............| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2020-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 2021-01-19 20:59:56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| Change-Id: Ic8163ceaec55c429c9836f9a1e75d0de31ea072b Signed-off-by: Thejaswani Puta <thejaswani.putta@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2641127 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> Tested-by: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com>
* flash_fp_mcu: Add config for guybrushBhanu Prakash Maiya2021-02-061-0/+16
| | | | | | | | | | | BRANCH=none BUG=b:176826659 TEST=None. Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Change-Id: Ia5139265f3f8af6aec7d0c41685f3d3bfa861d1c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2679782 Reviewed-by: Craig Hesling <hesling@chromium.org>
* util/update_release_branch.py: Build release branches on normal CQTom Hughes2021-02-051-0/+3
| | | | | | | | | | | | | | | | There appear to be differences in how the firmware CQ and normal CQ build. To avoid breaking the normal CQ, force release branch CLs to run on the normal CQ. BRANCH=none BUG=b:179509333 TEST=none Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I18655d7959451c0f5848e6ada613dd1c52bae5c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2679768 Commit-Queue: LaMont Jones <lamontjones@chromium.org> Reviewed-by: LaMont Jones <lamontjones@chromium.org>
* util/update_release_branch.py: Filter out BUG=noneTom Hughes2021-02-041-1/+12
| | | | | | | | | | | BRANCH=none BUG=b:179093018 TEST=none Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ieb1ea6a7ca7dbd5b21527ca0b1436c6ee66624ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676269 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util/update_release_branch.py: Use relative pathsTom Hughes2021-02-041-2/+2
| | | | | | | | | | | BRANCH=none BUG=b:179093018 TEST=none Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0a25000e739bc2edc665824964c51822d81c96be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676268 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: Migrate fingerprint to new release scriptTom Hughes2021-02-043-95/+10
| | | | | | | | | | | | | The update_release_branch.py script replaces update_release_branch.sh. BRANCH=none BUG=b:179093018 TEST=none Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I53c0dae20e80ae65fd217522ea450dc236963d4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676267 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: Add update_release_branch.pyAseda Aboagye2021-02-032-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a script that can be used to update release branches via a merge strategy from the main branch. It leverages the existing `update_release_branch.sh` script, but was rewritten in python and made generic such that it could work with any branch. It also allows baseboards to be specified along with a separate text file that can contain other paths of interest. The default merge strategy is the 'recursive' strategy with the 'theirs' strategy option. The user may provide a different merge strategy using the '-s' and '-X' options. The script can be invoked in the following manner: $ util/update_release_branch.py --baseboard dedede \ --relevant_paths_file util/dedede-relevant-paths.txt \ firmware-dedede-13606.B-master The syntax for the relevant_paths_file is simple. Each path should be own its own line and use the glob syntax that `git log` would expect. Comments may be used with the `#` symbol. BUG=None BRANCH=None TEST=util/update_release_branch.py --baseboard dedede \ --relevant_paths_file util/dedede-relevant-paths.txt \ firmware-dedede-13606.B-master; Verify that merge commit is made and commit message is as expected. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Iedd650104bbe6fd231805cf79aedfdca0bd16dd3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2666675 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* util/stm32mon: Give names to byte commandsCraig Hesling2021-02-031-2/+43
| | | | | | | | | | | | | | | | | | This replaces the stm32mon console output with more useful command name, instead of the command byte codes. BRANCH=none BUG=b:176500425 TEST=make -j buildall TEST=make -j proj-bloonchipper ./util/flash_ec --board=bloonchipper --verbose TEST=emerge-strongbad ec-devutils # Ran on CoachZ with patched flash_fp_mcu Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I6a8c7861ad1629ed2253c120ae38d4a1e1820dad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2234744 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* make/util: Modularize util make var buildingCraig Hesling2021-02-031-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The key objectives are to * allow util targets to be added from outside of util/build.mk (for adding tools per board, like ectool_servo) * allow for easier conditioning of tool inclusion (for auto adding tools based on characteristic, like CHIP_NPCX) * reduce the number of tools being built (we can remove irrelevant tools for some boards, like removing stm32mon for npcx boards or iteflash for stm32 boards) We have tons of boards in EC now. This takes a significant amount of time to build, so we should be a bit more careful when adding utils for all boards. This and subsequent changes sets the precedent for selectivity. This shifts the initialization/control to the board and baseboard's build.mk and allows the util/build.mk to add items to these variables. Ideally, we would use multiple variables to aggregate the utils selection from the three sources (baseboard/build.mk, board/build.mk, and util/build.mk), but I don't think the addition complexity is currently warranted. BRANCH=none BUG=b:176500425 TEST=# Check all output artifacts from before and after this CL. make clobber make buildall STATIC_VERSION=1 -j mv build build-orig # Apply the change make clobber make buildall STATIC_VERSION=1 -j diff <(find build-orig | sed 's/build-orig//' | sort) <(find build | sed 's/build//' | sort) # Nothing should be different Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I23153850eda10fc1c88d386b9f3cd8296df9c6f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606511 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: Make sure hooks do not show external diff toolSimon Glass2021-02-012-2/+4
| | | | | | | | | | | | | | | | | At present when I 'repo upload' it opens meld and shows me all the changes I have made, sometimes many times. Add the --no-ext-diff flag to two up the pre-submit scripts to fix this. BUG=none BRANCH=none TEST=repo upload... see that meld does not run Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Id48cc1654f681e19052298c1ab98911883c19318 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2665297 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* util/flash_ec: Clean up FPMCU flashingTom Hughes2021-01-291-13/+42
| | | | | | | | | | | | | | | | | | | | Add FPMCU-specific controls for flashing instead of relying on the "usbpd" versions. BRANCH=none BUG=b:177331210 TEST=With dragonclaw v0.2 connected to servo micro: (chroot) $ sudo servod -b dragonclaw (chroot) $ ./util/flash_ec --verbose --board bloonchipper --image ./build/bloonchipper/ec.bin (chroot) $ screen $(dut-control raw_fpmcu_console_uart_pty | cut -d: -f2) Cq-Depend: chromium:2637964, chromium:2638338 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0cb772f9dffd472a1e2f65a37cb714e04cf038f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2638136 Reviewed-by: Craig Hesling <hesling@chromium.org>
* docs: Run mdformat on all .md filesTom Hughes2021-01-281-59/+107
| | | | | | | | | | | BRANCH=none BUG=b:178648877 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0ac5581ba7bc512234d40dbf34222422afa9c725 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2650551 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* docs: Add instructions on using the flash_jlink.py scriptTom Hughes2021-01-261-0/+4
| | | | | | | | | | | | | | These instructions clarify how to use J-Link/J-Trace to flash the FPMCU dev boards. BRANCH=none BUG=b:178124518 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I73e0774e0721001f229e3a608262a64129d2ab44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643588 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* ec3po: fix python3 related unittest failuresRuben Rodriguez Buchillon2021-01-231-2/+2
| | | | | | | | | | | | | | | | | The new way to open the ttys was making 2 tests fail. This change addresses that by aligning the expectations with the actual calls. BRANCH=None BUG=b:173654272 TEST=./util/ec3po/run_tests.sh Ran 44 tests in 0.089s OK Change-Id: Ib550ab31436a8da093ec0af2bb0c61bb345647b2 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645699 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: log with %r rather than %s for most areasRuben Rodriguez Buchillon2021-01-211-12/+12
| | | | | | | | | | | | | | | | | | | Mainly, this is about data and oobm coming through and logging it through repr (%r) for two reasons: - it handles formatting with ticks automatically - in py3 it can help highlight where strings are used rather than byte arrays BUG=b:173654272 BRANCH=None TEST=sudo servod -b scarlet // servod startup turns off the timestamps for CPU uarts, exhibiting this path Change-Id: I7954930b658afb5b41fe8915144005d2552f3ad8 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576141 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: console log printing in py2 and py3Ruben Rodriguez Buchillon2021-01-211-9/+19
| | | | | | | | | | | | | | | | | | | | | The console log printing needs to work in py2 and py3. For this to work, the 'data' passed in needs to be treated equally in both cases. Since mostly what we care about is comparing it to other elements, we simply ensure that the data becomes a list of integers in both py2 and py3, and then we compare directly against the integer values of the characters we want to handle in a special way (\b, \t, etc). BUG=b:173654272 BRANCH=None // this shows all the correctly parsed log output from the MCUs (ec, v4, etc) in the logs TEST=sudo servod -b scarlet cat /var/log/servod_9999/latest.DEBUG Change-Id: Ibcbb95fd60619dc8234d7dd1f3d5d5c623542ce0 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576140 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: open without a bufferRuben Rodriguez Buchillon2021-01-211-2/+9
| | | | | | | | | | | | | | | | | | pty's do not support seek (and tell), so we need to open with buffer=0 for this to work in py3 as well. Additionally, this requires us to use wb+ rather than ab+ (as 'a' as no meaning on a pty). BUG=b:173654272 BRANCH=None // this shown both communication to the uart and from the uart TEST=sudo servod -b scarlet dut-control ec_board ec_board:scarlet Change-Id: I7d9bff269dfda9d360ea44165c495ceab9c7f21a Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576139 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: make py3 and py2 compatible wrt importsRuben Rodriguez Buchillon2021-01-214-11/+7
| | | | | | | | | | | | | | This change uses absolute imports in the console, and the unittest files so that they work on py2 and py3 BUG=b:173654723 BRANCH=None TEST=sudo servod Change-Id: Ic4a8d567625108bbaee4b981016df55ba887da1d Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575379 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* flash_it83xx: implement --noverifyTing Shen2021-01-072-3/+16
| | | | | | | | | | | | | | | | | | | | Support --noverify to speed up flashing. Note that --noverify is enabled by default in flash_ec script, so people need to add --verify explicitly to back to the old behavior. This reduces ~20% time on my machine (7m45s -> 5m50s). BUG=None TEST=manually, Verify the line "Verify 1048576 bytes at 0x00000000" disappeared. BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ia9e15a2f7221bd0af6da55de0bf90938a7afedeb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612688 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* adlrvpm: add Alderlake-M RVP supportSooraj Govindan2021-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Following features are enabled and verified. 1. Power sequencing 2. Host communication 3. USB TYPE-C - TCPC over PD AIC 4. H1 Close Case Debug 5. LED 6. Keyboard BRANCH=None BUG=b:169551130 TEST=Build, flash and boot the Alderlake RVP platform to OS make BOARD=adlrvpm_ite -j; sudo util/flash_ec --board=adlrvpm_ite --image=<path> Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I3ee12a0875cb6310c3b5767cab90f17f9646e02c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2584553 Tested-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* util/compare_build.sh: Fix space indentCraig Hesling2021-01-051-2/+2
| | | | | | | | | | | BRANCH=none BUG=none TEST=none Change-Id: Ibe55e5651901ebbf92e9425c0c897f74a6bb6e18 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606468 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/compare_build.sh: Auto set --private defaultCraig Hesling2021-01-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Set the default state of the --private flag to reflect the current build configuration. All that means is if the private directory exists, enable private directory linking by default. Remove the short form of --private (-p), since shflags lib implements the short flags to imply the inverse of whatever the default value is. This would be quite confusing in this case, where the default changes based on the presence of the private directory. BRANCH=none BUG=b:176500425 TEST=# With private dir ./util/compare_build.sh -h # --private should be (default: true) move private private-move ./util/compare_build.sh -h # --private should be (default: false) Change-Id: I3221935d1e140cd3a871ee23aabe0f4a0dff3975 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2605734
* util: Fix sysinfo commandTom Hughes2021-01-051-2/+1
| | | | | | | | | | | | | | | Local variable was being used for result instead of the argument passed to the function. BRANCH=none BUG=b:176758580 TEST=(nocturne) $ ectool --name=cros_fp sysinfo Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Icc7af7bfe854165f1c9d0569f27f857a9fc309e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2610931 Commit-Queue: Yicheng Li <yichengli@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org>
* ectool_keyscan: add missing null terminator to kbd_plain_xlateFabio Baltieri2020-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | strchr relies on the source string to be null terminated. This fixes a compiler warning when building outside of the chroot: util/ectool_keyscan.c: In function ‘cmd_keyscan’: util/ectool_keyscan.c:208:9: error: ‘strchr’ argument missing terminating nul [-Werror=stringop-overflow=] 208 | pos = strchr(kbd_plain_xlate, key); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ BUG=none TEST=build only, warning is gone BRANCH=none Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Iafb8249515ffa1a5f7e04a272e54a048eef9a57c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606228 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* ectool: zero out ec_response_sysinfo before usage in cmd_sysinfoFabio Baltieri2020-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | Explicitly zero out ec_response_sysinfo before usage, without that it generates a compiler warning when building otuside of chroot, with a modern compiler: util/ectool.c: In function ‘cmd_sysinfo’: util/ectool.c:1875:3: error: ‘r.current_image’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1875 | printf("%d\n", r.current_image); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... BUG=none TEST=build only, warning is gone BRANCH=none Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I2f1fecf2a8cfa8c80422fac105ee35f62290e160 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606229 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
* flash_ec: add "-U" flags for stm32 chipChen-Tsung Hsieh2020-12-301-1/+1
| | | | | | | | | | | | | | | | Disable the read protection with "-U" to program EC image. Some commands (e.g. 0x73: Write Unprotect command, 0x44: Extended Erase command) will return NACK if the read protection is enabled. BUG=b:151098124 BRANCH=none TEST=flash_ec --verbose --board=moonball --image moonball.bin Signed-off-by: Chen-Tsung Hsieh <chentsung@chromium.org> Change-Id: I7338cd5dd0b1dd29be1f35d5eda3dd938050ba40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607024 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* util: support ec_parse_panicinfo to parse RV32iTzung-Bi Shih2020-12-251-0/+31
| | | | | | | | | | | | | BRANCH=none BUG=b:176269554 TEST=emerge-asurada ec-utils && cros deploy $DUT ec-utils && /usr/sbin/ec_parse_panicinfo < x.eccrash Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: I7c46af99d5801a9ffaa7b07b61dafc4ec6227264 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2603078 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* make: Rename cryptoc path variableCraig Hesling2020-12-241-1/+1
| | | | | | | | | | | | | | | Clarify that the variable means the directory path vs the library name. BRANCH=none BUG=none TEST=make BOARD=bloonchipper TEST=# Create a dummy commit ./util/compare_build.sh -b fp Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I03a1fe03da678a972091925f61bdfafaec0d4a46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593880 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* ectool: Add inventory feature string for mux ackPrashant Malani2020-12-231-0/+2
| | | | | | | | | | | | | | | | | Update the `ectool inventory` ec_feature_names array with an entry for the "Type C Mux requires AP ack" feature. BUG=b:161327513 BRANCH=None TEST=Build and deploy ec-utils to volteer. Run 'ectool inventory' and verify that the mux ack feature shows the provided feature description string. Signed-off-by: Prashant Malani <pmalani@chromium.org> Change-Id: I0642947991dece36eb8a5c3332b305ff24ab113e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2601169 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* genvif: cleanup for Supports_USB_DataDenis Brockus2020-12-171-12/+51
| | | | | | | | | | | | | | BUG=b:149852735 BRANCH=none TEST=verify XML output Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I982dce6ecaa8cd5db7cfb15a70c7e30813dfb190 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2596837 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* util/ide-config.sh: Fix invalid cStandard c18Craig Hesling2020-12-151-1/+3
| | | | | | | | | | | | | | | | | | | | I'm not sure what changed, but VSCode doesn't recognize "c18". The next best option is c17 or gnu17. The original change to c18 was commit 971e1b069f077141e13577b11898b18e8cb739f2. BRANCH=none BUG=none TEST=./util/ide-config.sh vscode all:RW all:RO | tee .vscode/c_cpp_properties.json # Check that VSCode is happy with gnu17 in # .vscode/c_cpp_properties.json. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I6797898dc7b546f805de43e07457a98ba22cc9ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593917 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>