Patch actual board name into the USB iProduct string descriptor

"SIMtrace 2 compatible device" is pretty generic.  Let's have the
actual board name inside the string descriptors, giving a more
user friendly experience in case users are issuing 'lsusb' and the
like.

Change-Id: Ibcc338b504bd2a1605e31d7f5eadb7161f547c6a
This commit is contained in:
Harald Welte 2019-12-06 19:17:53 +01:00
parent 0a7c691b90
commit 36f888f8b5
10 changed files with 15 additions and 6 deletions

View File

@ -195,7 +195,11 @@ $(BIN) $(OBJ):
usbstring/usbstring: usbstring/usbstring.c
gcc $^ -o $@
apps/$(APP)/usb_strings_generated.h: apps/$(APP)/usb_strings.txt usbstring/usbstring
.PHONY: apps/$(APP)/usb_strings.txt.patched
apps/$(APP)/usb_strings.txt.patched: apps/$(APP)/usb_strings.txt
sed "s/PRODUCT_STRING/$(shell cat libboard/$(BOARD)/product_string.txt)/" $< > $@
apps/$(APP)/usb_strings_generated.h: apps/$(APP)/usb_strings.txt.patched usbstring/usbstring
cat $< | usbstring/usbstring > $@
define RULES
@ -235,6 +239,7 @@ log:
lsof $(SERIAL) && echo "log is already opened" || ( sed -u "s/\r//" $(SERIAL) | ts )
clean:
-rm -f apps/$(APP)/usb_strings.txt.patched
-rm -fR $(OBJ)/*.o $(BIN)/*.bin $(BIN)/*.elf $(BIN)/*.elf.txt $(BIN)/*.map $(BIN)/*.lst `find . -name \*.p`
install:

View File

@ -1,5 +1,5 @@
sysmocom - s.f.m.c. GmbH
SIMtrace 2 compatible device
PRODUCT_STRING
SIMtrace Sniffer
SIMtrace CCID
SIMtrace Card Emulation

View File

@ -1,5 +1,5 @@
sysmocom - s.f.m.c. GmbH
SIMtrace 2 compatible device
PRODUCT_STRING
DFU (Device Firmware Upgrade)
RAM
Flash (Application Partition)

View File

@ -1,5 +1,5 @@
sysmocom - s.f.m.c. GmbH
SIMtrace 2 compatible device
PRODUCT_STRING
SIMtrace Sniffer
SIMtrace CCID
SIMtrace Card Emulation

View File

@ -1,5 +1,5 @@
sysmocom - s.f.m.c. GmbH
SIMtrace 2 compatible device
PRODUCT_STRING
SIMtrace Sniffer
SIMtrace CCID
SIMtrace Card Emulation

View File

@ -1,5 +1,5 @@
sysmocom - s.f.m.c. GmbH
SIMtrace 2 compatible device
PRODUCT_STRING
SIMtrace Sniffer
SIMtrace CCID
SIMtrace Card Emulation

View File

@ -0,0 +1 @@
sysmoOCTSIM-Tester

View File

@ -0,0 +1 @@
OWHW

View File

@ -0,0 +1 @@
sysmoQMOD (Quad Modem)

View File

@ -0,0 +1 @@
SIMtrace 2