[File] [PATCH] Magdir/firmware AVR firmware in Intel HEX format

Alexandre IOOSS erdnaxe at crans.org
Mon Oct 16 06:14:22 UTC 2023


Hello,

File currently only detects AVR firmware images in binary format.
I would like to propose a new signature to detect AVR firmware images in 
Intel Hex format.

The matching is very similar to what is done in the "AVR firmware" 
signature, but taking in consideration the hexadecimal format.

For testing purposes, one can quickly convert between the two formats:
```
objcopy -I ihex -O binary avr.hex avr.bin
objcopy -I ihex -O binary avr.bin avr.hex
```

I have tested this new signature using a set of built Arduino examples 
(https://www.arduino.cc/), QMK firmware images (https://qmk.fm/), Marlin 
firmware images (https://marlinfw.org/).

Example of output:
```
$ file */*.bin
qmk/ztboards_noon_default.hex.hex:         AVR firmware, in Intel HEX format
arduino/Blink_attiny_adafruit_trinket.hex: AVR firmware, in Intel HEX format
```

Attached, you will find the new signatures.

Best regards,

-- 
Alexandre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avr_hex.patch
Type: text/x-patch
Size: 1184 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20231016/bd900451/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.astron.com/pipermail/file/attachments/20231016/bd900451/attachment.asc>


More information about the File mailing list