Skip to content

Commit

Permalink
Add CI build for FW6
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Żygowski <[email protected]>
  • Loading branch information
miczyg1 committed Dec 6, 2023
1 parent 7785c8c commit 8bad650
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
matrix:
vendor: [ protectli ]
model: [ vp46xx, V1210, V1410, V1610 ]
model: [ vp46xx, V1210, V1410, V1610, FW6 ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
44 changes: 44 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,47 @@ function build_v1x10 {
fi
}

function build_fw6 {
DEFCONFIG="configs/config.protectli_fw6"
FW_VERSION=$(cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d '=' -f 2 | tr -d '"')

if [ ! -d 3rdparty/blobs/mainboard ]; then
git submodule update --init --checkout
fi

if [ ! -d 3rdparty/blobs/mainboard/protectli/vault_kbl ]; then
if [ -f protectli_blobs.zip ]; then
unzip protectli_blobs.zip -d 3rdparty/blobs/mainboard
else
echo "Platform blobs missing! You must obtain them first."
exit 1
fi
fi

docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
-v $HOME/.ssh:/home/coreboot/.ssh \
-w /home/coreboot/coreboot coreboot/coreboot-sdk:2021-09-23_b0d87f753c \
/bin/bash -c "make distclean"

cp $DEFCONFIG .config

echo "Building Dasharo for Protectli FW6 (version $FW_VERSION)"

docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
-v $HOME/.ssh:/home/coreboot/.ssh \
-w /home/coreboot/coreboot coreboot/coreboot-sdk:$SDKVER \
/bin/bash -c "make olddefconfig && make -j$(nproc)"

cp build/coreboot.rom protectli_fw6_${FW_VERSION}.rom
if [ $? -eq 0 ]; then
echo "Result binary placed in $PWD/protectli_fw6_${FW_VERSION}.rom"
sha256sum protectli_fw6_${FW_VERSION}.rom > protectli_fw6_${FW_VERSION}.rom.sha256
else
echo "Build failed!"
exit 1
fi
}


CMD="$1"

Expand Down Expand Up @@ -192,6 +233,9 @@ case "$CMD" in
"v1610" | "V1610" )
build_v1x10 "v1610"
;;
"fw6" | "FW6" )
build_fw6
;;
*)
echo "Invalid command: \"$CMD\""
usage
Expand Down

0 comments on commit 8bad650

Please sign in to comment.