bochs用户手册-2-发行说明 3-安装

2、发行说明

The change log is stored in the Bochs source code in a file called CHANGES. Click here to see the latest version of the CHANGES file.

更改日志存储在Bochs源代码中名为CHANGES的文件中。单击此处查看CHANGES文件的最新版本。


The link above is provided by Source Forge and might change one day. If it stops working, you can download the current source code with SVN and read the CHANGES file there.

以上链接由Source Forge提供,可能有一天会更改。如果它停止工作,您可以使用SVN下载当前源代码,并在那里读取CHANGES文件。

3、安装

3.1. Downloading Bochs 下载Bochs

You can download Bochs from our web site at bochs.sourceforge.net. First, you need to choose what version to get: a recent release or a development version. If you trying to get things working for the first time, a release version is recommended since it has been tested the most. The development versions (sometimes called SVN snapshots) may have some newer bug fixes and new features, but have not been tested as much as the releases.

\qquad 您可以从我们的网站“https://bochs.sourceforge.io”直接下载页面下载Bochs。首先,您需要选择要获得的版本:最新版本或开发版本。如果你第一次尝试让事情正常运行,建议使用发布版本,因为它经过了最多的测试。开发版本(有时称为SVN快照)可能有一些较新的错误修复和新功能,但尚未像发布版本那样经过测试。


Second, you can choose to compile Bochs from source code or install a binary (if one is available for your platform). Binary packages will be quicker to install, and most include a small demo of a guest operating system called DLX Linux to get you started. However, some features can only be enabled if you compile Bochs yourself, for example the Bochs debugger. For multiuser systems, you will probably need system administrator privileges (root) to install a binary package. If you decide to get a binary, download it to your hard disk, uncompress it, then go to the section called Installing a Binary for more information.

\qquad 其次,您可以选择从源代码编译Bochs(这在3.4编译章节介绍)或安装二进制文件(如果您的平台上有可用的二进制文件)。二进制软件包安装起来会更快,大多数软件包都包括一个名为DLX Linux的客户操作系统的小演示,让您开始使用。但是,==某些功能只有在您自己编译Bochs时才能启用,例如Bochs调试器。==对于多用户系统,您可能需要系统管理员权限(root)才能安装二进制软件包。如果您决定获取二进制文件,请将其下载到硬盘,解压缩,然后转到名为“安装二进制文件”的部分以获取更多信息。


If you are going to compile Bochs yourself, you need the gzipped tarball containing the source code, called bochs-version.tar.gz. For Windows and Mac, the prebuilt Makefiles are separate, so also get the Makefiles for your platform. To unpack a compressed TAR file[1] on a Unix machine[2] , type

\qquad 如果你要自己编译Bochs,你需要包含源代码的gzip tarball,称为Bochs-version.tar.gz。如下:

在这里插入图片描述
对于Windows和Mac,预构建的Makefile是分开的,所以也要为你的平台获取Makefile。
\qquad 要在Unix机器[2]上解压缩压缩的TAR文件[1],请键入:

gunzip -c bochs-version.tar.gz | tar -xvf -


This creates a directory called bochs-version full of files. This directory will be referred to as $BOCHS. Go into $BOCHS and you are ready to compile. Instructions for compiling Bochs are in the section, Compiling Bochs.

\qquad 这将创建一个名为bochs版本的目录,该目录包含完整的文件。此目录将被称为 B O C H S 。进入 BOCHS。进入 BOCHS。进入BOCHS,您就可以进行编译了。编译Bochs的说明见编译Bochs一节。


Alternatively, you can also obtain the sources for any Bochs version using SVN. See the SVN instructions for details.

或者,您也可以使用SVN获取任何Bochs版本的源代码。有关详细信息,请参阅SVN说明。

注意事项:
[1]
A TAR file is a single file that contains many files packed inside. Bochs TAR files are compressed with a program called gzip, and another program called gunzip is used to uncompress them.

TAR文件是一个包含多个文件的单个文件。Bochs TAR文件是用一个名为gzip的程序压缩的,另一个称为gunzip的程序用于解压缩它们。

[2]
On Windows, look for software called WinZip to unpack the TAR.

在Windows上,查找名为WinZip的软件来解压缩TAR。

3.1.1 几个下载文件的解释*

在这里插入图片描述
Bochs-win64-2.7.exe
Bochs-win64-2.7.exe 是一个 Windows 可执行文件,包含 Bochs 2.7 版本的 64 位二进制发行版。
这是一个独立的安装程序,双击即可在 Windows 安装和运行 Bochs。

bochs-2.7-msvc-src.zip
msvc 是 Microsoft Visual C++ 的缩写,表示这个源码包里包含的是为 Visual Studio 编译器准备的项目文件和解决方案。
这个源码包可以在 Windows 平台上使用 Visual Studio 打开和编译。

** bochs-2.7-tar.gz**
如果您要在 macOS 或 Linux 上编译 Bochs,应该选择标准源码压缩包 bochs-2.7.tar.gz。

bochs-2.7-1.x86_64.rpm
RPM 代表 RPM Package Manager,这是 Red Hat 开发的软件包管理系统。RPM 软件包广泛应用于 Red Hat 系 Linux 发行版,如 Red Hat Enterprise Linux、Fedora、CentOS 等。所以,bochs-2.7-1.x86_64.rpm 这个软件包适用于:

  • 64 位的 x86 平台(x64 或 amd64)
  • Red Hat 系 Linux 发行版

bochs-2.7-1.src.rpm
bochs-2.7-1.src.rpm 是一个源码 RPM 软件包,包含 Bochs 2.7 版本的源代码。与 bochs-2.7-1.x86_64.rpm 二进制 RPM 包不同,这个源码 RPM 包仅包含源代码,需要您自己进行编译。这个源码 RPM 包需要更高的技能,需要理解 RPM 系统并且会使用 rpmbuild 进行源码编译。但它提供最大的灵活性,您可以根据需要调整编译参数和配置。

3.2. Tracking the source code with SVN 使用SVN跟踪源代码

SVN (Subversion) is a tool used by many software developers to manage changes within their source code tree. SVN provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. Use of SVN is particularly common on projects with multiple developers, since SVN ensures changes made by one developer are not accidentally removed when another developer posts their changes to the source tree. The Bochs source code and documentation are available using SVN[1].

\qquad SVN(Subversion)是许多软件开发人员用来管理源代码树中的更改的工具。SVN不仅可以存储一段源代码的当前版本,还可以存储该源代码发生的所有更改(以及谁进行了这些更改)的记录。在有多个开发人员的项目中,SVN的使用尤其常见,因为SVN确保当另一个开发人员将其更改发布到源树时,一个开发员所做的更改不会被意外删除。Bochs源代码和文档可使用SVN[1]获得。

3.2.1. Checking out Bochs 检查Bochs

When you have SVN installed, the first step is to do a checkout. The initial checkout command is long and ugly, but usually you only have to do it once. The example below shows the SVN checkout process of the Bochs trunk in Unix. On the Windows platform, you can download a SVN client from subversion.apache.org, or use SVN within Cygwin[2].

\qquad 安装SVN后,第一步是进行checkout。最初的checkout命令又长又难看,但通常只需要执行一次。下面的示例显示了Unix中Bochs中继的SVN checkout过程。在Windows平台上,您可以从subversion.apache.org下载SVN客户端,或者在Cygwin[2]中使用SVN。

图3-1 查看SVN中的Bochs
在这里插入图片描述
Note: This is just an example output of a checkout of specific version of the Bochs trunk and folder. Depending on the checkout command and revision, you most likely will see more/other files.

注意:
\qquad 这只是特定版本的Bochs主干和文件夹的一个示例输出。根据签出命令和修订,您很可能会看到更多/其他文件。


Tip: If you have write access to the Bochs SVN tree, see the Developers Guide [3] for details.
提示:
\qquad 如果您有对Bochs SVN树的写访问权限,请参阅开发者指南[3]了解详细信息。


The SVN checkout process (above) gives you a directory called bochs that contains the very latest source code. I will refer to this directory as $BOCHS. In this directory there’s also a subdirectory called “.svn” which tells the SVN software where the code was checked out, what version you have, and where to go for future updates.

\qquad SVN签出过程(如上)为您提供了一个名为bochs的目录,其中包含最新的源代码。我将把这个目录称为$BOCHS。在这个目录中还有一个名为“.svn”的子目录,它告诉svn软件代码在哪里签出,您的版本是什么,以及在哪里进行未来的更新。

3.2.2. Getting the Latest Version 获取最新版本

Most developers use SVN to always give them the latest source code. The minute that any developer checks in a change, they are available to everyone else through SVN. You just have to type svn update in the $BOCHS directory, and SVN will retrieve any files and directories that have been changed since you did a checkout. If you update regularly, each update takes a short time because it downloads only the files that changed. See also Getting a release version.

\qquad 大多数开发人员使用SVN总是为他们提供最新的源代码。任何开发人员在签入更改的那一刻,其他人都可以通过SVN使用这些更改。您只需在$BOCHS目录中键入svn-update,svn就会检索自您签出后更改的任何文件和目录。如果定期更新,每次更新都会花费很短的时间,因为它只下载更改后的文件。另请参阅获取发布版本。


The svn update command tells you if any new files have been downloaded from the server, and it also tells you if you have modified any of the SVN-controlled files. As it checks through the source directories, it will list files that have changed, with a single letter before the name that tells the status of that file. The most common status letters are listed below.

\qquad svn update命令告诉您是否从服务器下载了任何新文件,它还告诉您是否修改了任何svn控制的文件。当它检查源目录时,它将列出已更改的文件,在名称之前用一个字母表示告诉的状态。下面列出了最常见的状态字母。

表3-1 SVN更新中的状态字母

LetterMeaningDescription
?unknown此文件在您的bochs目录中,但SVN对此一无所知。例如,当您编译bochs时,在构建过程中创建的任何文件都显示为?。
UupdateSVN下载了该文件的新版本,因为它在服务器上发生了更改,通常是因为其他人进行了签入。
AaddedSVN从服务器下载了一个新添加的文件。
Ddeleted此文件已在服务器上删除,SVN已将其从本地副本中删除。
Cconflict您已经更改了磁盘上的此文件,但此更改与签入的更改相冲突。当两个人以不同的方式更改同一行代码时,会发生冲突。您需要编辑冲突的文件并手动清理。或者,有时最简单的方法是删除冲突的文件并再次运行svn更新,从而放弃自己的编辑并下载新的副本。

3.2.3. Getting a Release Version 获取发布版本

You can also use the SVN checkout command to get the Bochs source code for any release since March 2000. The command is
\qquad 您还可以使用SVN checkout命令来获取自2000年3月以来任何版本的Bochs源代码。命令是

user$ svn co http://svn.code.sf.net/p/bochs/code/tags/tagname/bochs bochs

tagname 告诉您想要哪个版本,它可以是以下之一:
表3-2 Bochs发布标签
在这里插入图片描述

3.2.4. More about SVN 关于SVN的更多信息

Entire books have been written on SVN, so there’s no sense in duplicating it all here in the Bochs documentation. Some sources of additional information are listed below.

\qquad 整本书都是在SVN上写的,所以在Bochs文档中复制所有内容是没有意义的。以下列出了一些附加信息来源。

The subversion.apache.org site has tons of SVN FAQs and documentation.

subversion.apache.org网站有大量的SVN常见问题解答和文档。

Notes
[1]
You can download SVN software and documentation from subversion.apache.org.
您可以从subversion.apache.org下载SVN软件和文档。

