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

Converting a bitstream to raw byte-swapped format #10

Open
rroohhh opened this issue Aug 17, 2018 · 1 comment
Open

Converting a bitstream to raw byte-swapped format #10

rroohhh opened this issue Aug 17, 2018 · 1 comment

Comments

@rroohhh
Copy link

rroohhh commented Aug 17, 2018

bootgen has the option --process_bitstream which converts a .bit-format bitstream to the raw byte-swapped format that is also used in a normal boot image, but without all the headers of a normal boot image (see http://www.wiki.xilinx.com/Solution+Zynq+PL+Programming+With+FPGA+Manager for a complete example). This is the format used by the mainline linux zynq support for programming the fpga and it would be useful to have this option in zynq-mkbootimage aswell.

All the necessary code is already there (basicly write only the data generated by bitstream_append to a file), however I'm not sure where in the code you would want to integrate this.

If you tell me how want this integrated (if at all) I would be happy to implement it.

@tgorochowik
Copy link
Member

Hello Robin,
That would be a nice addition indeed. Thank you!

I can think of two ways to do that:

  1. Adding a new argument, parsing it in main and creating a bootrom.c equivalent with the process_bitstream (or even putting that callback right into bootrom.c, why not), that would be fully compatible with what Xilinx does.
  2. Creating a completely new util, e.g. simply process-bitstream, in a new file with a new Makefile target - and invoke it simply like this: process-bitsream <original.bit> <processed.bin> - This is incompatible with what bootgen does but it seems to be over complicated to create a .bif file with just a single entry just to process bitstream, so it is fine not to keep this kind of compatibility in my opinion. We should only care that the actual usable .bif files are compatible with bootgen.

I guess both options are fine for now, if there are more features like this in the future we may just choose to go the other way and convert it (whatever will be cleaner).

Thanks!

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

2 participants