summaryrefslogtreecommitdiffstats
path: root/resources/utilities
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-12-06 00:36:40 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-12-06 00:36:40 (EST)
commitfc4c24864a0672fce04f79abe76586ae487c104d (patch)
treecf54fa4ac965903dd98e360de96bd1640b5a32e6 /resources/utilities
parent4f4ec55f08d55acadd6723a54db638bd5ef04484 (diff)
downloadlibreboot-fc4c24864a0672fce04f79abe76586ae487c104d.zip
libreboot-fc4c24864a0672fce04f79abe76586ae487c104d.tar.gz
libreboot-fc4c24864a0672fce04f79abe76586ae487c104d.tar.bz2
Revert "Revert "grub: build reproducibly""
This reverts commit 6278d578f6f47ae2d2742b95c99df087a06d0e90.
Diffstat (limited to 'resources/utilities')
-rwxr-xr-xresources/utilities/grub-assemble/gen.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/utilities/grub-assemble/gen.sh b/resources/utilities/grub-assemble/gen.sh
index 36352a3..3c52a84 100755
--- a/resources/utilities/grub-assemble/gen.sh
+++ b/resources/utilities/grub-assemble/gen.sh
@@ -29,6 +29,14 @@ if [ $# != 1 ]; then
exit 1
fi
+if [ -f "../../../versiondate" ]; then
+ # _src release archive is being used
+ versiondate="$(cat ../../../versiondate)"
+else
+ # git repo is being used
+ versiondate="$(git show -s --format=%ct)"
+fi
+
# This is where GRUB is expected to be (outside of the grub-assemble, instead in main checkout)
grubdir="../../../grub"
@@ -51,6 +59,7 @@ if [ "${1}" = "vesafb" ]; then
-o "grub_vesafb.elf" \
-d "${grubdir}/grub-core/" \
--fonts= --themes= --locales= \
+ --fixed-time ${versiondate} \
--modules="${grub_modules}" \
--install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \
@@ -65,6 +74,7 @@ then
-o "grub_txtmode.elf" \
-d "${grubdir}/grub-core/" \
--fonts= --themes= --locales= \
+ --fixed-time ${versiondate} \
--modules="${grub_modules}" \
--install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \