aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/build/roms/withgrub_helper
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build/roms/withgrub_helper')
-rwxr-xr-xresources/scripts/helpers/build/roms/withgrub_helper32
1 files changed, 24 insertions, 8 deletions
diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper
index 631b96fa..047aa763 100755
--- a/resources/scripts/helpers/build/roms/withgrub_helper
+++ b/resources/scripts/helpers/build/roms/withgrub_helper
@@ -34,21 +34,31 @@ fi
boardtarget="${1}"
+if [ -f "version" ]; then
+ # release archive is being used
+ version="$(cat version)"
+else
+ # git repo is being used
+ version="$(git describe --tags HEAD)"
+fi
+
printf "GRUB Helper script: build ROM images for '%s'\n" "${boardtarget}"
(
-cd "coreboot/grub/${boardtarget}/"
+cbrevision="$(cat resources/libreboot/config/grub/${boardtarget}/cbrevision)"
+vbootrevision="$(cat resources/libreboot/config/grub/${boardtarget}/vbootrevision)"
+branchname="grub_${boardtarget}"
+
+cd "coreboot/${cbrevision}/${cbrevision}/"
+git checkout ${branchname}
+(
+ cd "3rdparty/vboot/"
+ git checkout ${branchname}
+)
# Make sure to remove these first
rm -f "grub."*{elf,cfg}
-if [ -f "../version" ]; then
- # release archive is being used
- version="$(cat ../version)"
-else
- # git repo is being used
- version="$(git describe --tags HEAD)"
-fi
printf 'libreboot-%s\n' "${version}" > ".coreboot-version" # needed for reproducible builds in coreboot
# Build ROM images with text-mode and corebootfb modes.
@@ -138,6 +148,12 @@ mv "${boardtarget}/" "../../../bin/grub/"
# version info file no longer needed
rm -f ".coreboot-version"
+
+git checkout master
+(
+ cd "3rdparty/vboot/"
+ git checkout master
+)
)
printf "\n\n"