Fiasco mmc image contains layout and two parts in one data section. First
part is FAT32 partition (MyDocs) and second part is tar archive for second
ext3 partition (/home). This change extends fiasco parser to load all parts
from one data section and correctly unpack all parts.
Previously 0xFFFF written fixed value 0x00 instead of correct checksum.
Apparently both NOLO and Nokia's flasher-3.5 ignored checksum value
verification when checksum was set to 0x00.
Also Nokia's fiasco-gen writes correct checksum (not 0x00) to final fiasco
image file.
Kernel image is prepended with 2kB header with NOLO!img magic and contains
size of the kernel image. 0xFFFF until now just skipped this header. With
this change is reads from it real kernel image size and correctly truncate
final dumped image for 0xFFFF -e/-E dump operation.
In last 15 years nanddump changed its command line arguments. Argument -b
(omit bad blocks) was completely removed and argument -o (omit oob data)
changed its meaning to "include" oob data. So for compatibility with all
nanddump versions, do not use argument -b and instead of -o use argument
--omitoob which is present in all nanddump versions and has same meaning
to omit oob data.
This change should fix dumping firmware files on devices with recent
versions of nanddump.
N800 has stopped working at some point, not sure why:
$ 0xFFFF -I
[...]
Waiting for USB device...
Found USB device: SU-18/RX-44/RX-48/RX-51/RM-680 (0x421:0x105) in NOLO mode
USB device product string: Nokia N800 (Update mode)
USB device serial number string: (not detected)
Detected USB device: RX-34
Error: Device mishmash
Add the device to 0421:0105 list, and it works again:
Waiting for USB device...
Found USB device: SU-18/RX-34/RX-44/RX-48/RX-51/RM-680 (0x421:0x105) in NOLO mode
USB device product string: Nokia N800 (Update mode)
USB device serial number string: (not detected)
Detected USB device: RX-34
Initializing NOLO...
Device: RX-34
[...]
Unpatched version of libusb on linux platform does not set location, but
Debian's version of libusb has a patch which set it. For compatibility with
other systems without unpatched libusb version, read busnum from dirname
which seems to be always set.
Fixes: https://github.com/pali/0xFFFF/issues/5