]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/mkimage: Use stable timestamp when generating binaries.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 27 Mar 2015 12:26:48 +0000 (13:26 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 27 Mar 2015 12:26:48 +0000 (13:26 +0100)
util/mkimage.c

index 7821dc5eaf11b8ba59edf45e3a8b6136ae530edc..52265b557a293b8645ec3e83dedc361b18782060 100644 (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);