You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have the time or interest for adding support for a disused legacy format I am afraid. Further, I don't really understand the use case - I don't see why you'd want to use Python to compress/decompress data and pass it to/from the kernel. I might be more interested if you could articulate the use case.
I'd accept patches as long as they were well documented and included tests.
I would not need it for passing information to the Linux kernel, but I want to use it for automated firmware analysis, where I process binaries to see what is inside and process them according to what I find.
It appears that the legacy file format is not standard in the LZ4 library (I thought it was), but it is supported in the standard lz4 utilities instead, so I will use those instead.
the "legacy" format is the one with the simplest decoder and provide very good compression level. It is therefore ideal for embedded firmware compression. In this use case the decompressor is embedded in the firmware, so simplicity is paramount. It would be nice to have it in Python to prepare the firmware image.
FWIW I recently needed to process some files that are produced in the legacy frame format and after much confusion found that a PR over this project provides a very clear way to detect the legacy frame and to decompress them: marin-m/vmlinux-to-elf@6225011
Activity
jonathanunderwood commentedon Mar 31, 2019
I don't have the time or interest for adding support for a disused legacy format I am afraid. Further, I don't really understand the use case - I don't see why you'd want to use Python to compress/decompress data and pass it to/from the kernel. I might be more interested if you could articulate the use case.
I'd accept patches as long as they were well documented and included tests.
armijnhemel commentedon Mar 31, 2019
I would not need it for passing information to the Linux kernel, but I want to use it for automated firmware analysis, where I process binaries to see what is inside and process them according to what I find.
It appears that the legacy file format is not standard in the LZ4 library (I thought it was), but it is supported in the standard lz4 utilities instead, so I will use those instead.
sebastien-riou commentedon May 30, 2019
the "legacy" format is the one with the simplest decoder and provide very good compression level. It is therefore ideal for embedded firmware compression. In this use case the decompressor is embedded in the firmware, so simplicity is paramount. It would be nice to have it in Python to prepare the firmware image.
jonathanunderwood commentedon May 30, 2019
Ok. I'll reopen this, and look at it at some point, unless someone beats me to it :)
lukeman commentedon Apr 4, 2022
FWIW I recently needed to process some files that are produced in the legacy frame format and after much confusion found that a PR over this project provides a very clear way to detect the legacy frame and to decompress them: marin-m/vmlinux-to-elf@6225011
jonathanunderwood commentedon Apr 4, 2022
OK - that looks simple enough. I'll re-open this - if anyone wants to submit a patch with tests, I'll happily look at merging it.
bol-van commentedon Jan 19, 2023
I also vote to add legacy format support. I need it to decompress lz4 compressed vmlinuz