Am 17. Februar 2025 22:48:23 UTC schrieb Bernhard Beschow <shen...@gmail.com>:
>
>
>Am 17. Februar 2025 13:28:42 UTC schrieb Peter Maydell 
><peter.mayd...@linaro.org>:
>>On Tue, 4 Feb 2025 at 09:21, Bernhard Beschow <shen...@gmail.com> wrote:
>>>
>>> On a real device, the boot ROM contains the very first instructions the CPU
>>> executes. Also, U-Boot calls into the ROM to determine the boot device. 
>>> While
>>> we're not actually implementing this here, let's create the infrastructure 
>>> and
>>> add a dummy ROM with all zeros. This allows for implementing a ROM later 
>>> without
>>> touching the source code and even allows for users to provide their own 
>>> ROMs.
>>>
>>> The imx8mp-boot.rom was created with
>>> `dd if=/dev/zero of=imx8mp-boot.rom bs=1 count=258048`.
>>
>>If it's all zeroes, we don't need to commit it to git as a binary,
>>we can generate it at build time. (We should avoid having
>>binaries in git as much as we can manage.)
>
>I went with this solution since it trivially works on any build platform. Any 
>idea how to generate the file in a portable way?

Besides this question, the compressed size of the file in Git is just 276 bytes:

  $ git hash-object pc-bios/imx8mp-boot.rom
  5324b5eed200e723d048f8476e4d96d45622fd4d
  $ git verify-pack -v .git/objects/pack/pack-*.idx | grep 5324b5eed2
  5324b5eed200e723d048f8476e4d96d45622fd4d blob   258048 276 787647

Is it really worth generating it during the build process?

Best regards,
Bernhard

>
>Thanks,
>Bernhard
>
>>
>>thanks
>>-- PMM

Reply via email to