Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,20 @@ BUILD_TIMELESS=${BUILD_TIMELESS:-0}
AIRGAP=${AIRGAP:-0}

function sdk_run {
docker run --rm -t -u $UID -v $PWD:/home/coreboot/coreboot \
docker run --rm -t -u $UID \
-v $PWD:/build/coreboot \
-v $HOME/.ssh:/home/coreboot/.ssh \
-e BUILD_TIMELESS=${BUILD_TIMELESS} \
-w /home/coreboot/coreboot ${DASHARO_SDK} \
-w /build/coreboot ${DASHARO_SDK} \
"$@"
}

function build_prep {
ls -al;
if [ "${AIRGAP}" -eq 1 ]; then
sdk_run /bin/bash -c "make clean"
sdk_run /bin/bash -c "id; ls -al; make clean -d"
else
sdk_run /bin/bash -c "make distclean"
sdk_run /bin/bash -c "id; ls -al; make distclean -d"
fi

cp "${DEFCONFIG}" .config
Expand All @@ -83,13 +85,13 @@ function build_start {
chmod -R 755 "$TARGET_DIR"
sdk_run --network none \
${EDK2_REPO_PATH:+-v $EDK2_REPO_PATH:/home/coreboot/coreboot/${TARGET_DIR}} \
/bin/bash -c "make olddefconfig && make -j$(nproc)"
/bin/bash -c "make olddefconfig -d && make -j$(nproc) -d"
else
echo "EDK2_REPO_PATH is not defined in AIRGAP!"
exit 1
fi
else
sdk_run /bin/bash -c "make olddefconfig && make -j$(nproc)"
sdk_run /bin/bash -c "make olddefconfig -d && make -j$(nproc) -d"
fi
}

Expand Down
Loading