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

具體參照bochs的安裝和配置

4 windows10安裝vcxsrv

官網下載安裝即可。安裝完成后啟動。

參考:win10+WSL+安裝VcXsrv Windows X Server

5 wsl中環境變量設置

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

使用bochs

cd your_dir
bochs -f bochsrc

參考:wsl wiki

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 即可
具體可以參考What does LIBGL_ALWAYS_INDIRECT=1 actually do?


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM