Using QEMU

From Milkymist Wiki

Jump to: navigation, search

Get Michael Walle's source:

 http://git.serverraum.org/?p=mw/qemu-lm32.git;a=summary
 git clone http://git.serverraum.org/git/mw/qemu-lm32.git (get the "milkymist" branch)

Command line:

 ./lm32-softmmu/qemu-system-lm32 -M milkymist -nographic -kernel [ELF kernel] -initrd [initrd]
 -append "root=/dev/ram"

[edit] GDB

It is also possible to use GDB. For this purpose, add ā€œ-s -Sā€ to the above command line, and run:

 lm32-linux-gdb vmlinux
 (gdb) target remote localhost:1234

[edit] Networking

 lm32-softmmu/qemu-system-lm32 -M milkymist -kernel bios.elf
 -nographic -net nic -net user,net=172.16.0.0/24,host=172.16.0.254,tftp=/milkymist

To use the real network: change the option to -net nic -net tap

[edit] Audio

 QEMU_AUDIO_DAC_FIXED_SETTINGS=0 QEMU_AUDIO_ADC_FIXED_SETTINGS=0 
 QEMU_OSS_ADC_DEV=/dev/dsp 
 qemu-system-lm32 -M milkymist -kernel boot.elf -serial stdio

QEMU_OSS_ADC_DEV defaults to /dev/dsp, in case you have more than one sound device. Also check out the -audio-help parameter. As you might noticed you have to use OSS for now. Alsa isn't working atm.