Skip to content

Commit 8bad650

Browse files
committed
Add CI build for FW6
Signed-off-by: Michał Żygowski <[email protected]>
1 parent 7785c8c commit 8bad650

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
matrix:
7777
vendor: [ protectli ]
78-
model: [ vp46xx, V1210, V1410, V1610 ]
78+
model: [ vp46xx, V1210, V1410, V1610, FW6 ]
7979
steps:
8080
- name: Checkout repository
8181
uses: actions/checkout@v3

build.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,47 @@ function build_v1x10 {
160160
fi
161161
}
162162

163+
function build_fw6 {
164+
DEFCONFIG="configs/config.protectli_fw6"
165+
FW_VERSION=$(cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d '=' -f 2 | tr -d '"')
166+
167+
if [ ! -d 3rdparty/blobs/mainboard ]; then
168+
git submodule update --init --checkout
169+
fi
170+
171+
if [ ! -d 3rdparty/blobs/mainboard/protectli/vault_kbl ]; then
172+
if [ -f protectli_blobs.zip ]; then
173+
unzip protectli_blobs.zip -d 3rdparty/blobs/mainboard
174+
else
175+
echo "Platform blobs missing! You must obtain them first."
176+
exit 1
177+
fi
178+
fi
179+
180+
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
181+
-v $HOME/.ssh:/home/coreboot/.ssh \
182+
-w /home/coreboot/coreboot coreboot/coreboot-sdk:2021-09-23_b0d87f753c \
183+
/bin/bash -c "make distclean"
184+
185+
cp $DEFCONFIG .config
186+
187+
echo "Building Dasharo for Protectli FW6 (version $FW_VERSION)"
188+
189+
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
190+
-v $HOME/.ssh:/home/coreboot/.ssh \
191+
-w /home/coreboot/coreboot coreboot/coreboot-sdk:$SDKVER \
192+
/bin/bash -c "make olddefconfig && make -j$(nproc)"
193+
194+
cp build/coreboot.rom protectli_fw6_${FW_VERSION}.rom
195+
if [ $? -eq 0 ]; then
196+
echo "Result binary placed in $PWD/protectli_fw6_${FW_VERSION}.rom"
197+
sha256sum protectli_fw6_${FW_VERSION}.rom > protectli_fw6_${FW_VERSION}.rom.sha256
198+
else
199+
echo "Build failed!"
200+
exit 1
201+
fi
202+
}
203+
163204

164205
CMD="$1"
165206

@@ -192,6 +233,9 @@ case "$CMD" in
192233
"v1610" | "V1610" )
193234
build_v1x10 "v1610"
194235
;;
236+
"fw6" | "FW6" )
237+
build_fw6
238+
;;
195239
*)
196240
echo "Invalid command: \"$CMD\""
197241
usage

0 commit comments

Comments
 (0)