mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Fold constants and unify vnc variable names.
Approved by: grehan (mentor) MFC after: 3 days
This commit is contained in:
parent
b97bb95c9f
commit
49bc1b104e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328795
@ -39,9 +39,14 @@ DEFAULT_TAPDEV=tap0
|
|||||||
DEFAULT_CONSOLE=stdio
|
DEFAULT_CONSOLE=stdio
|
||||||
|
|
||||||
DEFAULT_NIC=virtio-net
|
DEFAULT_NIC=virtio-net
|
||||||
|
DEFAULT_DISK=virtio-blk
|
||||||
DEFAULT_VIRTIO_DISK="./diskdev"
|
DEFAULT_VIRTIO_DISK="./diskdev"
|
||||||
DEFAULT_ISOFILE="./release.iso"
|
DEFAULT_ISOFILE="./release.iso"
|
||||||
|
|
||||||
|
DEFAULT_VNCHOST="127.0.0.1"
|
||||||
|
DEFAULT_VNCPORT=5900
|
||||||
|
DEFAULT_VNCSIZE="w=1024,h=768"
|
||||||
|
|
||||||
errmsg() {
|
errmsg() {
|
||||||
echo "*** $1"
|
echo "*** $1"
|
||||||
}
|
}
|
||||||
@ -62,7 +67,7 @@ usage() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo " -h: display this help message"
|
echo " -h: display this help message"
|
||||||
echo " -a: force memory mapped local APIC access"
|
echo " -a: force memory mapped local APIC access"
|
||||||
echo " -A: use AHCI disk emulation instead of virtio"
|
echo " -A: use AHCI disk emulation instead of ${DEFAULT_DISK}"
|
||||||
echo " -c: number of virtual cpus (default: ${DEFAULT_CPUS})"
|
echo " -c: number of virtual cpus (default: ${DEFAULT_CPUS})"
|
||||||
echo " -C: console device (default: ${DEFAULT_CONSOLE})"
|
echo " -C: console device (default: ${DEFAULT_CONSOLE})"
|
||||||
echo " -d: virtio diskdev file (default: ${DEFAULT_VIRTIO_DISK})"
|
echo " -d: virtio diskdev file (default: ${DEFAULT_VIRTIO_DISK})"
|
||||||
@ -70,7 +75,7 @@ usage() {
|
|||||||
echo " -E: Use UEFI mode"
|
echo " -E: Use UEFI mode"
|
||||||
echo " -f: Use a specific UEFI firmware"
|
echo " -f: Use a specific UEFI firmware"
|
||||||
echo " -F: Use a custom UEFI GOP framebuffer size" \
|
echo " -F: Use a custom UEFI GOP framebuffer size" \
|
||||||
"(default: w=1024,h=768)"
|
"(default: ${DEFAULT_VNCSIZE}"
|
||||||
echo " -g: listen for connection from kgdb at <gdbport>"
|
echo " -g: listen for connection from kgdb at <gdbport>"
|
||||||
echo " -H: host filesystem to export to the loader"
|
echo " -H: host filesystem to export to the loader"
|
||||||
echo " -i: force boot of the Installation CDROM image"
|
echo " -i: force boot of the Installation CDROM image"
|
||||||
@ -78,13 +83,13 @@ usage() {
|
|||||||
"(default: ${DEFAULT_ISOFILE})"
|
"(default: ${DEFAULT_ISOFILE})"
|
||||||
echo " -l: the OS loader to use (default: /boot/userboot.so)"
|
echo " -l: the OS loader to use (default: /boot/userboot.so)"
|
||||||
echo " -L: IP address for UEFI GOP VNC server" \
|
echo " -L: IP address for UEFI GOP VNC server" \
|
||||||
"(default: 127.0.0.1)"
|
"(default: ${DEFAULT_VNCHOST}"
|
||||||
echo " -m: memory size (default: ${DEFAULT_MEMSIZE})"
|
echo " -m: memory size (default: ${DEFAULT_MEMSIZE})"
|
||||||
echo " -n: network adapter emulation type" \
|
echo " -n: network adapter emulation type" \
|
||||||
"(default: ${DEFAULT_NIC})"
|
"(default: ${DEFAULT_NIC})"
|
||||||
echo " -p: pass-through a host PCI device at bus/slot/func" \
|
echo " -p: pass-through a host PCI device at bus/slot/func" \
|
||||||
"(e.g. 10/0/0)"
|
"(e.g. 10/0/0)"
|
||||||
echo " -P: UEFI GOP VNC port (default: 5900)"
|
echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})"
|
||||||
echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)"
|
echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)"
|
||||||
echo " -T: Enable tablet device (for UEFI GOP)"
|
echo " -T: Enable tablet device (for UEFI GOP)"
|
||||||
echo " -u: RTC keeps UTC time"
|
echo " -u: RTC keeps UTC time"
|
||||||
@ -114,7 +119,7 @@ cpus=${DEFAULT_CPUS}
|
|||||||
nic=${DEFAULT_NIC}
|
nic=${DEFAULT_NIC}
|
||||||
tap_total=0
|
tap_total=0
|
||||||
disk_total=0
|
disk_total=0
|
||||||
disk_emulation="virtio-blk"
|
disk_emulation=${DEFAULT_DISK}
|
||||||
gdbport=0
|
gdbport=0
|
||||||
loader_opt=""
|
loader_opt=""
|
||||||
bhyverun_opt="-H -A -P"
|
bhyverun_opt="-H -A -P"
|
||||||
@ -124,9 +129,9 @@ pass_total=0
|
|||||||
efi_mode=0
|
efi_mode=0
|
||||||
efi_firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"
|
efi_firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"
|
||||||
vncwait=""
|
vncwait=""
|
||||||
vnchost="127.0.0.1"
|
vnchost=${DEFAULT_VNCHOST}
|
||||||
vncport=5900
|
vncport=${DEFAULT_VNCPORT}
|
||||||
fbsize="w=1024,h=768"
|
vncsize=${DEFAULT_VNCSIZE}
|
||||||
tablet=""
|
tablet=""
|
||||||
|
|
||||||
while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do
|
while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do
|
||||||
@ -160,7 +165,7 @@ while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do
|
|||||||
efi_firmware="${OPTARG}"
|
efi_firmware="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
F)
|
F)
|
||||||
fbsize="${OPTARG}"
|
vncsize="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
g)
|
g)
|
||||||
gdbport=${OPTARG}
|
gdbport=${OPTARG}
|
||||||
@ -356,7 +361,7 @@ while [ 1 ]; do
|
|||||||
efiargs=""
|
efiargs=""
|
||||||
if [ ${efi_mode} -gt 0 ]; then
|
if [ ${efi_mode} -gt 0 ]; then
|
||||||
efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},"
|
efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},"
|
||||||
efiargs="${efiargs}${fbsize}${vncwait}"
|
efiargs="${efiargs}${vncsize}${vncwait}"
|
||||||
efiargs="${efiargs} -l bootrom,${efi_firmware}"
|
efiargs="${efiargs} -l bootrom,${efi_firmware}"
|
||||||
efiargs="${efiargs} ${tablet}"
|
efiargs="${efiargs} ${tablet}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user