summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2021-05-02 13:42:36 +0200
committerPali Rohár <pali.rohar@gmail.com>2021-05-02 13:42:36 +0200
commitf9e88d6f913afd09b369f7a7a45d2959ea39b01b (patch)
treea14791d98230e51748c541afcb0e0243ca14293b
parentca035e2ec1c5face1427044eccd7783b92b6a431 (diff)
download0xFFFF-f9e88d6f913afd09b369f7a7a45d2959ea39b01b.tar.bz2
nolo: Update comments about unknown bytes in flashing protocol
-rw-r--r--src/nolo.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/nolo.c b/src/nolo.c
index c30eb77..0684145 100644
--- a/src/nolo.c
+++ b/src/nolo.c
@@ -269,14 +269,18 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i
ptr = buf;
- /* Signature */
- memcpy(ptr, "\x2E\x19\x01\x01", 4);
- ptr += 4;
+ /* File data header */
+ memcpy(ptr, "\x2E", 1);
+ ptr += 1;
- /* Space */
- memcpy(ptr, "\x00", 1);
+ /* Length of file data */
+ memcpy(ptr, "\x19", 1);
ptr += 1;
+ /* File data (ignored by NOLO): asic index: APE (0x01), device type: NAND (0x01), device index: 0 */
+ memcpy(ptr, "\x01\x01\x00", 3);
+ ptr += 3;
+
/* Hash */
hash = htons(image->hash);
memcpy(ptr, &hash, 2);
@@ -295,7 +299,7 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i
memcpy(ptr, &size, 4);
ptr += 4;
- /* Space */
+ /* Load address (ignored by NOLO) */
memcpy(ptr, "\x00\x00\x00\x00", 4);
ptr += 4;