summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/build/roms
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build/roms')
-rwxr-xr-xresources/scripts/helpers/build/roms/withdepthcharge55
-rwxr-xr-xresources/scripts/helpers/build/roms/withgrub2
-rwxr-xr-xresources/scripts/helpers/build/roms/withgrub_helper32
3 files changed, 71 insertions, 18 deletions
diff --git a/resources/scripts/helpers/build/roms/withdepthcharge b/resources/scripts/helpers/build/roms/withdepthcharge
index 32e5623..431427a 100755
--- a/resources/scripts/helpers/build/roms/withdepthcharge
+++ b/resources/scripts/helpers/build/roms/withdepthcharge
@@ -46,9 +46,16 @@ fi
buildlibpayload() {
family="${1}"
board="${2}"
+ cbrevision="${3}"
+ vbootrevision="${4}"
(
- cd "coreboot/depthcharge/${board}/payloads/libpayload/"
+ cd "coreboot/${cbrevision}/${cbrevision}/payloads/libpayload/"
+ git checkout depthcharge_${board}
+ (
+ cd "3rdparty/vboot/"
+ git checkout depthcharge_${board}
+ )
make distclean
rm -Rf "install/"
@@ -56,6 +63,10 @@ buildlibpayload() {
make KBUILD_DEFCONFIG="configs/config.$family" defconfig
make -j"$(nproc)"
make DESTDIR="install" install
+
+ git checkout master
+ cd "3rdparty/vboot/"
+ git checkout master
)
}
@@ -64,17 +75,30 @@ buildlibpayload() {
builddepthcharge() {
board="${1}"
+ cbrevision="${2}"
+ vbootrevision="${3}"
(
- cd "depthcharge/"
+ (
+ cd "coreboot/${cbrevision}/${cbrevision}/"
+ git checkout depthcharge_${board}
+ cd "3rdparty/vboot/"
+ git checkout depthcharge_${board}
+ )
+ cd "depthcharge/"
make distclean
- rm -f "../coreboot/depthcharge/${board:?}/depthcharge.elf"
+ rm -f "../coreboot/${cbrevision:?}/${cbrevision:?}/depthcharge.elf"
make BOARD="${board}" defconfig
- make BOARD="${board}" LIBPAYLOAD_DIR="$(pwd)/../coreboot/depthcharge/${board}/payloads/libpayload/install/libpayload" VB_SOURCE="$(pwd)/../coreboot/depthcharge/${board}/3rdparty/vboot" -j"$(nproc)" depthcharge_unified
+ make BOARD="${board}" LIBPAYLOAD_DIR="$(pwd)/../coreboot/${cbrevision}/${cbrevision}/payloads/libpayload/install/libpayload" VB_SOURCE="$(pwd)/../coreboot/${cbrevision}/${cbrevision}/3rdparty/vboot" -j"$(nproc)" depthcharge_unified
+
+ cp "build/depthcharge.elf" "../coreboot/${cbrevision}/${cbrevision}/"
- cp "build/depthcharge.elf" "../coreboot/depthcharge/${board}/"
+ cd "../coreboot/${cbrevision}/${cbrevision}/"
+ git checkout master
+ cd "3rdparty/vboot/"
+ git checkout master
)
}
@@ -83,9 +107,16 @@ builddepthcharge() {
buildcoreboot() {
board="${1}"
+ cbrevision="${2}"
+ vbootrevision="${3}"
(
- cd "coreboot/depthcharge/${board}/"
+ cd "coreboot/${cbrevision}/${cbrevision}"
+ git checkout depthcharge_${board}
+ (
+ cd "3rdparty/vboot/"
+ git checkout depthcharge_${board}
+ )
make distclean
rm -f ".coreboot-version"
@@ -123,19 +154,25 @@ buildcoreboot() {
# clean this up
rm -f "depthcharge.elf"
rm -f *.img
+
+ git checkout master
+ cd "3rdparty/vboot/"
+ git checkout master
)
}
# Build ROM images for supported boards
buildrom() {
board="${1}"
+ cbrevision="$(cat resources/libreboot/config/depthcharge/${board}/cbrevision)"
+ vbootrevision="$(cat resources/libreboot/config/depthcharge/${board}/vbootrevision)"
if [ -f "resources/libreboot/config/depthcharge/${board}/config" ]; then
family=$( echo ${board} |sed "s/_.*//g" )
- buildlibpayload "${family}" "${board}"
- builddepthcharge "${board}"
- buildcoreboot "${board}"
+ buildlibpayload "${family}" "${board}" "${cbrevision}" "${vbootrevision}"
+ builddepthcharge "${board}" "${cbrevision}" "${vbootrevision}"
+ buildcoreboot "${board}" "${cbrevision}" "${vbootrevision}"
fi
}
diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub
index f3c0c05..3ef295a 100755
--- a/resources/scripts/helpers/build/roms/withgrub
+++ b/resources/scripts/helpers/build/roms/withgrub
@@ -140,6 +140,6 @@ fi
# The GRUB files are no longer needed
rm -f "coreboot/grub"*.{elf,cfg}
-rm -f "coreboot/"*/*/grub*.{elf,cfg}
+rm -f "coreboot/"*/*/*.{elf,cfg}
printf "\n\n"
diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper
index 631b96f..047aa76 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"