-
-
Notifications
You must be signed in to change notification settings - Fork 15
Ds08msa internal v0.4 #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dasharo-24.02.1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,8 @@ usage() { | |
} | ||
|
||
SDKVER="2024-02-18_732134932b" | ||
|
||
DASHARO_SDK=${DASHARO_SDK:-"ghcr.io/dasharo/dasharo-sdk:latest"} | ||
BUILD_TIMELESS=${BUILD_TIMELESS:-0} | ||
|
||
function build_optiplex_9010 { | ||
DEFCONFIG=$1 | ||
|
@@ -43,13 +44,13 @@ function build_optiplex_9010 { | |
|
||
# Get FW version | ||
FW_VERSION=$(cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d '=' -f 2 | tr -d '"') | ||
|
||
# Combine FW flavor with version | ||
FW_VERSION="${FW_FLAVOR}_${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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
|
||
cp "${DEFCONFIG}" .config | ||
|
@@ -60,7 +61,7 @@ function build_optiplex_9010 { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom ${BOARD}_${FW_VERSION}.rom | ||
|
@@ -79,7 +80,7 @@ function build_msi { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
|
||
cp "${DEFCONFIG}" .config | ||
|
@@ -90,7 +91,7 @@ function build_msi { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom ${BOARD}_${FW_VERSION}_$1.rom | ||
|
@@ -122,7 +123,7 @@ function build_protectli_vault { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom protectli_${BOARD}_${FW_VERSION}.rom | ||
|
@@ -145,7 +146,7 @@ function build_v1x10 { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
|
||
cp $DEFCONFIG .config | ||
|
@@ -154,7 +155,7 @@ function build_v1x10 { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom protectli_$1_${FW_VERSION}.rom | ||
|
@@ -180,7 +181,7 @@ function build_pcengines { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
|
||
cp $DEFCONFIG .config | ||
|
@@ -189,7 +190,8 @@ function build_pcengines { | |
|
||
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 \ | ||
-e BUILD_TIMELESS=${BUILD_TIMELESS} \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom pcengines_${VARIANT}_${FW_VERSION}.rom | ||
|
@@ -213,7 +215,7 @@ function build_qemu { | |
|
||
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 \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
|
||
cp $DEFCONFIG .config | ||
|
@@ -222,7 +224,8 @@ function build_qemu { | |
|
||
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 \ | ||
-e BUILD_TIMELESS=${BUILD_TIMELESS} \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
|
||
cp build/coreboot.rom qemu_q35_${FW_VERSION}.rom | ||
|
@@ -236,27 +239,60 @@ function build_qemu { | |
} | ||
|
||
function build_odroid_h4 { | ||
DEFCONFIG="configs/config.hardkernel_odroid_h4" | ||
DEFCONFIG=$1 | ||
FW_VERSION=$(cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d '=' -f 2 | tr -d '"') | ||
|
||
# checkout several submodules needed by these boards (some others are checked | ||
# out by coreboot's Makefile) | ||
git submodule update --init --force --checkout \ | ||
3rdparty/dasharo-blobs | ||
|
||
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 distclean" | ||
if [ "${AIRGAP}" -eq 1 ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be applied to all boards, not just selected ones. Mayeb it would also be worth to separate it into a function to reduce the LOC and overall boilerplate. |
||
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \ | ||
-v $HOME/.ssh:/home/coreboot/.ssh \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make clean" | ||
else | ||
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \ | ||
-v $HOME/.ssh:/home/coreboot/.ssh \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make distclean" | ||
fi | ||
|
||
cp $DEFCONFIG .config | ||
|
||
echo "Building Dasharo compatbile with Hardkernel ODROID H4 (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)" | ||
if [ "${AIRGAP}" -eq 1 ]; then | ||
|
||
# In this situation we assume that provided repository is ready to be used | ||
# and nothing should be downloaded during build process. | ||
|
||
if [ -d "${EDK2_REPO_PATH}" ]; then | ||
# Without following sequence workspce would be created by docker with root | ||
# privilidges and build will fail. | ||
# Target directory | ||
TARGET_DIR="payloads/external/edk2/workspace/Dasharo" | ||
mkdir -p "$TARGET_DIR" | ||
chown -R $(id -u):$(id -g) "$TARGET_DIR" | ||
chmod -R 755 "$TARGET_DIR" | ||
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \ | ||
-v $HOME/.ssh:/home/coreboot/.ssh \ | ||
--network none \ | ||
${EDK2_REPO_PATH:+-v $EDK2_REPO_PATH:/home/coreboot/coreboot/payloads/external/edk2/workspace/Dasharo} \ | ||
-e BUILD_TIMELESS=${BUILD_TIMELESS} \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
else | ||
echo "EDK2_REPO_PATH is not defined in AIRGAP!" | ||
exit 1 | ||
fi | ||
else | ||
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \ | ||
-v $HOME/.ssh:/home/coreboot/.ssh \ | ||
-w /home/coreboot/coreboot ${DASHARO_SDK} \ | ||
/bin/bash -c "make olddefconfig && make -j$(nproc)" | ||
fi | ||
Comment on lines
+266
to
+295
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be applied to all boards, not just selected ones. Maybe it would also be worth to separate it into a function to reduce the LOC and overall boilerplate. I think the docker commands to start the build are the same for every board. |
||
|
||
cp build/coreboot.rom hardkernel_odroid_h4_${FW_VERSION}.rom | ||
if [ $? -eq 0 ]; then | ||
|
@@ -350,7 +386,12 @@ case "$CMD" in | |
build_qemu "_all_menus" | ||
;; | ||
"odroid_h4" | "odroid_H4" | "ODROID_H4" ) | ||
build_odroid_h4 | ||
BOARD="odroid_h4" | ||
build_odroid_h4 "configs/config.hardkernel_odroid_h4" | ||
;; | ||
"odroid_h4_btg" ) | ||
BOARD="odroid_h4" | ||
build_odroid_h4 "configs/config.hardkernel_odroid_h4_btg" | ||
;; | ||
*) | ||
echo "Invalid command: \"$CMD\"" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should point to a stable tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I assume we can merge and make v1.6.0 release Dasharo/dasharo-sdk#11 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it has been approved long time ago. Feel free to merge and tag it @pietrushnic