Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fopen("/zip/file.bin", "rb") does not work on BIOS boot #866

Open
trholding opened this issue Jul 24, 2023 · 0 comments
Open

fopen("/zip/file.bin", "rb") does not work on BIOS boot #866

trholding opened this issue Jul 24, 2023 · 0 comments

Comments

@trholding
Copy link

trholding commented Jul 24, 2023

Error loading from the zip filesystem when bios booting. I do not have the issue running run.com normally.

$ qemu-system-x86_64 -serial stdio  -hda run.com 
WARNING: Image format was not specified for 'run.com' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Unable to open the checkpoint file /zip/out/model.bin!
Unable to open the checkpoint file /zip/out/model.bin!

I have encountered this problem when bios booting https://github.com/trholding/llama2.c/blob/master/run.c with qemu.

I have the necessary #ifdefs in run.c

#ifdef COSMO_ZIP // Support embedded models via Zip Archive support
STATIC_YOINK("zipos");
#endif

I have also tried to build it with this branch: #833 but got the same error.

On x86_64 and Aarch64 its working fine:
runx86

runAarch64

Here is a link to the build/binary: https://github.com/trholding/llama2.c/releases/tag/experimental

@trholding trholding changed the title [metal] Files do not load from zipos on baremetal fopen("/zip/file.bin", "rb") does not work on BIOS boot Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant