我想从终端中的终端打开 Bochs 模拟器,因为我在命令行环境中工作并且无法使用 GUI。
我编写了一个 .bochsrc 配置文件来使用,但它不起作用。这是文件现在的样子:
display_library: nogui
floppya: type=1_2, 1_2="bootloader.flp", status=inserted
我尝试了一些不起作用的选项,例如
display_library: text
,然后我用谷歌搜索.bochsrc文件并在https://github.com/lubomyr/bochs/blob/master/.bochsrc找到了这个文件,其中有很多注释文档,我使用了显示库选项nogui
,但它仍然给了我同样的错误:
========================================================================
Bochs x86 Emulator 2.6.11
Built from SVN snapshot on January 5, 2020
Timestamp: Sun Jan 5 08:36:00 CET 2020
========================================================================
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[ ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[ ] lt_dlhandle is 0x55a710930870
00000000000i[PLUGIN] loaded plugin libbx_unmapped.so
00000000000i[ ] lt_dlhandle is 0x55a710931890
00000000000i[PLUGIN] loaded plugin libbx_biosdev.so
00000000000i[ ] lt_dlhandle is 0x55a710932230
00000000000i[PLUGIN] loaded plugin libbx_speaker.so
00000000000i[ ] lt_dlhandle is 0x55a710933fb0
00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so
00000000000i[ ] lt_dlhandle is 0x55a710934780
00000000000i[PLUGIN] loaded plugin libbx_parallel.so
00000000000i[ ] lt_dlhandle is 0x55a7109363e0
00000000000i[PLUGIN] loaded plugin libbx_serial.so
00000000000i[ ] lt_dlhandle is 0x55a71093a7e0
00000000000i[PLUGIN] loaded plugin libbx_gameport.so
00000000000i[ ] lt_dlhandle is 0x55a71093b010
00000000000i[PLUGIN] loaded plugin libbx_iodebug.so
00000000000i[ ] reading configuration from .bochsrc
00000000000p[ ] >>PANIC<< .bochsrc:1: display library 'nogui' not available
00000000000e[SIM ] notify called, but no bxevent_callback function is registered
00000000000e[SIM ] notify called, but no bxevent_callback function is registered
========================================================================
Bochs is exiting with the following message:
[ ] .bochsrc:1: display library 'nogui' not available
========================================================================
00000000000i[SIM ] quit_sim called with exit code 1
我还搜索了教程,看到有人通过命令
sudo apt-get install bochs-sdl
安装了bochs-sdl,并且知道sdl和nogui都被列为选项,我尝试下载可能丢失的特定包bochs-nogui
,但没有具有该名称的包。作为参考,我通过执行 sudo apt-get install bochs
安装了 bochs。
编辑: 我查看了 bochs 的命令行配置界面和 github 文件,还有另一个名为
term
的文本选项,但是当我尝试该选项时,它说打开术语模块失败并且未找到它。
========================================================================
Bochs x86 Emulator 2.6.11
Built from SVN snapshot on January 5, 2020
Timestamp: Sun Jan 5 08:36:00 CET 2020
========================================================================
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[ ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[ ] lt_dlhandle is 0x560ebc18b870
00000000000i[PLUGIN] loaded plugin libbx_unmapped.so
00000000000i[ ] lt_dlhandle is 0x560ebc18c890
00000000000i[PLUGIN] loaded plugin libbx_biosdev.so
00000000000i[ ] lt_dlhandle is 0x560ebc18d230
00000000000i[PLUGIN] loaded plugin libbx_speaker.so
00000000000i[ ] lt_dlhandle is 0x560ebc18efb0
00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so
00000000000i[ ] lt_dlhandle is 0x560ebc18f780
00000000000i[PLUGIN] loaded plugin libbx_parallel.so
00000000000i[ ] lt_dlhandle is 0x560ebc1913e0
00000000000i[PLUGIN] loaded plugin libbx_serial.so
00000000000i[ ] lt_dlhandle is 0x560ebc1957e0
00000000000i[PLUGIN] loaded plugin libbx_gameport.so
00000000000i[ ] lt_dlhandle is 0x560ebc196010
00000000000i[PLUGIN] loaded plugin libbx_iodebug.so
00000000000i[ ] reading configuration from .bochsrc
00000000000i[ ] lt_dlhandle is (nil)
00000000000p[ ] >>PANIC<< dlopen failed for module 'term' (libbx_term.so): file not found
========================================================================
Event type: PANIC
Device: [ ]
Message: dlopen failed for module 'term' (libbx_term.so): file not found
A PANIC has occurred. Do you want to:
cont - continue execution
alwayscont - continue execution, and don't ask again.
This affects only PANIC events from device [ ]
die - stop execution now
abort - dump core
debug - continue and return to bochs debugger
Choose one of the actions above: [die]
========================================================================
Bochs is exiting with the following message:
[ ] dlopen failed for module 'term' (libbx_term.so): file not found
========================================================================
00000000000i[SIM ] quit_sim called with exit code 1
万一您可以让它工作并启动它,无论如何,Bochs for linux 不能很好地模拟和运行您的代码。 相反,我在 WINE 下使用 Bochs for Windows,并且我的代码运行得很好。 在命令行环境中,您可以安装 xorg、wine、winetricks。
然后启动xserver:
$ 执行startx
会出现三个窗口,您可以选择对任何一个进行操作,但不要关闭其他窗口。
然后配置wine。我总是模拟默认的“win7”
$ winecfg
您可以尝试启动“记事本”:
$ 葡萄酒记事本
如果没问题,请安装 Windows 版的 Bochs:
$ wine“/home/您的用户/Downloads/Bochs-win32-2.6.11.exe”
最后你可以启动“bochs.exe”:
$ wine“/home/ave/.wine/drive_c/Program Files (x86)/Bochs-2.6.11/bochs.exe”
引号是必要的。您可以将此命令行放在脚本文件(xx.sh)中
选择“编辑选项”并即时编辑每个选项。 “磁盘和启动”至少是必要的。然后按开始,瞧。
我是 100% Debian 用户 GUI,但我昨天在 ArchLinux 纯命令行环境上尝试过,并且工作正常。
如果您选择加载“配置文件”可能不起作用。我总是从向导菜单模拟编辑。