源码安装 gem5

1.gem5 的依赖
 

sudo apt install build-essential git m4 scons zlib1g zlib1g-dev \
    libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \
    python3-dev libboost-all-dev pkg-config python3-tk

sudo apt-get install libcapstone-dev
pip install capstone


2.下载代码
 

git clone https://github.com/gem5/gem5


3.安装依赖

 pip install -r requirements.txt


 
 

 
 {如下capstone源码方案遇到依赖问题
         3.2 install capstone from source code:
        
        wget https://github.com/capstone-engine/capstone/archive/5.0.tar.gz
        tar zxf 5.0.tar.gz
        cd capstone-5.0/
        $ make.sh
        $sudo make install
        
         $ cd bindings/python
        $ sudo make install
        
        
        
         sudo apt-get install libcapstone2
         sudo apt-get install libcapstone-dev
         pip install capstone
 
 }


4. 编译的选项

scons build/X86/gem5.opt -j  18
scons build/X86/gem5.debug -j  18
scons build/X86/gem5. -j  18
scons build/RISCV/gem5.debug -j 18
scons build/ARM/gem5.debug -j 18

build/xxx/gem5.debug

xxx \in {

    ARM
    NULL
    MIPS
    POWER
    RISCV
    SPARC
    X86

}

你可能感兴趣的:(arch,cpu)