[U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH

Andreas Bießmann
2015-08-25T08:49:29Z

On 07/28/2015 05:00 PM, Tom Rini wrote:
> On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote:
>
>> In order to achieve reproducible builds in U-Boot, timestamps that are defined
>> at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment
>> variable allows setting a fixed value for those timestamps.
>>
>> Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be
>> built reproducibly. This is the case for e.g. sunxi devices.
>>
>> However, some other devices might need some more tweaks, especially regarding
>> the image generation tools.
>>
>> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
>
> Applied to u-boot/master, thanks!

This commit breaks build on non GNU hosts (like OS X and persumably
other *BSD hosts). Before, those hosts where supported, so for me this
has to be fixed for 2015.10

We need a) some mechanism to search for the GNU date variant or b) some
wrapper to provide the correct output on those host machines.

I vote for a), it is acceptable to have the GNU date available but we
should error on 'no GNU date available'. Furthermore we need to have the
date command exchangeable by e.g. gdate, gnudate, ... maybe with full path.

Andreas