[2]
Cygwin is an open source Unix-like environment for Windows platforms, available at www.cygwin.com.
Cygwin是一个适用于Windows平台的类似Unix的开源环境,可在www.Cygwin.com上找到。

[3]
See the Developers Guide and/or look at SourceForge’s Subversion documentation, for instructions.
有关说明,请参阅开发人员指南和/或 查看SourceForge的Subversion文档。


3.3. Installing a Binary

本节按平台划分,因为在不同的平台上安装二进制包是不同的。

3.3.1. Windows

The Bochs binaries for Windows are distributed in an EXE installer package. The Bochs installer can be started like any other Windows program and it brings up the installation wizard. Here you can select the destination folder and the installation options. The wizard installs the files and creates the registry keys, start menu and desktop links.

\qquad 用于Windows的Bochs二进制文件以EXE安装程序包的形式分发。Bochs安装程序可以像任何其他Windows程序一样启动,它会打开安装向导。您可以在此处选择目标文件夹和安装选项。向导安装文件并创建注册表项、开始菜单和桌面链接。如下:
在这里插入图片描述


Previous releases of Bochs were distributed as ZIP packages, too. These packages contained the same set of files as the installer package from the same version.

\qquad 以前发布的Bochs也以ZIP包的形式分发。这些程序包包含与同一版本的安装程序包相同的一组文件。


If you are new to Bochs you should try out the DLX Linux demo distributed with Bochs. The installation wizard has created a link on the desktop if you decided to install the demo. If you doubleclick the icon two windows will appear: one is the Bochs Display window, and the other is text window that is used for the runtime configuration and for log messages if no logfile is specified.You can find more information on the DLX Linux demo in the next section below the DLX Linux screenshot.

\qquad 如果你是Bochs的新手,你应该尝试一下与Bochs一起分发的DLX Linux演示。如果您决定安装演示,安装向导会在桌面上创建一个链接。如果双击图标,将出现两个窗口:一个是Bochs Display窗口,另一个是文本窗口,用于运行时配置和日志消息(如果未指定日志文件)。您可以在DLX Linux屏幕截图下面的下一节中找到有关DLX Linux演示的更多信息。

表3-3。Bochs目录中的文件(Windows版本)

在这里插入图片描述

3.3.2. Linux RPM

RPM stands for “RedHat Package Manager.” An RPM is a compressed file containing files to be installed on your system. Many Linux distributions, not just RedHat ones, can install files from an RPM. First, download the Bochs RPM for your architecture to your computer. For example, if you have an Intel-compatible computer, be sure to get the RPM that says “for Linux x86 distributions” or “i386”. Once you have the package on your local disk, you should become the root user and install it as follows[1]:

\qquad RPM代表“RedHat软件包管理器”。RPM是一个压缩文件,包含要安装在系统上的文件。许多Linux发行版,不仅仅是RedHat发行版,都可以从RPM安装文件。首先,将适用于您的体系结构的Bochs RPM下载到您的计算机上。例如,如果你有一台与英特尔兼容的计算机,一定要得到RPM,上面写着“适用于Linux x86发行版”或“i386”。如下:
在这里插入图片描述

一旦您在本地磁盘上安装了该软件包,您就应该成为根用户,并按如下方式安装它[1]:

图3-2。在Linux中安装RPM
在这里插入图片描述

All RPM installations are done as the root user because they require permission to update system files and directories. If you do not have root access you need to compile Bochs in your home directory.

\qquad 所有RPM安装都是以root用户身份完成的,因为它们需要更新系统文件和目录的权限。如果您没有root访问权限,则需要在主目录中编译Bochs。


RPM installation can fail for a few reasons. It will fail if you already have a Bochs package installed. In this case, try upgrading the old package to the new package with rpm --upgrade NAME.i386.rpm. Another potential problem is missing RPM dependencies. If you are getting errors about missing files or RPMs, then first you should try to install the RPMs that provide the missing pieces. If that cannot be done, download the source RPM and build a new binary RPM that is appropriate for your platform. The command is rpmbuild --rebuild NAME.src.rpm. As a last resort, you can run rpm with the --nodeps option to ignore dependencies and install it anyway, but if it is missing important pieces it may not run properly.

\qquad RPM安装可能由于以下几个原因而失败。如果您已经安装了Bochs软件包,它将失败。在这种情况下,请尝试使用rpm将旧包升级到新包–升级NAME.i386.rpm。另一个潜在问题是缺少rpm依赖项。如果您收到关于丢失文件或RPM的错误,那么首先您应该尝试安装提供丢失部分的RPM。如果无法做到这一点,请下载源RPM并构建适合您的平台的新二进制RPM。命令是rpmbuild–rebuild NAME.src.rpm。最后,您可以使用–nodeps选项运行rpm来忽略依赖项并安装它,但如果它缺少重要部分,它可能无法正常运行。


The Bochs RPM installs five new commands and associated manual pages: bochs, bochs-dlx and bximage. First, let’s try out the DLX Linux demo by typing bochs-dlx.

\qquad Bochs RPM安装五个新命令和相关的手动页面:Bochs、Bochs dlx和bximage。首先,让我们通过键入bochs-DLX来尝试DLXLinux演示。

在这里插入图片描述

Then you get a new X11 window containing the VGA display of the simulated machine. First you see the VGA BIOS screen, then Linux uncompresses and boots, and you get a login prompt. Type “root” and ENTER to log in to DLX linux.

\qquad 然后你会得到一个新的X11窗口,其中包含模拟机器的VGA显示屏。首先您会看到VGA BIOS屏幕,然后Linux解压缩并引导,然后您会得到登录提示。键入“root”并按ENTER键登录DLX-linux。

图3-3。运行DLX Linux的Bochs屏幕截图

Booting is complete when you see “dlx login:” and a cursor. At this login prompt, type “root”. On UNIX systems, root is the system admin user. There is no password for root on this sample disk image, so it lets you log in without typing any password. Now you should see a UNIX prompt, and you can begin to type UNIX commands.

\qquad 当您看到“dlx-login:”和一个光标时,启动就完成了。在登录提示下,键入“root”。在UNIX系统上,root是系统管理员用户。此示例磁盘映像上没有root用户的密码,因此您可以在不键入任何密码的情况下登录。现在您应该看到一个UNIX提示,并且可以开始键入UNIX命令。

When you get tired of playing with DLX Linux, just type “reboot” in the Bochs window to shut down the DLX Linux operating system, and when it starts to reboot again press the “Power” button at the top of the Bochs display to end the application.

\qquad 当你厌倦了玩DLX Linux时,只需在Bochs窗口中键入“reboot”即可关闭DLX Linux操作系统,当它再次开始重新启动时,按下Bochs显示屏顶部的“Power”按钮即可结束应用程序。

以下是RPM安装的文件列表,以及每个文件的简要说明。

表3-4。RPM包中的文件

3.3.3. MacOS X DMG

(现在是2023年,如果你的macOS是最新的,那么你可以不看下面这些老的安装过程。而直接在macOS下,用 brew install bochs直接安装发行版)

这是Aard Vark于2003年1月提供的

The MacOS X binary distribution is a mountable disk image (.dmg file). Once you’ve downloaded the binary distribution file, just double click on it to automatically unpack the archive and mount the volume on the desktop. An icon will appear exactly as if you’d inserted a CD-ROM or removable storage device, and a finder window containing the volume should automatically open. It is likely to have an odd name such as _dmg_top, but don’t worry about that.

\qquad MacOS X二进制发行版是一个可安装的磁盘映像(.dmg文件)。下载二进制分发文件后,只需双击它即可自动解压缩归档文件并将卷装载到桌面上。一个图标会出现,就像你插入了CD-ROM或可移动存储设备一样,并且包含该卷的查找窗口会自动打开。它可能有一个奇怪的名称,比如_dmg_top,但不要担心。


