diff mbox

[U-Boot] Add U_BOOT_TIMESTAMP definition

Message ID 1345733053-5023-1-git-send-email-matt@genesi-usa.com
State Changes Requested
Delegated to: Wolfgang Denk
Headers show

Commit Message

Matt Sealey Aug. 23, 2012, 2:44 p.m. UTC
This gives us a string like "20120822150855" which encodes the build time.

This allows automated version checking and flashing of U-Boot to be performed,
for example, in boot.scr files (or scripting in general).

Signed-off-by: Matt Sealey <matt@genesi-usa.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
---
 Makefile |    1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic Aug. 23, 2012, 2:49 p.m. UTC | #1
On 23/08/2012 16:44, Matt Sealey wrote:
> This gives us a string like "20120822150855" which encodes the build time.
> 
> This allows automated version checking and flashing of U-Boot to be performed,
> for example, in boot.scr files (or scripting in general).
> 
> Signed-off-by: Matt Sealey <matt@genesi-usa.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> ---

Hi Matt,

>  Makefile |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 1df4c1d..c042206 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -664,6 +664,7 @@ $(TIMESTAMP_FILE):
>  		@mkdir -p $(dir $(TIMESTAMP_FILE))
>  		@LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
>  		@LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
> +		@LC_ALL=C date +'#define U_BOOT_TIMESTAMP "%Y%m%d%H%M%S"' >> $@.tmp
>  		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
>  

This is not related to iMX only. I set CC to Wolfgang.

Best regards,
Stefano Babic
Matt Sealey Aug. 23, 2012, 3:01 p.m. UTC | #2
On Thu, Aug 23, 2012 at 9:49 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 23/08/2012 16:44, Matt Sealey wrote:
>> This gives us a string like "20120822150855" which encodes the build time.
>>
>> This allows automated version checking and flashing of U-Boot to be performed,
>> for example, in boot.scr files (or scripting in general).
>>
>> Signed-off-by: Matt Sealey <matt@genesi-usa.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Marek Vasut <marex@denx.de>
>> ---
>
> Hi Matt,
>
>>  Makefile |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 1df4c1d..c042206 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -664,6 +664,7 @@ $(TIMESTAMP_FILE):
>>               @mkdir -p $(dir $(TIMESTAMP_FILE))
>>               @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
>>               @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
>> +             @LC_ALL=C date +'#define U_BOOT_TIMESTAMP "%Y%m%d%H%M%S"' >> $@.tmp
>>               @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
>>
>
> This is not related to iMX only. I set CC to Wolfgang.

Noted, totally my fault.
Wolfgang Denk March 9, 2013, 7:09 a.m. UTC | #3
Dear Matt,

In message <1345733053-5023-1-git-send-email-matt@genesi-usa.com> you wrote:
> This gives us a string like "20120822150855" which encodes the build time.
> 
> This allows automated version checking and flashing of U-Boot to be performed,
> for example, in boot.scr files (or scripting in general).

I just noticed that this was never applied.  Sorry...

>  Makefile |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 1df4c1d..c042206 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -664,6 +664,7 @@ $(TIMESTAMP_FILE):
>  		@mkdir -p $(dir $(TIMESTAMP_FILE))
>  		@LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
>  		@LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
> +		@LC_ALL=C date +'#define U_BOOT_TIMESTAMP "%Y%m%d%H%M%S"' >> $@.tmp
>  		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@

But then - you only add a new #define to the build environment,
without any users of it, i. e. dead code.

Did you intend to post any code that would use this (in this case these
patches should be merged into one, or at least into a series), or can
we simply drop this patch?

Best regards,

Wolfgang Denk
Matt Sealey April 5, 2013, 4:27 p.m. UTC | #4
Hi Wolfgang,

On Sat, Mar 9, 2013 at 1:09 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Matt,
>
> In message <1345733053-5023-1-git-send-email-matt@genesi-usa.com> you wrote:
>> This gives us a string like "20120822150855" which encodes the build time.
>>
>> This allows automated version checking and flashing of U-Boot to be performed,
>> for example, in boot.scr files (or scripting in general).
>
> I just noticed that this was never applied.  Sorry...

No problem.

>>  Makefile |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 1df4c1d..c042206 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -664,6 +664,7 @@ $(TIMESTAMP_FILE):
>>               @mkdir -p $(dir $(TIMESTAMP_FILE))
>>               @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
>>               @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
>> +             @LC_ALL=C date +'#define U_BOOT_TIMESTAMP "%Y%m%d%H%M%S"' >> $@.tmp
>>               @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
>
> But then - you only add a new #define to the build environment,
> without any users of it, i. e. dead code.
>
> Did you intend to post any code that would use this (in this case these
> patches should be merged into one, or at least into a series), or can
> we simply drop this patch?

I did intend to submit a patch; what I wanted to do was gain some
comments about it before I made
our Efika MX configuration use it, and then it moved itself to development hell.

I will submit this as a series shortly (with the configuration update)
if this patch has been dropped
already, alternatively I will just submit the configuration update and
remark that it requires this patch.

Is that okay?
Wolfgang Denk April 5, 2013, 4:34 p.m. UTC | #5
Dear Matt,

In message <CAKGA1bnoNJMYnj1qZUjrMZLvyrr0RT-S1y7-iYy=u2HebBwawQ@mail.gmail.com> you wrote:
> 
> I will submit this as a series shortly (with the configuration update)
> if this patch has been dropped
> already, alternatively I will just submit the configuration update and
> remark that it requires this patch.
> 
> Is that okay?

Both is fine wwith me.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 1df4c1d..c042206 100644
--- a/Makefile
+++ b/Makefile
@@ -664,6 +664,7 @@  $(TIMESTAMP_FILE):
 		@mkdir -p $(dir $(TIMESTAMP_FILE))
 		@LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
 		@LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
+		@LC_ALL=C date +'#define U_BOOT_TIMESTAMP "%Y%m%d%H%M%S"' >> $@.tmp
 		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
 
 easylogo env gdb: