日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

在gem5的full system下运行 x86编译的测试程序 running gem5 on ubuntu in full system mode in x86...

發布時間:2024/4/15 Ubuntu 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在gem5的full system下运行 x86编译的测试程序 running gem5 on ubuntu in full system mode in x86... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

背景

上篇博客寫了如何在gem5的full system模式運行alpha的指令編譯的程序,這篇博客講述如何在gem5的full system模式運行x86指令集編譯的程序,這兩種方式非常類似。

?

首先需要安裝gem5-stable,可以參考我前面的一篇博客:

http://blog.csdn.net/wyj7260/article/details/8267345

?

這篇文章介紹full system ?in ?x86。

安裝過程:

下載full system需要的兩個包:

首先在安裝好gem5-stable之后,再到官網下載full system需要的包:

Full System Files : http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2

Config files : http://www.m5sim.org/dist/current/x86/config-x86.tar.bz2

安裝:記我的gem5-stable安裝目錄為$GEM

a)??????~/gem5-stable$? mkdir x86Dist

b)??????將包x86-system.tar.bz2和config-x86.tar.bz2復制到x86Dist目錄下

b) ~/gem5-stable$ cd x86Dist/

c) ~/gem5-stable/x86Dist$ ?tar -xvf x86-system.tar.bz2

把exceptKeyError:

? path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system

修改成

except KeyError:

path = [ '/dist/m5/system', ' /home/wyj2/gem5-stable/x86Dist' ]

運行(運行過程中遇到的error以及解決方法)

1、? 首先編譯gem5.opt

~/gem5-stable $ scons ./build/x86/gem5.opt

2、運行模擬的linux系統

~/gem5-stable$ ./build/X86/gem5.opt ./configs/example/fs.py

報錯如下:

gem5 Simulator System.?http://gem5.org

gem5 is copyrighted software; use the --copyright option for details.

?

gem5 compiled Jul 12 2013 21:30:39

gem5 started Jul 12 2013 21:33:06

gem5 executing on arch-node3

command line: ./build/X86/gem5.opt ./configs/example/fs.py

warning: add_child('terminal'): child 'terminal' already has parent

Global frequency set at 1000000000000 ticks per second

info: No kernel set for full system simulation. Assuming you know whatyou're doing if not SPARC ISA

????? 0: rtc: Real-time clock setto Sun Jan? 1 00:00:00 2012

panic: Error opening /home/wyj/gem5-stable/x86Dist/disks/x86root.img

?@ cycle 0

[open:build/X86/dev/disk_image.cc, line 79]

Memory Usage: 225092 KBytes

Program aborted at cycle 0

Aborted (core dumped)

?

?

解決方法:

提示不能打開x86root.img,于是我查找x86root.img

命令:~/gem5-stable$ grep -r"x86root.img" ./

得到如下:

./configs/common/Benchmarks.py:??????????? return env.get('LINUX_IMAGE',disk('x86root.img'))

如實修改Benchmarks.py, 把return env.get('LINUX_IMAGE',disk('x86root.img'))改成

return env.get('LINUX_IMAGE', disk('linux-x86.img'))

?

然后執行:

~/gem5-stable$ ./build/X86/gem5.opt ./configs/example/fs.py

gem5 Simulator System.?http://gem5.org

gem5 is copyrighted software; use the --copyright option for details.

?

gem5 compiled Jul? 2 201310:06:26

gem5 started Jul 13 2013 18:13:18

gem5 executing on jsi-desktop

command line: ./build/X86/gem5.opt ./configs/example/fs.py

warn: add_child('terminal'): child 'terminal' already has parent

Global frequency set at 1000000000000 ticks per second

info: No kernel set for full system simulation. Assuming you know whatyou're doing

????? 0: rtc: Real-time clock setto Sun Jan? 1 00:00:00 2012

panic: Error opening/home/wyj2/gem5-stable/x86Dist/disks/linux-bigswap2.img

?@ cycle 0

[open:build/X86/dev/disk_image.cc, line 79]

Memory Usage: 177860 KBytes

Program aborted at cycle 0

Aborted

?

缺少linux-bigswap2.img文件,秩序要將alpha的full system下載的包Full System Files解壓后的linux-bigswap2.img拷貝到目錄/home/wyj2/gem5-stable/x86Dist/disks/就行。

full system Files下載地址http://www.m5sim.org/dist/current/m5_system_2.0b3.tar.bz2解壓也可得)

?

運行

~/gem5-stable$ ./build/X86/gem5.opt ./configs/example/fs.py

仍然報錯

gem5 Simulator System.? http://gem5.org

gem5 is copyrighted software; use the --copyright option for details.

?

gem5 compiled Jul? 2 201310:06:26

gem5 started Jul 13 2013 18:18:48

gem5 executing on jsi-desktop

command line: ./build/X86/gem5.opt ./configs/example/fs.py

warn: add_child('terminal'): child 'terminal' already has parent

Global frequency set at 1000000000000 ticks per second

info: No kernel set for full system simulation. Assuming you know whatyou're doing

????? 0: rtc: Real-time clock setto Sun Jan? 1 00:00:00 2012

Listening for com_1 connection on port 3456

warn: Reading current count from inactive timer.

0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000

fatal: No kernel to load.@ cycle 0

[initState:build/X86/arch/x86/system.cc, line 118]

Memory Usage: 177868 KBytes

?

?

這是因為運行時需要制定kernel:

運行命令為:

./build/X86/gem5.opt ./configs/example/fs.py --kernel=x86_64-vmlinux-2.6.22.9.smp

注意:此處不用制定.smp文件的路徑,只用文件名就行

?

?

剩下的mount文件到模擬的系統同上一篇關于alphafull system

?

?

?

?

參考鏈接:

http://www.m5sim.org/Running_M5_in_Full-System_Mode

http://novel.ict.ac.cn/qguo/pdf/gem5.pdf

http://gem5.org/dist/tutorials/hipeac2012/gem5_hipeac.pdf

?

以及參考師兄的ppt

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

總結

以上是生活随笔為你收集整理的在gem5的full system下运行 x86编译的测试程序 running gem5 on ubuntu in full system mode in x86...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。