Yocto Project Documentation
 help / color / mirror / Atom feed
* qemuboot.conf variables
@ 2025-02-14 15:50 Mark Hatle
  2025-02-17 12:04 ` [docs] " Quentin Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2025-02-14 15:50 UTC (permalink / raw)
  To: docs

When I was looking through the large docs, I didn't see anything inside of it to 
explain the various variables used in the qemuboot.conf file.

Looking through the code, I found the stuff mostly in the class that creates the 
file, but there were also fragments of explanation in prior commit messages and 
other places.  Below is my attempt to collect all of the qemuboot.conf variables 
in one place, along with an explanation.  I think this would be useful to add to 
the regular docs, but I'm not exactly sure where or what format.

There are some other things related to runqemu usage that would be nice to 
document as well (command line usage, environment variable, command substitution 
behavior and generated command line rules), but the items below are the ones 
that I had to search for when I was trying to explain the qemuboot.conf to 
someone else.


QB_AUDIO_DRV: QEMU audio driver (e.g. "alsa", set it when support audio)

QB_AUDIO_OPT: QEMU audio option (e.g. "-soundhw ac97,es1370"), which is used 
when QB_AUDIO_DRV is set.

QB_CLEANUP_CMD: enable running custom shell cleanup commands after QEMU.

QB_CMDLINE_IP_SLIRP: explicitely specify the ip= kernel command line arguments 
for slirp mode

QB_CMDLINE_IP_TAP: explicitely specify the ip= kernel command line arguments for 
tap mode

QB_CPU: QEMU cpu (e.g. "-cpu qemu32")

QB_CPU_KVM: Similar to QB_CPU except used for kvm support (e.g. "-cpu kvm64")

QB_DEFAULT_BIOS: specify a BIOS the same way that the KERNEL variable is 
specified (same as BIOS command line variable)

QB_DEFAULT_FSTYPE: Default FSTYPE to boot (e.g. "ext4")

QB_DEFAULT_KERNEL: Default kernel to boot (e.g. "bzImage")

QB_DRIVE_TYPE: /dev/sd, /dev/hd, /dev/vdb, /dev/vd - config drives that start 
with one of these prefixes, requires virtio

QB_DTB: QEMU dtb name

QB_FSINFO: specify "wic:no-kernel-in-fs" or "wic:kernel-in-fs"

QB_GRAPHICS: QEMU video card type (e.g. "-vga std")

QB_KERNEL_CMDLINE: can be set to “none” to avoid overriding kernel command line 
specified in dtb

QB_KERNEL_CMDLINE_APPEND: Options to append to the kernel's -append option (e.g. 
"console=ttyS0 console=tty")

QB_KERNEL_ROOT: Kernel's root (e.g. /dev/vda)

QB_MACHINE: QEMU machine (e.g. "-machine virt")

QB_MEM: Memory (e.g. "-m 512")

QB_NET: can be set to "none" to disable networking

QB_NETWORK_DEVICE: network device settings used by both slirp and tap

QB_NFSROOTFS_EXTRA_OPT: allow extra options to be appended to the NFS rootfs 
options in kernel boot args, e.g. "wsize=4096,rsize=4096"

QB_OPT_APPEND: Options to append to QEMU (e.g. "-show-cursor")

QB_NO_PNI: By default, if 'DISTRO_FEATURES' does NOT contains 'pni-names' add 
'net.ifnames=0' to QB_CMDLINE_IP_TAP default.  See QB_CMDLINE_IP_TAP.

QB_RNG: Pass-through for host random number generator, it can speedup boot in 
system mode, where system is experiencing entropy starvation (requires virtio)

QB_ROOTFS: can be set to "none" to disable rootfs setup

QB_ROOTFS_EXTRA_OPT: Content of the optional parameter will be appended to the 
rootfs-device in the qemu configuration, in case QB_ROOTFS_OPT is not specified. 
By default this is empty.

QB_ROOTFS_OPT: Used as rootfs (e.g. "-drive 
id=disk0,file=@ROOTFS@,if=none,format=raw -device 
virtio-blk-device,drive=disk0"). runqemu will replace "@ROOTFS@" with the one 
which is used, such as core-image-minimal-qemuarm64.ext4.

QB_SERIAL_OPT: Serial port (e.g. "-serial mon:stdio")

QB_SETUP_CMD: enable running custom shell setup before QEMU.

QB_SLIRP_OPT: Network option for SLIRP mode (e.g. "-netdev user,id=net0 -device 
virtio-net-device,netdev=net0")

QB_SMP: amount of CPU cores inside qemu guest, each mapped to a thread on the 
host, e.g. "-smp 8"

QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386")

QB_TAP_OPT: Network option for 'tap' mode (e.g. "-netdev 
tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-device,netdev=net0"). runqemu will replace "@TAP@" with the one that 
is used, such as tap0, tap1 ...

QB_TCPSERIAL_OPT: tcp serial port option (e.g. " -device virtio-serial-device 
-chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device 
virtconsole,chardev=virtcon" runqemu will replace "@PORT@" with the port number 
which is used.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-17 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 15:50 qemuboot.conf variables Mark Hatle
2025-02-17 12:04 ` [docs] " Quentin Schulz
2025-02-17 21:37   ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox