Closed JakubVanek closed 4 years ago
It turns out path mapping does not need to be configurable. The uf2d
executable in the stock firmware contains some strings looking exactly like https://github.com/microsoft/uf2-linux/blob/751b0f4e589583012ab6e3fac4a86f239933257b/uf2daemon/fat.c#L246.
"Projects" -> "/mnt/ramdisk/prjs/BrkProg_SAVE"
"SD Card" -> "/media/card/myapps"
"USB Stick" -> "/media/usb/myapps"
"Temporary Logs" -> "/tmp/logs"
"Permanent Logs" -> "/mnt/ramdisk/logs"
However, compared to how uf2d handles this currently, I'd always create a separate directory for a given program. This would help with program deletion not only Linux, but all platforms, as it seems that it is not possible to bypass the directory mapping.
Therefore I propose the following command line interface:
ev3 uf2 pack <output uf2 file> <brick directory> <files...>
ev3 uf2 unpack <output directory> [--no-paths] <uf2 files...>
ev3 uf2 upload [--uf2d] <uf2 files...>
ev3 uf2 remove [--uf2d] <uf2 files...>
Hi!
I think that it might be useful for ev3duder to have the ability to handle UF2 files. The format is seems like just a block-based file container. It is documented here and here is a reference implementation that looks like some older version of it is running on the actual brick.
In particular, I have the following functionality in mind:
Projects/AAA.elf
andProjects/AAA.rbf
. The brick then extracts them to/home/root/lms2012/prjs/BrkProg_SAVE
. I don't know yet if it is possible to upload files to a different location.tar
does - interpret the file paths relative to CWD and put them like that to the UF2.Projects/...
would go to theBrkProg_SAVE
directory and other paths would be interpreted directly.Best regards,
Jakub