Hi Charles,
On 20 February 2014 12:50, Charles Manning <cdhmann...@gmail.com> wrote: > > I am in the throes of extending mkimage to add socfpga support. This is my > first time in mkimage, so please forgive me being on a learning curve. > > It seems that the most "normal" path for mkimage signers is to append some > sort of header to the front of the image > ie the flow is > > write header out > copy image data with copy_file > call set_header > > The socfpga preloader needs something a bit different. It does not add a > header, but instead adds a tail (CRC+padding) and mashes some bytes into a > known place in the image. > > Unfortunately the mkimage framework does not seem to provide an "add tail" > function which is really what is needed here. > > The only way I can see to extend the size of the image, using the normal > mkimage workflow would be to do something like this: > > *Provide vrec_header which adds a fake header of 64k - input_size. > * Allow copy_file to then do the copy step. > * I now have a 64k "image" which is 64k-size 0 bytes, followed by the actual > input_data. > * When set_header is called, shift the actual input data to where it should > be, add the CRC and fix up the padding. > > This seems needlessly contrived to work with the framework. There is the rather off fflag_handle() function - could you make use of that? > > Or the alternative might be just to treat this as a special case.... > > Thoughts/opinions??? I don't see a problem with adding to the framework if needed. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot