Skip to content

Commit a770d87

Browse files
committed
Merge branch 'latest' into net
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
2 parents 3562e0c + 9b7847a commit a770d87

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ When launching the docker image, you have to specify the mode you want to use:
2727
- `make`: Run the `make` command with optional parameters.
2828
- `make.cross`: Run Intel's `make.cross` command with optional parameters.
2929
- `build`: Build everything, but don't start the VM (`normal` mode by default).
30+
- `clean`: Clean the build directory (`normal` mode by default).
3031
- `defconfig`: Only generate the `.config` file (`normal` mode by default).
3132
- `selftests`: Only build the KSelftests.
3233
- `bpftests`: Only build the BPF tests.

entrypoint.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ setup_env() { local mode
349349
export KBUILD_OUTPUT="${VIRTME_BUILD_DIR}"
350350
export KCONFIG_CONFIG="${VIRTME_KCONFIG}"
351351

352+
if [ "${INPUT_CLEAN}" = 1 ]; then
353+
rm -rf "${VIRTME_BUILD_DIR}" "${VIRTME_PERF_DIR}"
354+
fi
355+
352356
mkdir -p \
353357
"${VIRTME_BUILD_DIR}" \
354358
"${VIRTME_SCRIPTS_DIR}" \
@@ -1873,11 +1877,12 @@ usage() {
18731877
echo
18741878
echo " - KConfig: optional kernel config: arguments for './scripts/config' or config file"
18751879
echo
1876-
echo "Usage: ${0} <make [params] | make.cross [params] | build <mode> | defconfig <mode> | selftests | bpftests | cmd <command> | src <source file> | static | vm-manual | vm-auto | connect | lcov2html>"
1880+
echo "Usage: ${0} <make [params] | make.cross [params] | build <mode> | clean <mode> | defconfig <mode> | selftests | bpftests | cmd <command> | src <source file> | static | vm-manual | vm-auto | connect | lcov2html>"
18771881
echo
18781882
echo " - make: run the make command with optional parameters"
18791883
echo " - make.cross: run Intel's make.cross command with optional parameters"
18801884
echo " - build: build everything, but don't start the VM ('normal' mode by default)"
1885+
echo " - clean: clean the build directory"
18811886
echo " - defconfig: only generate the .config file ('normal' mode by default)"
18821887
echo " - selftests: only build the KSelftests"
18831888
echo " - bpftests: only build the BPF tests"
@@ -1969,6 +1974,10 @@ case "${INPUT_MODE}" in
19691974
"build")
19701975
prepare_all manual "${@:-normal}"
19711976
;;
1977+
"clean")
1978+
setup_env "${@:-normal}"
1979+
rm -r "${VIRTME_BUILD_DIR}"
1980+
;;
19721981
"defconfig")
19731982
setup_env "${@:-normal}"
19741983
gen_kconfig "${@:-normal}"

0 commit comments

Comments
 (0)