Hi Roman,
You wrote on Sat, May 09, 2020 at 11:13:58PM +0300:
> In process of firmware repairing of some FTDI-chip based device I have
> found that I can't get binary identical EEPROM dumps from properly
> working device and ftdi_eeprom --build_eeprom command because of
> ftdi_eeprom does not support changing of device release number (byte
> with addr 0x06).
>
> I can suggest simple patch to resolve this issue:
> ----------------------
> From 39fcaf16858f0966e336d1ff5eaf84d1a9da03d9 Mon Sep 17 00:00:00 2001
> From: Roman Lapin <lampus.lapin@xxxxxxxxx>
> Date: Sat, 9 May 2020 22:30:30 +0300
> Subject: [PATCH] Add release_number config support to ftdi_eeprom
thanks for the patch, applied!
I had to fix a subtle issue: If release_number wasn't set in the config file,
it would overwrite the release_type from ftdi_eeprom_initdefaults() with 0x00.
Here's a hexdump showing the issue with the original patch:
--- eeprom-orig.txt 2020-05-14 21:14:14.002913823 +0200
+++ eeprom-with-patch.txt 2020-05-14 21:14:30.242691994 +0200
@@ -1,9 +1,9 @@
-0000000 4001 0403 6001 0600 faa0 0008 0000 1298
+0000000 4001 0403 6001 0000 faa0 0008 0000 1298
^^^^
The fix was easy: Only set the field if it's given in the config.
(use -1 as the default value)
Cheers,
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|