File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -938,6 +938,11 @@ update_rootfs_boot_kernel()
938
938
939
939
defconf=" $builddir /mnt/loader/loader.conf"
940
940
local loader_timeout=4
941
+ if [[ $_arg_kvm == " on" ]] && [[ $_arg_gdb == " on" ]]; then
942
+ # KVM is not compatible with qemu -S, see
943
+ # https://github.com/pmem/run_qemu/issues/11
944
+ loader_timeout=301
945
+ fi
941
946
942
947
# mkosi->"bootctl install ..." creates a stub loader.conf.
943
948
# It can also come from a previous run of this script.
@@ -1872,7 +1877,22 @@ prepare_qcmd()
1872
1877
fi
1873
1878
1874
1879
if [ " $_arg_gdb " == " on" ]; then
1875
- qcmd+=(" -gdb" " tcp::10000" " -S" )
1880
+ qcmd+=(" -gdb" " tcp::10000" )
1881
+ # -S seems to rely on a _software_ breakpoint which seems incompatible with KVM,
1882
+ # see https://github.com/pmem/run_qemu/issues/11
1883
+ if [[ " $_arg_kvm " == ' on' ]]; then
1884
+ {
1885
+ printf ' \n\nWARNING: qemu "-S" option seems incompatible with KVM; not used.\n'
1886
+ if [[ " $_arg_direct_kernel " == ' on' ]]; then
1887
+ printf ' \tOption --no-direct-kernel is recommended.\n\n'
1888
+ else
1889
+ printf ' \tBoot loader will wait a few minutes.\n\n'
1890
+ fi
1891
+ } >&2
1892
+ sleep 2
1893
+ else
1894
+ qcmd+=(" -S" )
1895
+ fi
1876
1896
fi
1877
1897
1878
1898
# cpu + mem nodes (i.e. the --nodes option)
You can’t perform that action at this time.
0 commit comments