redirect QEMU window output to terminal running qemu

remove -serial stdio parameter add -nographic parameter and change the kernel parameter terminal = ttyS0 to console=ttyS0. This should do the trick. qemu -nographic -kernel ./bzImage -hda ./image.hda -append root=/dev/sda console=ttyS0 You may want to check the script I use for kernel development: https://github.com/arapov/wrap-qemukvm (it’s not very “production”, but you can find useful qemu cli … Read more

How to create a QEMU ARM machine with custom peripherals and memory maps?

In order to add your own machine, you need at least create one source file, containing the parameters and peripherals of your machine. After that, add a entry inside Makefile.objs, under qemu/hw/arm/. STM32 P103 machine entry. Let’s take as example Olimex STM32 P103 Development Board: Olimex STM32 P103 Development Board code. In lines 105 and … Read more

Why would you use the ternary operator without assigning a value for the “true” condition (x = x ?: 1)

This is permitted in GNU as an obscure extension to C 5.7 Conditionals with Omitted Operands The middle operand in a conditional expression may be omitted. Then if the first operand is nonzero, its value is the value of the conditional expression. Therefore, the expression x ? : y has the value of x if … Read more

How to use qemu to run a non-gui OS on the terminal?

You can compile qemu for youself and install it into your home directory. There will be no kernel-mode qemu accelerator, but the qemu will work and the speed will be rather high. Qemu has two options for non-gui start: http://wiki.qemu.org/download/qemu-doc.html 2.3.4 Display options: -nographic Normally, QEMU uses SDL to display the VGA output. With this … Read more

How to convert flat raw disk image to vmdk for virtualbox or vmplayer?

First, install QEMU. On Debian-based distributions like Ubuntu, run: $ apt-get install qemu Then run the following command: $ qemu-img convert -O vmdk imagefile.dd vmdkname.vmdk I’m assuming a flat disk image is a dd-style image. The convert operation also handles numerous other formats. For more information about the qemu-img command, see the output of $ … Read more