Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by alan.siggia@Sep 24 2006, 09:03 PM we would like to use altera's readonly zip filesystem, but the model for applying it seems awkward -- you specify the zip file in the system library (not in the project), and there is a separate flash programming step that must be done to some fixed offset.
would it make sense, instead, to include the zip file in the .data segment by converting it to a .o via objcopy, then include that object file in the link, and then somehow redirect the zipfs routines to use it rather than a flash image? such an approach might be nice during development because changes to the zip file would make their way into the running code just like any other compiled segment.
one can make the object file manually using something like:
nios2-elf-objcopy -i binary -o elf32-littlenios2 -b nios2 <zip-file> zipfile.o
but in the strange realm of managed makefiles i'm unsure how to:
* add the above command to create zipfile.o whenever zip-file changes
* include the zipfile.o object in the final link
and then:
* fool the altera_ro_zipfs routines into using it.
any suggestions would be *really* appreciated -- thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18430)
--- quote end ---
--- Quote End --- Yes it's perfectly possible to do this, it is how the zipFS was developped. The changes to make it work are simple. If you look in the source of the roZipFS you will find a makefile fragment. Add the objcopy command in here, and add the .o file to the list of object files in this makefile snippet. To "fool" the zipfs into using it, you will have to modify the init function.