My experience in installing and attempting to use Bochs: Day 1

by Kit Peters <cdpeters@cs.cofc.edu>

I have a disk with an installation of OSR5 (SCO OpenServer Release 5) on it, and I want to see if I can get it running under Bochs. The installation of OSR5 has been tested, and works on the same hardware that Linux is running on now.

 

Introduction

Bochs is a cross-platform emulator for the Intel IA-32 series of processors. It currently can emulate an Intel 386, 486, Pentium, or Pentium Pro, or an AMD AMD64 processor. It was written by Kevin Lawton, and is maintained by The Bochs Project. It can be used to run various operating systems, including Linux, Windows 95, and Windows NT, inside a virtual machine. The principal reason for trying this is to have a way of getting at the data on the OSR5 disk. This installation of OSR5 uses HTFS, a proprietary filesystem from SCO which has no driver for Linux, so I can't simply mount the filesystem. I could use dd, but that would require knowing the precise location on the physical disk where the data is located, and I don't know that. Also, that might also require dealing with some sort of filesystem metadata, and I don't want to do that. If I can boot the SCO system under Bochs, however, and set up networking, I can access the data via FTP. The hardware that I am using is an IBM Aptiva with a 433 MHz Intel Celeron processor, and 32MB of PC100 SDRAM. That's not a lot of RAM, so I may upgrade it with some PC100 that I have laying around. For software, I'm using the vanilla Linux kernel 2.6.10 on Slackware 10.0. My compiler is GCC 3.3.4. I'm using glibc 2.3.2, binutils 2.15.90.0.3, and Bochs 2.2.

 

Configuring & Building Bochs

I began by configuring the Bochs build:

./configure --enable-config-interface --enable-processors=1 --enable-cpu-level=6 --enable-ne2000 --enable-pci --enable-pcidev --enable-pnic --enable-guest2host-tlb --enable-repeat-speedups --enable-icache --enable-fast-function-calls --enable-host-specific-asms --enable-reset-on-triple-fault --enable-all-optimizations --enable-vbe --enable-fpu --enable-cdrom --with-x --with-x11 --with-term

Note that while ./configure --help does not explicitly say that --enable-cpu-level and --enable-processors require an argument, configure fails if an argument is not passed. I won't go into what all these options to configure do; see the Bochs source distribution for that. However, I will say that --enable-processors=1 and --enable-cpu-level=6 tell Bochs to emulate a single Pentium Pro processor. Output of configure (skip):


checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking for an ANSI C-conforming const... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen in -ldl... (cached) yes
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_append... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for unsigned char... yes
checking size of unsigned char... 1
checking for unsigned short... yes
checking size of unsigned short... 2
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long... yes
checking size of unsigned long... 4
checking for unsigned long long... yes
checking size of unsigned long long... 8
checking for int *... yes
checking size of int *... 4
checking for getenv... yes
checking for setenv... yes
checking for select... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for strtoull... yes
checking for strtouq... yes
checking for strdup... yes
checking for strrev... no
checking for sleep... yes
checking for usleep... yes
checking for nanosleep... yes
checking for abort... yes
checking for gettimeofday... yes
checking for socklen_t... yes
checking for struct sockaddr_in.sin_len... no
checking for mkstemp... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for timelocal... yes
checking for gmtime... yes
checking for mktime... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for cos... no
checking for floor... no
checking if math functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if math functions link with -lm... yes
checking for struct timeval... yes
checking if compiler allows empty structs... yes
checking if compiler allows __attribute__... yes
checking for hash_map... no
checking for hash_map.h... yes
checking for set... yes
checking for set.h... yes
checking for configuration interface... yes
checking for new PIT model... yes
checking for idle hack... no
checking for dlfcn.h... (cached) yes
checking for assert.h... (cached) yes
checking for plugins support... no
checking for number of processors... 1
checking if compiler allows blank labels... yes
checking if compiler allows LL for 64-bit constants... yes
checking for x86-64 support... no
checking for cpu level... 6
checking for APIC support... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzopen in -lz... yes
checking for compressed hard disk image support... no
checking for NE2000 support... yes
checking for i440FX PCI support... yes
checking for PCI host device mapping support... yes
configure: Linux detected as host for PCI host device mapping
checking for limited USB support... no
checking for PCI pseudo NIC support... yes
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking for net/if.h... yes
checking for linux/netlink.h... yes
checking for net/if_tun.h... no
checking for linux/if_tun.h... yes
checking for 4Meg pages support... yes
checking for PAE support... yes
checking for guest to host TLB support... yes
checking for repeated IO and mem copy speedups... yes
checking for instruction cache support... yes
checking for gcc fast function calls optimization... yes
checking for global pages support... yes
checking for host specific inline assembly accelerations... yes
checking whether to ignore bad MSR references... yes
checking for port e9 hack... yes
checking show IPS... no
checking whether to reset on triple fault... yes
checking for use of .cpp as suffix... no
checking for Bochs internal debugger support... no
checking for external debugger... no
checking for magic breakpoints... no
checking for disassembler support... no
checking for ALL optimizations enabled... yes
checking whether user wants readline... yes
checking whether to use readline... no
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking for instrumentation support... no
checking for raw serial support... no
checking for VESA BIOS extensions... yes
checking for CLGD54XX emulation... no
checking for FPU emulation... yes
checking for MMX support... yes
checking for 3DNow! support... no
checking for SSE support... no
checking for DAZ support... no
checking for PNI support... no
checking for SEP support... no
checking for x86 debugger support... no
checking IOKit/storage/IOCDMedia.h usability... no
checking IOKit/storage/IOCDMedia.h presence... no
checking for IOKit/storage/IOCDMedia.h... no
checking for CDROM support... yes
checking for Sound Blaster 16 support... no
checking for standard PC gameport support... no
checking for gdb stub enable... no
checking for I/O Interface to the debugger... no
checking for docbook2html... not_found
checking whether to build docbook documentation... no
checking for wx-config... not_found
checking for wxWidgets configuration script... not_found
checking for wxWidgets library version...
configure: WARNING: Bochs for wxWidgets cannot be compiled here, disabling it
checking for default gui on this platform... x11
checking whether user wants XPM support... yes
checking X11/xpm.h usability... yes
checking X11/xpm.h presence... yes
checking for X11/xpm.h... yes
checking for display libraries...  X11 term
checking for mvaddch in -lcurses... yes
checking for mvaddch in -lncurses... yes
checking for mvaddch in -ltermlib... no
checking for mvaddch in -lpdcurses... no
checking for color_set... yes
checking for mvhline... yes
checking for mvvline... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... gcc
checking for gzip... /usr/bin/gzip
checking for tar... /usr/bin/tar
configure: creating ./config.status
config.status: creating Makefile
config.status: creating iodev/Makefile
config.status: creating bx_debug/Makefile
config.status: creating bios/Makefile
config.status: creating cpu/Makefile
config.status: creating memory/Makefile
config.status: creating gui/Makefile
config.status: creating disasm/Makefile
config.status: creating instrument/stubs/Makefile
config.status: creating misc/Makefile
config.status: creating fpu/Makefile
config.status: creating doc/docbook/Makefile
config.status: creating build/linux/bochs-dlx
config.status: creating bxversion.h
config.status: creating build/macosx/Info.plist
config.status: creating build/win32/nsis/Makefile
config.status: creating build/win32/nsis/bochs.nsi
config.status: creating host/linux/pcidev/Makefile
config.status: creating config.h
config.status: creating ltdlconf.h

   

Building Bochs

Now that Bochs was configured, I began the build process with make. It took 27 minutes to complete. Output of make (skip):


cd iodev && \
make  libiodev.a
make[1]: Entering directory `/usr/src/bochs-2.2/iodev'
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    busmouse.cc -o busmouse.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci.cc -o pci.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci.cc -o pci.o
root@darkstar:/usr/src/bochs-2.2# tail -f make.output
cd iodev && \
make  libiodev.a
make[1]: Entering directory `/usr/src/bochs-2.2/iodev'
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    busmouse.cc -o busmouse.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci.cc -o pci.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci.cc -o pci.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci2isa.cc -o pci2isa.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pci_ide.cc -o pci_ide.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pcivga.cc -o pcivga.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    -I../host/linux/pcidev pcidev.cc -o pcidev.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    pcipnic.cc -o pcipnic.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    ne2k.cc -o ne2k.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    scancodes.cc -o scancodes.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    serial_raw.cc -o serial_raw.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    svga_cirrus.cc -o svga_cirrus.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    vmware3.cc -o vmware3.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    cdrom.cc-o cdrom.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth.cc -o eth.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth_null.cc -o eth_null.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth_vnet.cc -o eth_vnet.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth_linux.cc -o eth_linux.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth_tap.cc -o eth_tap.o
g++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    eth_tuntap.cc -o eth_tuntap.o
rm -f  libiodev.a
ar rv libiodev.a devices.o pit.o pit82c54.o pit_wrap.o virt_timer.o slowdown_timer.o  ioapic.o pic.o serial.o parallel.o floppy.o keyboard.o vga.o biosdev.o cmos.o harddrv.o dma.o unmapped.o extfpuirq.o speaker.o busmouse.o pci.o pci2isa.o pci_ide.o pcivga.o pcidev.o pcipnic.o ne2k.o scancodes.o serial_raw.o svga_cirrus.o vmware3.o cdrom.o  eth.o eth_null.o eth_vnet.o eth_linux.o eth_tap.o eth_tuntap.o
ar: creating libiodev.a
a - devices.o
a - pit.o
a - pit82c54.o
a - pit_wrap.o
a - virt_timer.o
a - slowdown_timer.o
a - ioapic.o
a - pic.o
a - serial.o
a - parallel.o
a - floppy.o
a - keyboard.o
a - vga.o
a - biosdev.o
a - cmos.o
a - harddrv.o
a - dma.o
a - unmapped.o
a - extfpuirq.o
a - speaker.o
a - busmouse.o
a - pci.o
a - pci2isa.o
a - pci_ide.o
a - pcivga.o
a - pcidev.o
a - pcipnic.o
a - ne2k.o
a - scancodes.o
a - serial_raw.o
a - svga_cirrus.o
a - vmware3.o
a - cdrom.o
a - eth.o
a - eth_null.o
a - eth_vnet.o
a - eth_linux.o
a - eth_tap.o
a - eth_tuntap.o
ranlib libiodev.a
make[1]: Leaving directory `/usr/src/bochs-2.2/iodev'
echo done
done
cd cpu && \
make  libcpu.a
make[1]: Entering directory `/usr/src/bochs-2.2/cpu'
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   init.cc -oinit.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   cpu.cc -o cpu.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   resolve32.cc -o resolve32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fetchdecode.cc -o fetchdecode.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   access.cc -o access.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   shift16.cc-o shift16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   logical16.cc -o logical16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   resolve16.cc -o resolve16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ctrl_xfer32.cc -o ctrl_xfer32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ctrl_xfer16.cc -o ctrl_xfer16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   mmx.cc -o mmx.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   3dnow.cc -o 3dnow.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_emu.cc-o fpu_emu.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   sse.cc -o sse.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   sse_move.cc -o sse_move.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   sse_pfp.cc-o sse_pfp.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   sse_rcp.cc-o sse_rcp.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   soft_int.cc -o soft_int.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   io_pro.cc -o io_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   apic.cc -oapic.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   bcd.cc -o bcd.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   mult16.cc -o mult16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   tasking.cc-o tasking.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   shift32.cc-o shift32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   shift8.cc -o shift8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   arith8.cc -o arith8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   stack16.cc-o stack16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   protect_ctrl.cc -o protect_ctrl.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   protect_ctrl_pro.cc -o protect_ctrl_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   mult8.cc -o mult8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   data_xfer8.cc -o data_xfer8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   vm8086.cc -o vm8086.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   logical8.cc -o logical8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   logical32.cc -o logical32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   arith16.cc-o arith16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   segment_ctrl.cc -o segment_ctrl.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ctrl_xfer8.cc -o ctrl_xfer8.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   data_xfer16.cc -o data_xfer16.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   data_xfer32.cc -o data_xfer32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   exception.cc -o exception.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   cpuid.cc -o cpuid.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   proc_ctrl.cc -o proc_ctrl.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   lazy_flags.cc -o lazy_flags.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   stack_pro.cc -o stack_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   flag_ctrl_pro.cc -o flag_ctrl_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   stack32.cc-o stack32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   debugstuff.cc -o debugstuff.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   flag_ctrl.cc -o flag_ctrl.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   mult32.cc -o mult32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   arith32.cc-o arith32.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ctrl_xfer_pro.cc -o ctrl_xfer_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   segment_ctrl_pro.cc -o segment_ctrl_pro.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   io.cc -o io.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   bit.cc -o bit.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   string.cc -o string.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   paging.cc -o paging.o
paging.cc:355:2: warning: #warning "Move priv_check to CPU fields, or init.cc"
rm -f  libcpu.a
ar rv libcpu.a init.o cpu.o resolve32.o fetchdecode.o access.o shift16.o logical16.o resolve16.o ctrl_xfer32.o ctrl_xfer16.o mmx.o 3dnow.o fpu_emu.o sse.o sse_move.o sse_pfp.o sse_rcp.o soft_int.o io_pro.o apic.o bcd.o mult16.o tasking.o shift32.o shift8.o arith8.o stack16.o protect_ctrl.o protect_ctrl_pro.o mult8.o data_xfer8.o vm8086.o logical8.o logical32.o arith16.o segment_ctrl.o ctrl_xfer8.o data_xfer16.o data_xfer32.o exception.o cpuid.o proc_ctrl.o lazy_flags.o stack_pro.o flag_ctrl_pro.o stack32.o debugstuff.o flag_ctrl.o mult32.o arith32.o ctrl_xfer_pro.o segment_ctrl_pro.o io.o bit.o string.o paging.o
ar: creating libcpu.a
a - init.o
a - cpu.o
a - resolve32.o
a - fetchdecode.o
a - access.o
a - shift16.o
a - logical16.o
a - resolve16.o
a - ctrl_xfer32.o
a - ctrl_xfer16.o
a - mmx.o
a - 3dnow.o
a - fpu_emu.o
a - sse.o
a - sse_move.o
a - sse_pfp.o
a - sse_rcp.o
a - soft_int.o
a - io_pro.o
a - apic.o
a - bcd.o
a - mult16.o
a - tasking.o
a - shift32.o
a - shift8.o
a - arith8.o
a - stack16.o
a - protect_ctrl.o
a - protect_ctrl_pro.o
a - mult8.o
a - data_xfer8.o
a - vm8086.o
a - logical8.o
a - logical32.o
a - arith16.o
a - segment_ctrl.o
a - ctrl_xfer8.o
a - data_xfer16.o
a - data_xfer32.o
a - exception.o
a - cpuid.o
a - proc_ctrl.o
a - lazy_flags.o
a - stack_pro.o
a - flag_ctrl_pro.o
a - stack32.o
a - debugstuff.o
a - flag_ctrl.o
a - mult32.o
a - arith32.o
a - ctrl_xfer_pro.o
a - segment_ctrl_pro.o
a - io.o
a - bit.o
a - string.o
a - paging.o
ranlib libcpu.a
make[1]: Leaving directory `/usr/src/bochs-2.2/cpu'
echo done
done
cd memory && \
make  libmemory.a
make[1]: Entering directory `/usr/src/bochs-2.2/memory'
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   memory.cc -o memory.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   misc_mem.cc -o misc_mem.o
misc_mem.cc: In member function `void bx_mem_c::alloc_vector_aligned(unsigned
   int, unsigned int)':
misc_mem.cc:69: warning: cast from pointer to integer of different size
misc_mem.cc:70: warning: cast to pointer from integer of different size
rm -f  libmemory.a
ar rv libmemory.a memory.o misc_mem.o
ar: creating libmemory.a
a - memory.o
a - misc_mem.o
ranlib libmemory.a
make[1]: Leaving directory `/usr/src/bochs-2.2/memory'
echo done
done
cd gui && \
make  libgui.a
make[1]: Entering directory `/usr/src/bochs-2.2/gui'
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  keymap.cc -o keymap.o
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  gui.cc -o gui.o
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  siminterface.cc -o siminterface.o
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  textconfig.cc -o textconfig.o
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  x.cc -o x.o
g++ -c  -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/X11R6/include  term.cc -o term.o
rm -f  libgui.a
ar rv libgui.a keymap.o gui.o siminterface.o textconfig.o     x.o term.o
ar: creating libgui.a
a - keymap.o
a - gui.o
a - siminterface.o
a - textconfig.o
a - x.o
a - term.o
ranlib libgui.a
make[1]: Leaving directory `/usr/src/bochs-2.2/gui'
echo done
done
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' logio.cc -o logio.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' main.cc -o main.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' config.cc -o config.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' load32bitOShack.cc -o load32bitOShack.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' pc_system.cc -o pc_system.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' osdep.cc -o osdep.o
g++ -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"' plugin.cc -o plugin.o
cd fpu && \
make  libfpu.a
make[1]: Entering directory `/usr/src/bochs-2.2/fpu'
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ferr.cc -o ferr.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu.cc -o fpu.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_arith.cc -o fpu_arith.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_compare.cc -o fpu_compare.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_const.cc -o fpu_const.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_load_store.cc -o fpu_load_store.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_misc.cc -o fpu_misc.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_trans.cc -o fpu_trans.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpu_tags.cc -o fpu_tags.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fprem.cc -o fprem.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fsincos.cc -o fsincos.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   f2xm1.cc -o f2xm1.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fyl2x.cc -o fyl2x.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   fpatan.cc -o fpatan.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   softfloat.cc -o softfloat.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   softfloatx80.cc -o softfloatx80.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   softfloat-specialize.cc -o softfloat-specialize.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   softfloat-round-pack.cc -o softfloat-round-pack.o
g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -I./stubs -I././stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   poly.cc -o poly.o
rm -f  libfpu.a
ar rv libfpu.a ferr.o fpu.o fpu_arith.o fpu_compare.o fpu_const.o fpu_load_store.o fpu_misc.o fpu_trans.o fpu_tags.o fprem.o fsincos.o f2xm1.o fyl2x.o fpatan.o softfloat.o softfloatx80.o softfloat-specialize.o softfloat-round-pack.o poly.o
ar: creating libfpu.a
a - ferr.o
a - fpu.o
a - fpu_arith.o
a - fpu_compare.o
a - fpu_const.o
a - fpu_load_store.o
a - fpu_misc.o
a - fpu_trans.o
a - fpu_tags.o
a - fprem.o
a - fsincos.o
a - f2xm1.o
a - fyl2x.o
a - fpatan.o
a - softfloat.o
a - softfloatx80.o
a - softfloat-specialize.o
a - softfloat-round-pack.o
a - poly.o
ranlib libfpu.a
make[1]: Leaving directory `/usr/src/bochs-2.2/fpu'
echo done
done
/bin/sh ./libtool --mode=link g++ -o bochs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"'  -export-dynamic logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o   \
        iodev/libiodev.a cpu/libcpu.a memory/libmemory.a gui/libgui.a \
            \
         fpu/libfpu.a \
        -L/usr/X11R6/lib -lSM -lICE -lX11 -lXpm -lncurses   \
         \
         \
         \
         \
        -lm