Copy the Bochs-2.0 (or whatever version) folder from the disk image onto your hard disk. Either Home or Applications would be sensible places to put it. Because the disk image is mounted read only, you can’t run the included dlxlinux guest OS until you’ve copied it to the hard disk.

\qquad 将Bochs-2.0(或任何版本)文件夹从磁盘映像复制到硬盘上。Home或Applications都是放置它的合适位置。因为磁盘映像是只读安装的,所以在将其复制到硬盘之前,您无法运行附带的dlxlinux来宾操作系统。


Once you’ve installed the binaries, it’s probably a good idea to drag the _dmg_top volume to trash to unmount it, so you don’t get confused and try to run bochs from there. Then open the bochs folder from wherever you installed it.

\qquad 一旦安装了二进制文件,最好将_dmg_top卷拖到垃圾桶中卸载,这样您就不会感到困惑,并尝试从那里运行bochs。然后从您安装的任何位置打开bochs文件夹。


The MacOS X version of bochs requires a terminal window to run. If you just double click on the Bochs icon, you’ll get an error message telling you to double click on “bochs.scpt” to start Bochs in a new terminal window. You’ll need to configure Bochs before you will get very far with the bochs.scpt in the top folder, so to try out bochs open the dlxlinux folder and double click on the bochs.scpt icon inside.

\qquad MacOS X版本的bochs需要一个终端窗口才能运行。如果你只需双击Bochs图标,就会收到一条错误消息,告诉你双击“Bochs.scpt”在新的终端窗口中启动Bochs。在使用顶部文件夹中的Bochs.scpt之前,您需要配置Bochs,因此要尝试Bochs,请打开dlxlinux文件夹,双击其中的Bochs.cpt图标。

This will open a new terminal window which will contain the Bochs startup messages, and a configuration menu. The default option is [5], which starts the simulation, so press enter to do so. You will then get a new window containing the VGA display of the simulated machine. The new window will probably appear behind the current terminal window, so either click on the bochs icon in the dock or the simulation window to bring it to the front. If you’re quick enough you’ll then see the VGA BIOS screen, then Linux uncompresses and boots, and you get a login prompt. Type “root” and ENTER to log in to DLX Linux.

\qquad 这将打开一个新的终端窗口,其中包含Bochs启动消息和配置菜单。默认选项是[5],它会启动模拟,所以按enter键可以这样做。然后你会看到一个新的窗口,其中包含模拟机器的VGA显示屏。新窗口可能会出现在当前终端窗口的后面,因此单击dock中的bochs图标或模拟窗口将其置于前面。如果你足够快,你会看到VGA BIOS屏幕,然后Linux解压缩并引导,然后你会得到登录提示。键入“root”并按ENTER键登录DLX Linux。


Once you’ve finished playing with DLX Linux, just type “reboot” in the Bochs window to shut down the DLX Linux operating system, and when it starts to reboot again press the “Power” button in the “MacBochs Hardware Controls” window (it’s the circle containing a vertical bar at the far right - have a look at the Linux screenshots, since the Mac version doesn’t seem to have descriptions or tool-tips).

\qquad 一旦你玩完DLX Linux,只需在Bochs窗口中键入“reboot”即可关闭DLX Linux操作系统,当它再次启动时,请按“MacBochs硬件控制”窗口中的“电源”按钮(它是一个包含竖线的圆圈,位于在最右边,请查看Linux屏幕截图,因为Mac版本似乎没有描述或工具提示)。
Notes:
[1]
Many distributions have their own RPM installer program, often graphical, and they should work ok. It is helpful to be able to see the text output from RPM, so if you use a fancy RPM installer, be sure to find the text output and check that it looks correct.
\qquad 许多发行版都有自己的RPM安装程序,通常是图形化的,它们应该可以正常工作。能够看到RPM的文本输出是很有帮助的,所以如果你使用一个花哨的RPM安装器,一定要找到文本输出并检查它是否正确。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值