Hi Daniele
You can use the ‘flag’ field to mention the platform-specific data(in your case, a build number). Usage of the ‘flag’ field(64 bit) in the toc_header are as below:
You can make use of the flag[32:47] to put build information. I am not sure if you can accommodate epoch (converted timestamp) into this field but, you can encode any data to fit into this 16bit flag field to
identify the FIP build.
You can use a build command: fiptool update/create --plat-toc-flags <platform defined data> <your fip bin path> to put the platform defined data in the FIP image.
Thanks
Manish Badarkhe
From:
TF-A <tf-a-bounces@lists.trustedfirmware.org> on behalf of Daniele Alessandrelli via TF-A <tf-a@lists.trustedfirmware.org>
Date: Wednesday, 10 February 2021 at 17:04
To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] Getting BUILD_STRING from FIP file
Hi,
Is there a way to get BUILD_STRING (or a similar string / number that
uniquely identifies the TF-A build, e.g., BUILD_MESSAGE_TIMESTAMP) from
the FIP file?
Basically, I'm trying to find a way to know the build number of a FIP
without flashing it.
I've seen that the FIP TOC header has a 32-bit field named
'serial_number'. Can it be used to this end? I'm considering
converting BUILD_MESSAGE_TIMESTAMP into an epoch and adding it as
'serial number', but I'm worried that might be an unintended usage of
the 'serial_number' field.
Regards,
Daniele
--
TF-A mailing list
TF-A@lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-a