pa2.1: support RV32I instructions

This commit is contained in:
xinyangli 2024-03-06 12:50:56 +08:00
parent 3c7c5f060e
commit e764133868
No known key found for this signature in database
4 changed files with 100 additions and 13 deletions

View file

@ -1,6 +1,7 @@
{ pkgs,
lib,
stdenv
stdenv,
am-kernels
}:
stdenv.mkDerivation rec {
@ -9,21 +10,25 @@ stdenv.mkDerivation rec {
src = ./.;
NEMU_HOME = "/build/nemu";
nativeBuildInputs = with pkgs; [
gnumake
pkg-config
flex
bison
];
buildInputs = with pkgs; [
check
readline
libllvm
];
checkInputs = [
pkgs.check
am-kernels
];
configurePhase = ''
echo pwd=$(pwd)
export NEMU_HOME=$(pwd)
make alldefconfig
'';
@ -31,7 +36,9 @@ stdenv.mkDerivation rec {
make
'';
doCheck = true;
checkPhase = ''
export IMAGES_PATH=${am-kernels}/share/images
make test
'';
@ -40,6 +47,11 @@ stdenv.mkDerivation rec {
make PREFIX=$out install
'';
shellHook = ''
export NEMU_HOME=$(pwd)
export IMAGES_PATH=${am-kernels}/share/images
'';
meta = with lib; {
description = "NJU EMUlator, a full system x86/mips32/riscv32/riscv64 emulator for teaching";
homepage = "https://github.com/NJU-ProjectN/nemu.git";