cosmopolitan
cosmopolitan copied to clipboard
[metal] Get zipos working again for legacy BIOS boot
examples/hellolua.c now runs again when booted as a legacy BIOS disk image.
- output number of sectors to load as a patchable variable; for now the patching is done by
tool/build/zipcopy.c - remove references to
_ezip - add tweaks to metal
mmap() - implement
lseek()for metal memory files (edit 27 Aug: also implementfstat()for metal files)
@tkchia
It would be great if you could test your patch by building this: https://github.com/trholding/llama2.c The corresponding issue is this: https://github.com/jart/cosmopolitan/issues/866
Read this to build: https://github.com/trholding/llama2.c#binary-portability-even-more-magic Model can be downloaded here: https://github.com/trholding/llama2.c#feel-the-magic
I gave your branch a try and it did not work for me.