📄 user.dbk
字号:
<section><title>Transcript of Successful Compilation</title><para><screen> user$ <command>ls -l bochs-1.2.1.tar.gz</command> -rw-rw-r-- 1 user user 887993 Sep 15 23:24 bochs-1.2.1.tar.gz user$ <command>gunzip -c bochs-1.2.1.tar.gz | tar -xvf -</command> bochs-1.2.1/ bochs-1.2.1/bios/ bochs-1.2.1/bios/BIOS-bochs-2-processors bochs-1.2.1/bios/Makefile.in . . . bochs-1.2.1/patches/NOTES bochs-1.2.1/patches/patch.4meg-pages bochs-1.2.1/patches/patch.goswin-changes user$ <command>cd bochs-1.2.1</command> user$ <command>./configure --enable-cdrom</command> creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes . . . creating misc/Makefile creating dynamic/Makefile creating fpu/Makefile creating config.h user$ <command>make</command> cd iodev && \ make CC="gcc" CXX="c++" CFLAGS="-g -O2 " CXXFLAGS="-g -O2 " LDFLAGS="" LIBS="" X_LIBS="-L/usr/X11R6/lib" X_PRE_LIBS="-lSM -lICE" prefix="/usr/local" exec_prefix="/usr/local" bindir="/usr/local/bin" infodir="" libiodev.a make[1]: Entering directory `/tmp/bochs-1.2.1/iodev' c++ -c -g -O2 -I.. -I../instrument/stubs devices.cc -o devices.o c++ -c -g -O2 -I.. -I../instrument/stubs pic.cc -o pic.o c++ -c -g -O2 -I.. -I../instrument/stubs pit.cc -o pit.o c++ -c -g -O2 -I.. -I../instrument/stubs unmapped.cc -o unmapped.o c++ -c -g -O2 -I.. -I../instrument/stubs cmos.cc -o cmos.o . . . echo done done c++ -o bochs -g -O2 main.o load32bitOShack.o state_file.o pc_system.o osdep.o \ iodev/libiodev.a \ cpu/libcpu.a memory/libmemory.a gui/libgui.a \ fpu/libfpu.a \ -L/usr/X11R6/lib -lSM -lICE -lX11 gcc -c -g -O2 -I. -Iinstrument/stubs misc/bximage.c -o misc/bximage.o c++ -o bximage -g -O2 misc/bximage.o user$ <command>su</command> root# <command>make install</command> cd iodev && \ make CC="gcc" CXX="c++" CFLAGS="-g -O2 " CXXFLAGS="-g -O2 " LDFLAGS="" LIBS="" X_LIBS="-L/usr/X11R6/lib" X_PRE_LIBS="-lSM -lICE" prefix="/usr/local" exec_prefix="/usr/local" bindir="/usr/local/bin" infodir="" libiodev.a make[1]: Entering directory `/tmp/bochs-1.2.1/iodev' . . . /usr/local/bochs/1.2.1/install-x11-fonts Looking for fonts to install... font/ Looking for X11 Font Path... /usr/lib/X11/fonts Installing vga.pcf... ok (it was already there) Running mkfontdir... Done installing Bochs fonts for X11. root# <command>exit</command> user$ _</screen></para></section> <!-- end of Transcript --><section id="compiling-win32"><title>Compiling on Win32 with Microsoft VC++</title><para>The standard compile uses the configure script, but the Windows platformcannot run the configure script natively.The current solution to this problem is that the Bochsconfigure script must be run on a different platform that does supportshell scripts, with options that cause it to configure for a Win32 platform instead of the native one. Many people have access to a UNIXmachine that could run the configure script, or you can use Cygwin torun the configure script<footnote><para>Because Bochs depends so much on the configure script, if you are doingmuch win32 Bochs development, you should consider downloading Cygwinso that you can run the configure step natively.</para></footnote>.</para><para>Download the Bochs sources on a machine that can run shell scripts.Edit the configure shortcut script <filename>.conf.win32-vcpp</filename>if you want to adjust configure options. Then type these commandsin the Bochs source directory:<screen> sh .conf.win32-vcpp make win32_snap</screen>These commands will run the configure step, produce VC++ makefiles and workspace files, and pack it all into a .zip file in the directory above thesource directory <footnote><para>If the source directory is <filename>/home/joe/bochs-win32</filename>, theresulting .zip file is in <filename>/home/joe/bochs-win32.zip</filename>.</para></footnote>. The .zip file is all ready to transfer to the target Windowsmachine to be unzipped and compiled. Or, if you run the sh/make steps inCygwin, you are already on the target machine so you don't need the .zipfile.</para><para>The following options are known to work in VC++, so they are enabled in the configure shortcut file:<screen> --enable-cdrom --enable-sb16=win --enable-ne2000 --enable-vbe</screen></para><para>When you have the Win32 sources transferred to a Windows machine with VC++,find the workspace file called <filename>bochs.dsw</filename> and load it inVC++. Choose <command>Project:Set Active Project</command> and be sure that"bochs" is selected. Then choose <command>Build:Build bochs.exe</command>.This will build all the required libraries (iodev, cpu, etc.) and theauxilliary programs <filename>bximage.exe</filename> and<filename>niclist.exe</filename>. Using workspaces is easy and intuitive, butthere is one caveat. The workspaces come directly out of a ZIP file in<filename>build/win32/workspace.zip</filename>, and they are not integratedwith configure. Some configure options such as --enable-debugger needadditional source files to be compiled, and for now you must add them to theVC++ workspace by hand. If you add configure options and have compileproblems, try the nmake method (below) instead. These problems may be fixedin future versions. </para><tip><para>To compile with the debugger enabled, add "--enable-debugger" to theconfigure line in <filename>.conf.win32-vcpp</filename> before running it.Then when you have loaded the workspace file, you must add the debug and disasmlibraries to the project dependency list. Choose<command>Project:Dependencies</command> and make sure that debug and disasm arechecked. Then build as usual.</para> </tip><para>An alternative way to compile is to run <filename>nmake.exe</filename> in anMS-DOS window. Instead of using the workspace files, nmake uses the Bochsmakefiles that are generated by configure. The workspace file is new inversion 1.3; before that, nmake was the only way to compile Bochs in VC++.If you are having trouble with the workspace, try the nmake compile instead.</para><para>The <command>make install</command> for Win32 is presently broken. In thefuture, a <command>make install</command> that runs in Cygwin may be provided.</para></section> <!-- end of Compiling:win32 --><section id="compile-cygwin"><title>Compiling on Win32 with Cygwin</title><para>Cygwin is a free Unix-like environment for Windows written bySteve Chamberlain and now maintained by RedHat, Inc. You can downloadit from <ulink url="http://www.cygwin.com">www.cygwin.com</ulink>. BecauseCygwin supports the configure script and uses GNU gcc/g++, you can use thestandard compile process. The configure script should automatically detectCygwin and add "-mno-cygwin -DWIN32" to the compiler options. You shouldget a working Bochs if you just type:<screen> configure make</screen>Optionally, you can use the configure shortcut script for Cygwin,<filename>.conf.win32-cygwin</filename>, instead of running configuredirectly. If this script is close to what you need, just edit the script andthen run it. To use the configure shortcut script and compile in Cygwin, thecommands are<screen> sh .conf.win32-cygwin make</screen>These options are known to work in Cygwin, so they are enabled in the configureshortcut file:<screen> --enable-cdrom --enable-sb16=win --enable-ne2000 --enable-vbe</screen></para></section> <!-- end of cygwin --><section><title>Compiling on MacOS 9 with CodeWarrior</title><para>It is possible that this hasn't been tried since 1999. In theory, you run<filename>sh .conf.macos</filename> on a Unix box to build the makefiles and headers, copy the whole thing over to a Mac, and thenuse CodeWarrior to compile. Since it hasn't been tested in so long,it is quite likely that some work is needed to bring the Mac port up to date.</para><para>If you are interested and have the required MacOS development tools, pleaselet use know. Someone requests a MacOS port almost once a month, but none ofthe developers know how to help them.</para></section><section><title>Compiling on MacOS X</title><para>The port to MacOS X with Carbon API by Emmanuel Mailliard is quite new, and theconfigure and makefile support was added by Bryce Denney. You will needthe compiler and libraries from the development tools CD. Bochs shouldconfigure and compile with the Carbon GUI if you simply type:<screen> configure make</screen>Optionally, you can use the configure shortcut script for MacOS X,<filename>.conf.macosx</filename>, instead of running configure directly.If this script is close to what you need, just edit the script and thenrun it. To use the configure shortcut script and compile, the commandsare<screen> sh .conf.macosx make</screen>MacOS X has a special format for an application bundle, which looks like adirectory that contains the required resource files and binaries. The Makefilecurrently creates this application bundle "by hand" using mkdir and copy, whichis surely the wrong way to do it. Bryce doesn't know the official way tocreate an application from a Makefile, so this hack will remain until a realMac developer helps to clean it up.</para><para>On MacOS X the default GUI is the Carbon interface, but you can also try otherBochs GUIs. Use --enable-x11 for X windows, --enable-rfb for VNC/RFB, or--enable-sdl for SDL.</para></section><section><title>Compiling on BeOS</title><para>Kevin Lawton ported Bochs to BeOS. Bernd Korz has taken over the port,and is working on raw cdrom and raw floppy support. As of Bochs 1.4, it shouldcompile if you just type "configure && make", because configure willdetect the BeOS platform and assume you want the BeOS GUI. Optionally,you can use the configure shortcut script for BeOS,<filename>.conf.beos-x86-R4</filename>.</para></section> <!-- end BeOS --><section><title>Compiling on Amiga/MorphOS</title><para>Nicholai Benalal created this port to MorphOS running on Amiga. It shouldcompile with <screen> configure && make</screen>If the platform is not detected properly, you might need to use--enable-amigaos as a configure option. Optionally, you can usethe configure shortcut script, <filename>.conf.amigaos</filename>.</para></section> <!-- end Amiga/MorphOS --><section><title>Compiling with the RFB interface</title><para>Don Becker's RFB interface allows you to view the Bochs display with theAT&T's <ulink url="http://www.uk.research.att.com/vnc/">VNC Viewer</ulink>.The protocol used between a VNC server and a VNC viewer is called RFB.Because the RFB code in Bochs is written with portable network socket and POSIXthread code, it can be compiled on many platforms. No additional librariesare required. To try it, type:<screen> configure --with-rfb make</screen></section><section><title>Compiling with the SDL interface</title><para>Dave Poirier has written an SDL interface for Bochs. Simple DirectMediaLayer, or SDL, is a cross-platform multimedia library distributed from<ulink url="http://libsdl.org">libsdl.org</ulink>. SDL supports Win32, Linux, IRIX, MacOS, MacOS X, BeOS, and AmigaOS.</para><para>To compile Bochs with the SDL interface you need to download the SDLdevelopment library. Either get the development library for your platform,or download the sources and compile it yourself. Then, go into the Bochs directory and type:<screen> configure --with-sdl make</screen></para><note><para>This has only been tested on Linux at the time this documentation was written.</para></note><para>To compile in Microsoft VC++, you have to configure on a different system.Here's the procedure:<screen>- On a machine that can run shell scripts, such as Cygwin, run configure --target=pentium-windows --with-sdl make win32_snap- Copy the resulting ZIP file to your Windows box and unzip it.- Load up workspace called bochs.dsw in VC++ 6.0- Double click "gui files"- Remove gui/win32.cpp from the project, and add gui/sdl.cpp instead.- Edit the settings of "gui files". Under C/C++ tab, category=preprocessor, additional include directories, add the directory where SDL/SDL.h can be found.- Edit the settings of the "bochs files" project. Under the Link tab, category=General, add SDL.lib to object/library modules list. Then in category=Input, add the path of SDL.lib to additional library path. Click ok.- Select Build:Build Bochs.exe</screen></para></section><section><title>Building an RPM on Linux</title><para>RPM stands for "RedHat Package Manager." An RPM is a compressed filecontaining files to be installed o
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -