Gem5,计算机架构

时间:2021-02-23 12:01:12

标签: gem5

我正在尝试使用以下命令在 FS 模式下运行 gem5:"build/ARM/gem5.opt configs/example/fs.py --disk-image=/home/coep/gem5%202/ full_system_images/aarch32-ubuntu-natty-headless.img --arm=/home/coep/gem5 2/full_system_images/vmlinux.arm.smp.fb.3.2/vmlinux.arm.smp.fb.3.2" 并得到错误:“用法:fs.py [选项] fs.py:错误:选项--arm-iset:无效选择:'/home/coep/gem5'(从'arm'、'thumb ', 'aarch64')" 请帮我解决这个错误。 谢谢。

2 个答案:

答案 0 :(得分:0)

我假设 --arm=/home/coep/gem5...vmlinux.arm.smp.fb.3.2 参数指定了来宾内核的路径,在这种情况下它应该是 --kernel=...

build/ARM/gem5.opt \
configs/example/fs.py \
--disk-image=/home/coep/gem5\ 2/full_system_images/aarch32-ubuntu-natty-headless.img \
--kernel=/home/coep/gem5\ 2/full_system_images/vmlinux.arm.smp.fb.3.2/vmlinux.arm.smp.fb.3.2

参数及其解释见configs/common/Options.py

答案 1 :(得分:0)

出现此错误的原因可能有多种,其中之一可能是磁盘映像文件的路径不正确。

我已经在 FS 模式下运行 gem5 并在 Ubuntu 18.04 LTS 上启动了 Linux

您可以按照以下步骤操作,第一步是下载并安装完整系统的二进制文件和磁盘映像文件。

 1. $ mkdir full_system_image
 2. $ cd full_system_image/
 3. $ wget http://www.m5sim.org/dist/current/arm/aarch-system-2014-10.tar.bz2
 4. $ tar jxf aarch-system-2014-10.tar.bz2
 5. $ echo "export M5_PATH=/Path to the full_system_image directory/full_system_images/" >> ~/.bashrc
 6. $ source ~/.bashrc
 7. $ echo $M5_PATH  (- check if the path is set correct)

现在路径已经设置好了,下一步就是在FS模式下运行gem5了。

 1. connect to gem5 base directory
 2. $ ./build/ARM/gem5.opt configs/example/fs.py --disk-image=/home/full_system_image/disks/aarch32-ubuntu-natty-headless.img
 3. Note: --disk-image=path to the full_system_image/disks/aarch32-ubuntu-natty-headless.img
 4. open a new terminal and listen to port 3456 
 5. $ telnet localhost 3456
 6. Here 3456 is a port number on the gem5 terminal
 7. this will take around 30 mins depending on the machine performance.
 8. After this, at the end you will get something like this

    input: AT Raw Set 2 keyboard as /devices/smb.14/motherboard.15/iofpga.17/1c060000.kmi/serio0/input/input0
    input: touchkitPS/2 eGalax Touchscreen as 
    /devices/smb.14/motherboard.15/iofpga.17/1c070000.kmi/serio1/input/input2
    kjournald starting. Commit interval 5 seconds
    EXT3-fs (sda1): using internal journal
    EXT3-fs (sda1): mounted filesystem with writeback data mode
    VFS: Mounted root (ext3 filesystem) on device 8:1.
    Freeing unused kernel memory: 292K (806aa000 - 806f3000)
    random: init urandom read with 14 bits of entropy available
    Ubuntu 11.04 gem5sim ttySA0

 9. login as root

瞧,您已经在 FS 模式下运行了 gem5。