mkdir .libs
mkdir: cannot create directory `.libs': File exists
g++ -o bochs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DBX_SHARE_PATH=\"/usr/local/share/bochs\" logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o -Wl,--export-dynamic  iodev/libiodev.a cpu/libcpu.a memory/libmemory.a gui/libgui.a fpu/libfpu.a -L/usr/X11R6/lib -lSM -lICE -lX11 -lXpm -lncurses -lm
gcc -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ./misc/bximage.c -o misc/bximage.o
/bin/sh ./libtool --mode=link g++ -o bximage -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES     misc/bximage.o
g++ -o bximage -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES misc/bximage.o
gcc -c -I. -I./. -Iinstrument/stubs -I./instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   ./misc/bxcommit.c -o misc/bxcommit.o
/bin/sh ./libtool --mode=link g++ -o bxcommit -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    misc/bxcommit.o
g++ -o bxcommit -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES misc/bxcommit.o

real    26m59.417s
user    7m31.824s
sys     0m23.278s

   

Installing Bochs

Finally, I installed Bochs via make install (skip):

cd iodev && \
make  libiodev.a
make[1]: Entering directory `/usr/src/bochs-2.2/iodev'
make[1]: `libiodev.a' is up to date.
make[1]: Leaving directory `/usr/src/bochs-2.2/iodev'
echo done
done
cd cpu && \
make  libcpu.a
make[1]: Entering directory `/usr/src/bochs-2.2/cpu'
make[1]: `libcpu.a' is up to date.
make[1]: Leaving directory `/usr/src/bochs-2.2/cpu'
echo done
done
cd memory && \
make  libmemory.a
make[1]: Entering directory `/usr/src/bochs-2.2/memory'
make[1]: `libmemory.a' is up to date.
make[1]: Leaving directory `/usr/src/bochs-2.2/memory'
echo done
done
cd gui && \
make  libgui.a
make[1]: Entering directory `/usr/src/bochs-2.2/gui'
make[1]: `libgui.a' is up to date.
make[1]: Leaving directory `/usr/src/bochs-2.2/gui'
echo done
done
cd fpu && \
make  libfpu.a
make[1]: Entering directory `/usr/src/bochs-2.2/fpu'
make[1]: `libfpu.a' is up to date.
make[1]: Leaving directory `/usr/src/bochs-2.2/fpu'
echo done
done
for i in /usr/local/bin; do mkdir -p $i && test -d $i && test -w $i; done
for i in bochs bximage bxcommit; do if test -f $i; then install $i /usr/local/bin; else install ./$i /usr/local/bin; fi; done
for i in bochsdbg; do if test -f $i; then install $i /usr/local/bin; else install ./$i /usr/local/bin; fi; done
install: cannot stat `./bochsdbg': No such file or directory
make: [install_bin] Error 1 (ignored)
mkdir -p /usr/local/man/man1
mkdir -p /usr/local/man/man5
for i in bochs bximage bxcommit bochs-dlx; do cat ./doc/man/$i.1 | sed 's/@version@/2.2/g' | gzip -9 -c >  /usr/local/man/man1/$i.1.gz; chmod 644 /usr/local/man/man1/$i.1.gz; done
for i in bochsrc; do cat ./doc/man/$i.5 | gzip -9 -c >  /usr/local/man/man5/$i.5.gz; chmod 644 /usr/local/man/man5/$i.5.gz; done
for i in /usr/local/share/bochs;        do mkdir -p $i && test -d $i && test -w $i; done
for i in bios/BIOS-* bios/VGABIOS* ; do if test -f $i; then install -m 644 $i /usr/local/share/bochs; else install -m 644 ./$i /usr/local/share/bochs; fi; done
mkdir /usr/local/share/bochs/keymaps
for i in ./gui/keymaps/*.map; do install -m 644 $i /usr/local/share/bochs/keymaps/; done
for i in /usr/local/share/doc/bochs; do mkdir -p $i && test -d $i && test -w $i; done
for i in CHANGES COPYING README TODO; do if test -f $i; then install -m 644 $i /usr/local/share/doc/bochs; else install -m644 ./$i /usr/local/share/doc/bochs; fi; done
rm -f /usr/local/share/doc/bochs/README
cat ./build/linux/README.linux-binary ./README > /usr/local/share/doc/bochs/README
install -m 644 ./.bochsrc /usr/local/share/doc/bochs/bochsrc-sample.txt

   

Configuring the Bochs Installation

Now that Bochs was installed, it was time to configure the installation. I began by copying the file bochsrc-sample.txt (in my case, located at /usr/local/share/doc/bochs/bochsrc-sample.txt) to /etc/bochsrc. I then edited /etc/bochsrc to suit my preferences.

Editing /etc/bochsrc

In the process of editing /etc/bochsrc, I began to get the impression that Bochs would not emulate a SCSI disk to the guest operating system (the operating system running on the virtual machine). This may present a problem, as the SCO installation is on a SCSI disk, and SCO expects a SCSI disk. Also, there is a configuration directive in /etc/bochsrc called ips. This directive is explained in /usr/local/share/doc/bochs/bochsrc-sample.txt as:

#=======================================================================
# IPS:
# Emulated Instructions Per Second.  This is the number of IPS that bochs
# is capable of running on your machine.  Read the note in config.h
# on how to find this.  Make sure to recompile after.
#
# IPS is used to calibrate many time-dependent events within the bochs
# simulation.  For example, changing IPS affects the frequency of VGA
# updates, the duration of time before a key starts to autorepeat, and
# the measurement of BogoMips and other benchmarks.
#
# Examples:
# Machine                                         Mips
# ________________________________________________________________
# 1.6Ghz Intel P4 with Win2000/g++ 3.3            5 to 7 Mips
# 650Mhz Athlon K-7 with Linux 2.4.4/egcs-2.91.66 2 to 2.5 Mips
# 400Mhz Pentium II with Linux 2.0.36/egcs-1.0.3  1 to 1.8 Mips
# 166Mhz 64bit Sparc with Solaris 2.x             approx 0.75 Mips
# 200Mhz Pentium with Linux 2.x                   approx 0.5 Mips
#
#=======================================================================

When examining config.h in the source, it recommends turning on the option that configures Bochs to periodically display the IPS rate at which it is running, and then using the average IPS rate in /etc/bochsrc. I foolishly did not realize that I ought to do this, and so it was necessary to recompile Bochs with this option turned on. After recompiling Bochs, I edited my /etc/bochsrc to use the text-mode configuration interface, the "term" display library (text/curses based), to output debugging information to a text file, and to emulate /dev/sda4 as an IDE device. The relevant lines in my /etc/bochsrc:


config_interface: textconfig # KP
display_library: term # KP
debugger_log: debugger.out # KP
ata0-master: type=disk, path=/dev/sda4, cylinders=132, heads=256, spt=61 # KP

Note that I specified the number of heads, cylinders, and sectors per track. I'm not sure that was necessary, and I'll try changing that after I've successfully run Bochs at least once. I'd like to not have to specify that at all, as I'd like my Bochs setup to be as versatile as possible, and able to support disks of different configurations without my having to manually edit /etc/bochsrc.

 

Running Bochs

Having initially customized /etc/bochsrc to my liking, I was ready to run Bochs for the first time. I started Bochs via the command line (by typing "bochs") and was presented with this screen:

00000000000i[APIC?] local apic in  initializing
========================================================================
                        Bochs x86 Emulator 2.2
                Build from CVS snapshot on May 28, 2005
========================================================================
00000000000i[     ] reading configuration from /etc/bochsrc
------------------------------
Bochs Configuration: Main Menu
------------------------------

This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate.  Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found.  When you are satisfied with the configuration, go
ahead and start the simulation.

You can also start bochs with the -q option to skip these menus.

1. Restore factory default configuration
2. Read options from...
3. Edit options
4. Save options to...
5. Begin simulation
6. Quit now

Please choose one: [5]

I decided to begin the simulation, as I was satisfied with the current state of my options. I chose option 5, and was presented with this screen:

Plex86/Bochs VGABios 0.5b 24 May 2005                                           
This VGA/VBE Bios is released under the GNU LGPL                                
                                                                                
Please visit :                                                                  
 . http://bochs.sourceforge.net                                                 
 . http://www.nongnu.org/vgabios                                                
                                                                                
Bochs VBE Display Adapter enabled                                               
                                                                                
Bochs BIOS, 1 cpu, $Revision: 1.138 $ $Date: 2005/05/07 15:55:26 $              
                                                                                
ata0 master: Generic 1234 ATA-2 Hard-Disk (1006 MBytes)                         
                                                                                
Booting from Hard Disk...                                                       
                                                                                
Cannot open device: hd(40)/boot                                                 
Cannot open                                                                     
Stage 1 boot failure: error loading hd(40)/boot                       

This was the boot screen for my SCO OSR5 installation, and unfortunately OSR5 failed to boot, as I had expected. OSR5 was configured to boot from a SCSI device, and Bochs was emulating an IDE device. I attempted to exit Bochs gracefully, but was forced to end the process with a SIGKILL (kill -9). I had configured the Bochs build process to enable Bochs to access the host machine's PCI bus. I wondered whether there was some way of using that in order to boot my OSR5 disk. I started Bochs again and this time chose option 3 ("Edit options") at startup. I was presented with the following screen:

Bochs Configuration: Main Menu
------------------------------

This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate.  Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found.  When you are satisfied with the configuration, go
ahead and start the simulation.

You can also start bochs with the -q option to skip these menus.

1. Restore factory default configuration
2. Read options from...
3. Edit options
4. Save options to...
5. Begin simulation
6. Quit now

Please choose one: [5] 3
------------------
Bochs Options Menu
------------------
0. Return to previous menu
1. Log file: bochsout.txt
2. Log prefix: %t%e%d
3. Debug log file: debugger.out
4. Log options for all devices
5. Log options for individual devices
6. Memory options
7. Interface options
8. Disk options
9. Serial or Parallel port options
10. Sound Blaster 16 options
11. Network card options
12. Keyboard options
13. PCI options
14. Other options

I chose option 13, and got:

-----------
PCI Options
-----------
0. Return to previous menu
1. Enable i440FX PCI Support: no
2. (disabled)
3. (disabled)
4. (disabled)
5. (disabled)
6. (disabled)
7. (disabled)
8. (disabled)
9. (disabled)
10. (disabled)
11. (disabled)

I chose option 1, which eventually (after enabling all five PCI slots) led to the following:

-----------
PCI Options
-----------
0. Return to previous menu
1. Enable i440FX PCI Support: yes
2. Use PCI slot #1: yes
3. PCI slot #1 device:
4. Use PCI slot #2: yes
5. PCI slot #2 device:
6. Use PCI slot #3: yes
7. PCI slot #3 device:
8. Use PCI slot #4: yes
9. PCI slot #4 device:
10. Use PCI slot #5: yes
11. PCI slot #5 device:

The Bochs FAQ suggested that I should use pcipnic for a PCI NIC, and pcidev with the appropriate vendor and device IDs for other PCI devices. My SCSI card was an Adaptec AHA-2940U PCI adapter, which uses the aic7880 chipset, so my vendor and device IDs were respectively 0x9004 and 0x8078. As I only needed the NIC and the SCSI adapter on the PCI bus, I then disabled PCI slots 3, 4, and 5. I next went to the Bochs Disk Options, option 8 on the Bochs Options Menu:

------------------
Bochs Disk Options
------------------
0. Return to previous menu
1. Floppy Disk 0
2. Floppy Disk 1
3. ATA channel 0
4. (disabled)
5. (disabled)
6. ATA channel 1
7. (disabled)
8. (disabled)
9. ATA channel 2
10. (disabled)
11. (disabled)
12. ATA channel 3
13. (disabled)
14. (disabled)
15. Boot drive #1: floppy
16. Boot drive #2: none
17. Boot drive #3: none
18. Skip Floppy Boot Signature Check: no

As you can see, there are no options for booting from SCSI. I attempted to disable boot drive #1, but I was unable to do so. I returned to the main menu, and saved my changes to /etc/bochsrc. I then began the simulation again, curious to see what would happen. Bochs failed with the message: "[PCI ] Unknown plugin 'pcipnic' at PCI slot #1" Undaunted, I reconfigured Bochs to emulate a PCI NE2000 NIC in PCI slot #1. This failed as well. I then recalled that to use the host PCI bus (which requires Linux 2.4/2.6), a module provided by Bochs, pcidev.ko must be loaded. I built and loaded this module. Once again, Bochs exited with the message: "[PCI ] Unknown plugin 'ne2k' at PCI slot #1" I then went into /etc/bochsrc again, and noticed a line: "ne2k: enabled=0" I changed this to read "ne2k: enabled=1" amd started Bochs again. This time I got:

00000000000i[APIC?] local apic in  initializing
========================================================================
                        Bochs x86 Emulator 2.2
                Build from CVS snapshot on May 28, 2005
========================================================================
00000000000i[     ] reading configuration from /etc/bochsrc
00000000000e[     ] /etc/bochsrc: unknown parameter for pci slot ignored.
00000000000p[     ] >>PANIC<< /etc/bochsrc: ne2k directive incomplete (ioaddr, irq and mac are required)
00000000000i[SYS  ] Last time is 0
00000000000i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[     ] /etc/bochsrc: ne2k directive incomplete (ioaddr, irq and mac are required)
========================================================================
00000000000i[CTRL ] quit_sim called with exit code 1

Having no idea what to use for the configuration options to the ne2k directive, I disabled it again. There was another interesting line, however: "pnic: enabled=0" I changed that line to "pnic: enabled=1" and changed the line "i440fxsupport: enabled=1, slot1=pcipnic, slot2=pcidev: vendor=0x9004, device=0x8078" to read "i440fxsupport: enabled=1, slot1=ne2k, slot2=pcidev: vendor=0x9004, device=0x8078" and started Bochs again. This time I got:

00000000000i[APIC?] local apic in  initializing
========================================================================
                        Bochs x86 Emulator 2.2
                Build from CVS snapshot on May 28, 2005
========================================================================
00000000000i[     ] reading configuration from /etc/bochsrc
00000000000e[     ] /etc/bochsrc: unknown parameter for pci slot ignored.
00000000000p[     ] >>PANIC<< /etc/bochsrc: pnic directive incomplete (ioaddr, irq and mac are required)
00000000000i[SYS  ] Last time is 0
00000000000i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[     ] /etc/bochsrc: pnic directive incomplete (ioaddr, irq and mac are required)
========================================================================
00000000000i[CTRL ] quit_sim called with exit code 1

At this point, it seemed that I must choose an I/O address, IRQ, and MAC address for this NIC. I was not sure whether I should use those of the installed NIC or make some up. I had also become rather tired. I decided to make a strategic retreat, as it were, and wrestle with Bochs another day.

 

Configuration files

My /etc/bochsrc, as modified by the Bochs configuration editor, is here. My original hand-edited /etc/bochsrc is here.