I don't need/use XIP or relocation(would the latter make a difference anyway?).
Also the difference between FD and FV seems to be terminology only, because YOURPLATFORM.fd has the same checksum as FVMAIN_COMPACT.Fv. What I successfully tested as a workaround is reading EFI_FV_TAKEN_SIZE from FVMAIN_COMPACT.Fv.map and strip the file to that size. That seems to work, but I'm not sure if it's exact, because there are still a few 0xff bytes left and I'm not sure if these really are for aligning the size only. Thanks Michael On Mon, Jul 18, 2016 at 5:28 PM, Andrew Fish <[email protected]> wrote: > > > On Jul 17, 2016, at 11:02 PM, Michael Zimmermann < > [email protected]> wrote: > > > > > > Hi, > > > > I noticed that the size of YOURPLATFORM.fd always equals the size > specified > > in your fdf > > i.e. 4MB for 'Size = 0x00400000|gArmTokenSpaceGuid.PcdFdSize'. > > > > I don't know much about the case where this gets flashed to a nand and > > executed in place, but when using edk2 on a ARM PrePi device with edk2 > > loaded into RAM, this looks like a huge waste of storage memory and > loading > > time to me. > > > > So, is it really important to have multiple MB(depending of you fv size > > ofc) of 0xff appended to the firmware or is there a fdf option or > > post-compilation tool to remove this? > > > > The YOURPLATFORM.fd is a Flash Device (.fd) and thus there is an > assumption it is a fixed size. If you want a flexible size you can use an > FV. Are you dependent on relocating the code so it can XIP? Is that what if > forcing the use of an FD? > > Just trying to figure out if what you are really asking for is the ability > to relocate an FV that is only as big as required? Maybe that is an FD, > maybe not? > > Short term if your FD is just a single FV you can use a PCD to know the > size and only copy that much data to the RAM. You would have to manually > pick an FD size that did not waist too much storage. > > Thanks, > > Andrew Fish > > > Thanks > > Michael > > _______________________________________________ > > edk2-devel mailing list > > [email protected] > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.01.org_mailman_listinfo_edk2-2Ddevel&d=CwICAg&c=Hw-EJUFt2_D9PK5csBJ29kRV40HqSDXWTLPyZ6W8u84&r=4sdzHKz0eU1vXqaUySVmyA&m=Kr0PunsxtwGLmV7IsSEodsro5Wwu2oRxRh1L7fFpt3w&s=FXzJ7wYg-xu4aJ-6YGBqB4GTUNMVu1W9h8mqqf864YQ&e= > > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

