limine-bootloader/limine

Compressed internal module?

Closed this issue · 0 comments

Hello. I am using the internal module feature of the limine_module_request to load an module. I would like to gzip this module and have it decompressed by Limine. I see that you can put a $ before a path in the limine.cfg file to have Limine decompress a kernel / module before loading it. Is it possible to do this with an internal module?

I have my kernel at boot:///kernel.elf and the module at boot:///initfs.tgz. If I set the path to "$initfs.tgz", Limine attempts to load boot:///$initfs.tgz, and if I set the path to "$boot:///initfs.tgz", Limine attempts to load boot:///$boot:/initfs.tgz, which makes sense since that is just supposed to be a relative path.

I suppose checking if the path has a $ at the front could cause problems since a relative path could actually start with a $, whereas in the config file this is okay since I think the paths there are always absolute with a URI resource, and none of the resources start with a $ (and presumably never will). Maybe it could be a flag in the limine_internal_module struct like LIMINE_INTERNAL_MODULE_REQUIRED is?