08-30-2017 02:31 AM
I have been previously using petalinux-v2016.2 with great success. Now I am moving to petalinux-v2017.2.
I have an issue with the last step. So far (since petalinux 2014 actaully) I have been using the following command line in order to create BOOT.BIN:
petalinux-package --boot --fsbl ./path-to-fsbl/FSBL.elf --fpga ./path-to-bit/FPGA.bit --u-boot --add ./path-to-other/other.lz4 --offset 0x30000000 --force
I need the "other.lz4" file to be loaded at offfset 0x30000000. This is actually taken from a working bif file.
So far it as been working like a charm, the resulting BOOT.BIN was about 4Mb (the sum of all component sizes).
But now, issuing this command with petatinux-2017 creates a BOOT.BIN of which has a size of >803Mb !
Actually it is now has the size it would have if "other.lz4" was really placed 0x30000000 appart, padding the gap with useless data.
This is of course an issue, as it is not acceptable to have such a large BOOT.BIN.
I did not find any workaround, and I really don't understand why the behavior of petalinux-package changed in such a radical way.
Is this expected? How can I have it work the way it was working before?
Thank you in advance,
08-30-2017 06:53 AM
I identify the issue:
petalinux-package command actually create bootgen.bif file in the build folder, and then call bootgen on it.
1) with 2016-2 version, parameter "--offset 0x30000000" on petalinux-package command line was generating "[load=0x30000000]" in front of the "other.lz4" file in the produced bootgen.bif file.
This is what I want/wanted.
2) with 2017-2 version, the same parameter on command line generate "[offset=0x30000000]" in front of the "other.lz4" file in the produced bootgen.bif file. This is quite different from "load=" and has the effect of indeed creating a 803Mb BOOT.BIN
In order to solve the issue I replaced "--offset 0x30000000" with "--file-attribute load=0x30000000". The produced bootgen.bif is now exactly as before, and therefore the generated BOOT.BIN is correctly small.
2016-2 petalinux-package was bugged: it wrongly interpreted "--offset" parameters, translating it into "load=" in bootgen.bif (that was fine for me, but wrong I guess).
2017-2 correct this, and force the user to use the good parameter in order to achieve the desired effet.