[File] [PATCH] UF2 support

Blake Ramsdell blaker at gmail.com
Sun Apr 25 17:30:31 UTC 2021


On Sun, Apr 25, 2021 at 6:15 AM Christos Zoulas <christos at zoulas.com> wrote:
> It would be nice to provide a text file for it, or send us patches when they add more entries.

In my example below, I'd like them to take ownership of the
uf2families.json file. Then we can jq our way to success.

➜  file git:(bcr-uf2) ✗ cat uf2families.json
[
    { "id": "0x68ed2b88", "description": "Microchip (Atmel) SAMD21" },
    { "id": "0x1851780a", "description": "Microchip (Atmel) SAML21" },
    { "id": "0x55114460", "description": "Microchip (Atmel) SAMD51" }
]
➜  file git:(bcr-uf2) ✗ jq -r '.[] | ">>28 lelong
\(.id)\t\(.description)"' uf2families.json
>>28 lelong 0x68ed2b88  Microchip (Atmel) SAMD21
>>28 lelong 0x1851780a  Microchip (Atmel) SAML21
>>28 lelong 0x55114460  Microchip (Atmel) SAMD51
➜  file git:(bcr-uf2) ✗

> Thank you for the patch!

Thank you for maintaining!

Also, you note that I skipped the checking of the two magic numbers.
You got a philosophy about that? It's probably safer than just the uf2
string check, but probably overkill, and I note you didn't add it back
in.


More information about the File mailing list