Update readme

This commit is contained in:
2022-07-17 22:41:25 +02:00
parent 057920600f
commit a9079e8b5c

View File

@@ -24,7 +24,7 @@ cd gnuk/src
make
```
Then, we will have "gnuk.bin" under src/build directory.
Then, you will have "gnuk.bin" under src/build directory.
***Please read section 'USB vendor ID and product ID' below.***
@@ -85,36 +85,30 @@ See doc/note/firmware-update.
How to debug
============
First you must compile the Gnuk firmware with --enable-debug option. Gnuk has two interfaces, one is CCID/ICCD device and another is virtual COM port. Open virtual COM port by:
Ensure that you have arm-none-eabi-gdb installed and then you must compile the Gnuk firmware with --enable-debug option. After flashing Gnuk debug firmware one will see two interfaces, one is CCID/ICCD device and the another is a virtual COM port.
Open the virtual COM with the following command:
```
cu -l /dev/ttyACM0
picocom /dev/ttyACM0
```
and you will see debug output of Gnuk firmware.
and you will see debug output of Gnuk.
We can use GDB.
$ arm-none-eabi-gdb gnuk.elf
You can now use GDB with the following command.
```
arm-none-eabi-gdb src/build/gnuk.elf
```
Inside GDB, we can connect OpenOCD by:
```
(gdb) target remote localhost:3333
or
(gdb) target extended-remote localhost:3333
You can see the output of PCSCD:
```
/etc/init.d/pcscd stop
LIBCCID_ifdLogLevel=7 /usr/sbin/pcscd --debug --foreground
```
You can observe the traffic of USB using "usbmon". See the file: linux/Documentation/usb/usbmon.txt
You can see the output of PCSCD with the following command:
```
/usr/bin/pcscd --debug --foreground
```
You can also observe the traffic of the USB interface using "usbmon".
USB vendor ID and product ID (USB device ID)
============================================
@@ -123,17 +117,11 @@ When you have a vendor ID and assign a product ID for Gnuk, edit the file GNUK_U
When you are modifing Gnuk and installing the binary to device, you should replace the vendor string and serial number to yours (in the file GNUK_USB_DEVICE_ID and SERIALNO of the script of src/configure), so that users can see it's not by original vendor, and it is modified version.
FSIJ allows you to use USB device ID of FSIJ (234b:0000) for devices with Gnuk under one of following conditions:
* For everyone for experimental purpose:
- You must not distribute a binary with FSIJ's USB device ID, but must use the binary by yourself only for your experiment. Note that "Distributing binary" includes distributing a device which holds the binary.
* For general individuals:
- You must use your Gnuk device with a card serial number which is *not* by FSIJ. Easy one would be a card serial number generated by chip unique ID.
* For individuals with explicit permission from FSIJ.
- You should have an assigned card serial number by FSIJ, please use that number for your device.
(There a file 'GNUK_SERIAL_NUMBER' in the official release.)