summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2021-05-02 13:43:21 +0200
committerPali Rohár <pali.rohar@gmail.com>2021-05-02 13:43:21 +0200
commit580f1de0fea939eccc2e21cd0a2a7af5e819b53b (patch)
treef5d34385b44a3b3e93464195a44a33890a1a9333
parentf9e88d6f913afd09b369f7a7a45d2959ea39b01b (diff)
download0xFFFF-580f1de0fea939eccc2e21cd0a2a7af5e819b53b.tar.bz2
mkii: Update comments about unknown bytes in flashing protocol
-rw-r--r--src/mkii.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mkii.c b/src/mkii.c
index e50637e..51045f6 100644
--- a/src/mkii.c
+++ b/src/mkii.c
@@ -213,14 +213,18 @@ int mkii_flash_image(struct usb_device_info * dev, struct image * image) {
msg1 = (struct mkii_message *)buf1;
ptr = msg->data;
- /* 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): 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);
@@ -239,7 +243,7 @@ int mkii_flash_image(struct usb_device_info * dev, struct image * image) {
memcpy(ptr, &size, 4);
ptr += 4;
- /* Space */
+ /* Load address (ignored) */
memcpy(ptr, "\x00\x00\x00\x00", 4);
ptr += 4;