diff options
-rw-r--r-- | docs/usb_updater.md | 13 | ||||
-rw-r--r-- | extra/usb_updater/.gitignore | 2 | ||||
-rw-r--r-- | extra/usb_updater/Makefile | 4 | ||||
-rw-r--r-- | extra/usb_updater/gsctool.c (renamed from extra/usb_updater/usb_updater.c) | 0 | ||||
-rw-r--r-- | extra/usb_updater/usb_updater2.c | 2 | ||||
-rw-r--r-- | include/rwsig.h | 4 | ||||
-rw-r--r-- | include/tpm_vendor_cmds.h | 2 | ||||
-rwxr-xr-x | util/signer/create_released_image.sh | 10 |
8 files changed, 20 insertions, 17 deletions
diff --git a/docs/usb_updater.md b/docs/usb_updater.md index 5eb2cc2086..476b50f316 100644 --- a/docs/usb_updater.md +++ b/docs/usb_updater.md @@ -4,10 +4,13 @@ EC update over USB chip/g (Cr50) and common code (hammer, servo_micro/v4) update over USB protocols share a lot in terms of protocol and ideas, but use different code bases. -chip/g EC-side implementation is found at `chip/g/*upgrade*`, and the userspace -updater is found in `extra/usb_updater/usb_updater.c`, while common code -uses implementations in `common/*update*.c` and `include/*update*.h`, and -`extra/usb_updater/usb_updater2.c` for the userspace updater. +chip/g EC-side implementation is found in `chip/g/*upgrade*`, and the +userspace tool which provides updates over USB among with supporting other +features and interfaces is found in `extra/usb_updater/gsctool.c`. + +Common code uses implementations in `common/*update*.c` and +`include/*update*.h`, and `extra/usb_updater/usb_updater2.c` for the userspace +updater. Cr50-specific notes ------------------- @@ -24,7 +27,7 @@ is restarted, the new RO and RW are used if they pass verification and are logically newer than the existing sections. There are two ways to communicate with the Cr50 device: USB and `/dev/tpm0` -(when `usb_updater` is running on a chromebook with the Cr50 device). Originally +(when `gsctool` is running on a chromebook with the Cr50 device). Originally different protocols were used to communicate over different channels, starting with version 3 the same protocol is used. diff --git a/extra/usb_updater/.gitignore b/extra/usb_updater/.gitignore index 5f2aa1f17b..e356628d7d 100644 --- a/extra/usb_updater/.gitignore +++ b/extra/usb_updater/.gitignore @@ -1,2 +1,2 @@ -usb_updater +gsctool usb_updater2 diff --git a/extra/usb_updater/Makefile b/extra/usb_updater/Makefile index f7b74a6f94..49b8a1af2c 100644 --- a/extra/usb_updater/Makefile +++ b/extra/usb_updater/Makefile @@ -4,7 +4,7 @@ CC ?= gcc PKG_CONFIG ?= pkg-config -PROGRAMS := usb_updater usb_updater2 +PROGRAMS := gsctool usb_updater2 LIBS := LFLAGS := CFLAGS := -std=gnu99 \ @@ -42,7 +42,7 @@ LIBS_common = -lfmap all: $(PROGRAMS) # chip/g updater -usb_updater: usb_updater.c Makefile +gsctool: gsctool.c Makefile $(CC) $(CFLAGS) $(CFLAGS_g) $< $(LFLAGS) $(LIBS) $(LIBS_g) -o $@ # common EC code USB updater diff --git a/extra/usb_updater/usb_updater.c b/extra/usb_updater/gsctool.c index 6e79be1e3a..6e79be1e3a 100644 --- a/extra/usb_updater/usb_updater.c +++ b/extra/usb_updater/gsctool.c diff --git a/extra/usb_updater/usb_updater2.c b/extra/usb_updater/usb_updater2.c index 8204e86e70..a9901d177a 100644 --- a/extra/usb_updater/usb_updater2.c +++ b/extra/usb_updater/usb_updater2.c @@ -36,7 +36,7 @@ /* * This file contains the source code of a Linux application used to update - * EC device firmware (common code only, usb_updater takes care of cr50). + * EC device firmware (common code only, gsctool takes care of cr50). */ #define VID USB_VID_GOOGLE diff --git a/include/rwsig.h b/include/rwsig.h index 813fa06f9c..c43932b173 100644 --- a/include/rwsig.h +++ b/include/rwsig.h @@ -28,14 +28,14 @@ enum rwsig_status rwsig_get_status(void); /* * Aborts current verification, also prevents RWSIG task from automatically * jumping to RW. - * This is used by usb_updater when a RW update is required, giving it enough + * This is used by usb_updater2 when a RW update is required, giving it enough * time to actually perform the update. */ void rwsig_abort(void); /* * Tells RWSIG task to jump to RW immediately, if the signature is correct. - * This is used by usb_updater when no RW update is required, to speed up + * This is used by usb_updater2 when no RW update is required, to speed up * boot time. */ void rwsig_continue(void); diff --git a/include/tpm_vendor_cmds.h b/include/tpm_vendor_cmds.h index b46e0af754..1166884b7e 100644 --- a/include/tpm_vendor_cmds.h +++ b/include/tpm_vendor_cmds.h @@ -9,7 +9,7 @@ /* * This file includes definitions of extended/vendor TPM2 commands and their * return codes. The definitions are shared between the embedded code and the - * usb_updater utility running on the host. + * gsctool utility running on the host. */ /* Extension and vendor commands. */ diff --git a/util/signer/create_released_image.sh b/util/signer/create_released_image.sh index da6f992d26..79b9c65055 100755 --- a/util/signer/create_released_image.sh +++ b/util/signer/create_released_image.sh @@ -91,7 +91,7 @@ prepare_image() { dd if="${TMPD}/0.bin" of="${RESULT_FILE}" conv=notrunc dd if="${TMPD}/1.bin" of="${RESULT_FILE}" seek=262144 bs=1 conv=notrunc - # A typical Cr50 version reported by usb_updater looks as follows: + # A typical Cr50 version reported by gsctool looks as follows: # RO_A:0.0.10 RW_A:0.0.22[ABCD:00000013:00000012] ...(the same for R[OW]_B). # # In case Board ID field is not set in the image, it is reported as @@ -125,7 +125,7 @@ prepare_image() { print "r" $1 ".w" $2 }' - raw_version="$("${USB_UPDATER}" -b "${RESULT_FILE}")" || + raw_version="$("${GSCTOOL}" -b "${RESULT_FILE}")" || ( echo "${ME}: Failed to retrieve blob version" >&2 && exit 1 ) version="$(awk "${awk_prog}" <<< "${raw_version}" )" @@ -166,9 +166,9 @@ dest_dir= IMAGE_SIZE='524288' export RESULT_FILE -USB_UPDATER="${EC_ROOT}/extra/usb_updater/usb_updater" -if [[ ! -x "${USB_UPDATER}" ]]; then - echo "${ME}: usb_updater not found, run \"make -C extra/usb_updater\"" >&2 +GSCTOOL="${EC_ROOT}/extra/usb_updater/gsctool" +if [[ ! -x "${GSCTOOL}" ]]; then + echo "${ME}: gsctool not found, run \"make -C extra/usb_updater\"" >&2 exit 1 fi |