阅读 126

wsl1(win10)中安装bochs

wsl中安装bochs

1 安装bochs

系统版本是ubuntu20.04 LTS

sudo apt-get install ‘bochs*‘

2 创建虚拟硬盘

bximage -mode="create" -hd=60M -imgmode="flat" -q hd60M.img

3 写配置文件

vim bochsrc

具体参照

4 windows10安装vcxsrv

在下载安装即可。安装完成后启动。

参考:

5 wsl中环境变量设置

 export DISPLAY=:0 # in WSL 1
 export LIBGL_ALWAYS_INDIRECT=1

使用bochs

cd your_dir
bochs -f bochsrc

参考:

6 处理报错

======================================================================== 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 0x7fffeea6d830 00000000000i[PLUGIN] loaded plugin libbx_unmapped.so 00000000000i[ ] lt_dlhandle is 0x7fffeea6ee50 00000000000i[PLUGIN] loaded plugin libbx_biosdev.so 00000000000i[ ] lt_dlhandle is 0x7fffeea70650 00000000000i[PLUGIN] loaded plugin libbx_speaker.so 00000000000i[ ] lt_dlhandle is 0x7fffeea723d0 00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so 00000000000i[ ] lt_dlhandle is 0x7fffeea72ba0 00000000000i[PLUGIN] loaded plugin libbx_parallel.so 00000000000i[ ] lt_dlhandle is 0x7fffeea74800 00000000000i[PLUGIN] loaded plugin libbx_serial.so 00000000000i[ ] lt_dlhandle is 0x7fffeea78c00 00000000000i[PLUGIN] loaded plugin libbx_gameport.so 00000000000i[ ] lt_dlhandle is 0x7fffeea79430 00000000000i[PLUGIN] loaded plugin libbx_iodebug.so 00000000000i[ ] reading configuration from bochsrc 00000000000i[ ] lt_dlhandle is 0x7fffeea79e60 00000000000i[PLUGIN] loaded plugin libbx_x.so 00000000000i[ ] installing x module as the Bochs GUI 00000000000i[ ] using log file bochsout.txt shared memfd open() failed: Function not implemented ALSA lib confmisc.c:767:(parse_card) cannot find card ‘0‘ ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default *** buffer overflow detected ***: terminated Aborted (core dumped)

设置:export LIBGL_ALWAYS_INDIRECT=1 即可
具体可以参考

原文:https://www.cnblogs.com/lyg-blog/p/14641562.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