From 473f1211f15323794b8cc17c7fed1b32802c6c72 Mon Sep 17 00:00:00 2001 From: Joseph Jang Date: Mon, 4 Oct 2021 18:33:12 +0800 Subject: [PATCH 1/2] dumpstate: Add support to get GSC DEBUG DUMP In order to get GSC DEBUG DUMP in bugreport zip file, we add a new console command "./vendor/bin/hw/citadel_updater -D" to retrieve 1KB GSC DEBUG DUMP for dumpstate. If so, we could check GSC DEBUG DUMP in dumpstate_board.txt from bugreport. File: dumpstate_board.txt ------ Citadel VERSION (vendor/bin/hw/citadel_updater -lv) ------ 0.0.2/nugget_v0.0.1138-399621c+ 2021-10-07 08:53:24 josephjang Chip: Google Dauntless D2 (evt) Board: 0 RO_A: 0.1.1/17af49b9 ok RO_B: * 0.1.1/b0de9d69 ok RW_A: * 0.0.2/nugget_v0.0.1138-399621c+ ok RW_B: Error ------ Citadel STATS (vendor/bin/hw/citadel_updater --stats) ------ hard_reset_count 1 time_since_hard_reset 335976980 wake_count 5 time_at_last_wake 335920127 time_spent_awake 50563801 deep_sleep_count 4 time_at_last_deep_sleep 268360610 time_spent_in_deep_sleep 285413177 time_at_ap_reset 11401 time_at_ap_bootloader_done 10939493 PHONE_ON_L: 1 VOL_UP_L: 1 VOL_DN_L: 1 TEMP.RANGE: 39,39 ------ GSC DEBUG DUMP (vendor/bin/hw/citadel_updater -D) ------ debug dump start 000007d70605 85 00 0174aa0d 00000000 000007f56df5 85 00 0174aa0d 00000000 0000080212cd 85 00 0174aa0d 00000000 00000b73fe80 85 00 0174aa0d 00000000 debug dump end ------ Section end: gsc ------ Bug: 194113345 Change-Id: I1c43c337cef49b2be4af27d2dc28797e29f0dc9a --- dumpstate/DumpstateDevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index bd148bb4..2d13031e 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -969,6 +969,7 @@ void DumpstateDevice::dumpMiscSection(int fd) { void DumpstateDevice::dumpGscSection(int fd) { RunCommandToFd(fd, "Citadel VERSION", {"vendor/bin/hw/citadel_updater", "-lv"}); RunCommandToFd(fd, "Citadel STATS", {"vendor/bin/hw/citadel_updater", "--stats"}); + RunCommandToFd(fd, "GSC DEBUG DUMP", {"vendor/bin/hw/citadel_updater", "-D"}); } // Dump essential camera debugging logs From 09f583f336319cae8769bcac9f50ed6b56c64055 Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Wed, 13 Oct 2021 09:53:23 -0700 Subject: [PATCH 2/2] gs101: recovery: add wait for dwc3 device to probe This patch adds a dependency on the dwc3 device probing before setting the sys.usb.controller property. Without this, we have a race between fastbootd starting and the dwc3 device probing. If fastbootd starts before the dwc3 device probes, then the recovery init.rc will fail to setup the USB gadget resulting in "fastboot devices" failing to detect the device. Bug: 202338035 Test: verify device is detected in fastbootd Change-Id: I146451eae03f23dde915c00af3028681be41a8c1 (cherry picked from commit f31fad844a7b94ee7c6689afd0b563da00c29118) --- conf/init.recovery.device.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.recovery.device.rc b/conf/init.recovery.device.rc index 7b341200..c94d079f 100644 --- a/conf/init.recovery.device.rc +++ b/conf/init.recovery.device.rc @@ -1,4 +1,5 @@ on init + wait /sys/devices/platform/11110000.usb/11110000.dwc3/driver 10 setprop sys.usb.controller "11110000.dwc3" setprop sys.usb.configfs 1