-
Notifications
You must be signed in to change notification settings - Fork 14
/
qemu-emu-generator
executable file
·73 lines (68 loc) · 1.7 KB
/
qemu-emu-generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
echo Generating qemu-emu.mk
rm -f qemu-emu.mk
# Generate {debug|run}-{up|smp}-{bios|efi}-{pxe|hd}-{iso|fat}-\
# {ahci|ide|nvme|usb}-{kvm|tcg}
# Disallow nvme with iso
for rt in debug run trace
do
for np in up smp
do
for bt in bios efi
do
for bm in pxe hd
do
for fs in iso fat
do
for sc in ahci ide nvme usb
do
for em in kvm tcg
do
if [[ $fs = "iso" ]] && [[ $sc = "nvme" ]]; then
continue
fi
printf %s \
"$rt-$np-$bt-$bm-$fs-$sc-$em:" \
" \$(call QEMU_IMAGE,$fs)" \
" \$(QEMU_EXTRA_DEPS)" \
$'\n' $'\t' \
'echo -e -n ' $'\'' '\ec' $'\'' \
' >> dump/qemu-debug-out' \
$'\n' $'\t' \
"echo Running $rt-$np-$bt-$bm-$fs-$sc-$em" \
$'\n' $'\t' \
"\$(QEMU_SUDO) \$(QEMU)" \
' \' $'\n' $'\t\t' \
"\$(QEMU_EARLY)" \
' \' $'\n' $'\t\t' \
"\$(QEMU_COMMON)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_EMU,$em)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_DRV,$fs)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_NP,$np)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_HDCTL,""$sc"",""$fs"")" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_BOOT,$bt)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_RT,$rt)" \
' \' $'\n' $'\t\t' \
"\$(call QEMU_BOOTMEDIA,$bm,$bt)" \
' \' $'\n' $'\t\t' \
"\$(QEMU_EXTRA)" \
$'\n' $'\n' \
'.PHONY: ' "$rt-$np-$bt-$bm-$fs-$sc-$em" \
$'\n' $'\n' \
>> qemu-emu.mk
done
done
done
done
done
done
done
# '-drive' \
# " file=$IMG$DIF,format=raw,media=$QM" \
# ",werror=report,rerror=report,id=bootdrv"