aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/build/roms/withdepthcharge
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build/roms/withdepthcharge')
-rwxr-xr-xresources/scripts/helpers/build/roms/withdepthcharge55
1 files changed, 46 insertions, 9 deletions
diff --git a/resources/scripts/helpers/build/roms/withdepthcharge b/resources/scripts/helpers/build/roms/withdepthcharge
index 32e56238..431427a4 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
}