util/mkimage: Use stable timestamp when generating binaries.

This commit is contained in:
Daniel Kahn Gillmor 2015-03-27 13:26:48 +01:00 committed by Vladimir Serbinenko
parent c14f8a9366
commit 85a7be2414
1 changed files with 5 additions and 2 deletions

View File

@ -55,6 +55,9 @@
#define TARGET_NO_FIELD 0xffffffff
/* use 2015-01-01T00:00:00+0000 as a stock timestamp */
#define STABLE_EMBEDDING_TIMESTAMP 1420070400
struct grub_install_image_target_desc
{
const char *dirname;
@ -1439,7 +1442,7 @@ grub_install_generate_image (const char *dir, const char *prefix,
c->machine = grub_host_to_target16 (image_target->pe_target);
c->num_sections = grub_host_to_target16 (4);
c->time = grub_host_to_target32 (time (0));
c->time = grub_host_to_target32 (STABLE_EMBEDDING_TIMESTAMP);
c->characteristics = grub_host_to_target16 (GRUB_PE32_EXECUTABLE_IMAGE
| GRUB_PE32_LINE_NUMS_STRIPPED
| ((image_target->voidp_sizeof == 4)
@ -1782,7 +1785,7 @@ grub_install_generate_image (const char *dir, const char *prefix,
memset (hdr, 0, sizeof (*hdr));
hdr->ih_magic = grub_cpu_to_be32_compile_time (GRUB_UBOOT_IH_MAGIC);
hdr->ih_time = grub_cpu_to_be32 (time (0));
hdr->ih_time = grub_cpu_to_be32 (STABLE_EMBEDDING_TIMESTAMP);
hdr->ih_size = grub_cpu_to_be32 (core_size);
hdr->ih_load = grub_cpu_to_be32 (image_target->link_addr);
hdr->ih_ep = grub_cpu_to_be32 (image_target->link_addr);