From a677f1bfd3368743553bbf6363ba7c4763fefe78 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 24 Aug 2006 13:55:43 +0000 Subject: Basic instructions to get qemu running --- contrib/bochs/README.qemu | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 contrib/bochs/README.qemu diff --git a/contrib/bochs/README.qemu b/contrib/bochs/README.qemu new file mode 100644 index 00000000..ae2984ca --- /dev/null +++ b/contrib/bochs/README.qemu @@ -0,0 +1,80 @@ +Running Etherboot within qemu +============================= + +Michael Brown + +To get qemu running is fairly simple: + +1. Build the utilities in this directory: + make + +2. Get the qemu source code: + cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \ + login + cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \ + co qemu + +3. Configure qemu with + pushd qemu + ./configure --enable-system --enable-profiler + popd + + Note that qemu will not compile with gcc4; if your system's + default compiler is gcc4 then specify the path to gcc3 using + e.g. --cc=gcc-3.3.6 + +4. Build qemu: + make -C qemu + +5. As root, set up a TAP virtual network device: + /sbin/modprobe tun + chmod o+rw /dev/net/tun + ./tunctl -u -t tap0 + /sbin/ifconfig tap0 up 10.254.254.2 netmask 255.255.255.0 + +6. As root, add the following fragment to /etc/dhcpd.conf: + subnet 10.254.254.0 netmask 255.255.255.252 { + range dynamic-bootp 10.254.254.1 10.254.254.1; + } + You will also need to add in any of your usual declarations for + Etherboot, e.g. 'filename "vmlinuz.ltsp";'. Note that this setup + assumes that your DHCP server, TFTP server etc. all live on the + machine you are using for running qemu. If not, then you're on + your own. + +7. As root, restart dhcpd + /etc/init.d/dhcpd restart + +8. Build Etherboot floppy disk images and pad to 1.44MB + pushd ../../src + make bin/rtl8139.dsk + ./util/dskpad.pl bin/rtl8139.dsk + popd + +9. Start qemu + ./qemu/i386-softmmu/qemu -L qemu/pc-bios \ + -net nic,model=rtl8139 -net tap,ifname=tap0 \ + -boot a -fda ../../src/bin/rtl8139.dsk + +You should see qemu start up, load up Etherboot and attempt to boot +from the network. + + + +Serial console +============== + +You can use the program "serial-console" to obtain a virtual serial +console for Etherboot running within qemu. Run "./serial-console" on +a spare tty (e.g. a separate xterm window) before starting qemu, and +ensure that you have enabled CONSOLE_SERIAL in config.h. + +When serial-console starts, it will print out the message "Slave pty +is /dev/pts/XX", where XX is a number. You need to append the option + + -serial /dev/pts/XX + +to the qemu command line. + +There is a manual page for "serial-console"; use "man +./serial-console.1" to view it. -- cgit v1.2.3-55-g7522