Skip to content

Commit

Permalink
run_qemu.sh: restore ability to build without ndctl
Browse files Browse the repository at this point in the history
Fixes commit 1a2a679 ("run_qemu.sh: fail immediately when $ndctl is
invalid")

My bad, I didn't realize `readlink -f $does_not_exist` prints
"$does_not_exit", I assumed it prints nothing and I did not test enough
combinations. So, that previous commit made it way too hard to disable
the ndctl build: you must pass `--no-ndctl-build` _and_ have a valid
`~/git/ndctl`?! This makes no sense.

Fix the logic so either a blank `ndctl=`, or  `--no-ndctl-build` is
each enough to disable the ndctl build.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Dec 18, 2024
1 parent aa533ed commit b3fadbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pmem_label_size=2 #in MiB
pmem_final_size="$((pmem_size + pmem_label_size))"
: "${qemu:=qemu-system-x86_64}"
: "${gdb:=gdb}"
: "${ndctl:=$(readlink -f ~/git/ndctl)}"
: "${ndctl=$(readlink -f ~/git/ndctl)}"
selftests_home=root/built-selftests
mkosi_bin="mkosi"
mkosi_opts=("-i" "-f")
Expand Down Expand Up @@ -431,8 +431,9 @@ process_options_logic()
if [[ $_arg_kvm = "off" ]]; then
accel="tcg"
fi

check_ndctl_dir
if [[ $_arg_ndctl_build == "on" ]]; then
check_ndctl_dir
fi
}

make_install_kernel()
Expand Down

0 comments on commit b3fadbb

Please sign in to comment.