cosmopolitan icon indicating copy to clipboard operation
cosmopolitan copied to clipboard

[metal] Get zipos working again for legacy BIOS boot

Open tkchia opened this issue 2 years ago • 2 comments

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 implement fstat() for metal files)

tkchia avatar Jun 14 '23 22:06 tkchia

@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

trholding avatar Jul 25 '23 15:07 trholding

I gave your branch a try and it did not work for me.

trholding avatar Jul 27 '23 08:07 trholding