> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.18 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024 x86_64 GNU/Linux
 12:15:20  up 1 day 15:43,  2 users,  load average: 1.21, 0.90, 0.67
This commit is contained in:
tracer-ysyx 2024-03-06 12:15:20 +08:00 committed by xinyangli
parent 20c8c52468
commit 4fc0e0e247
4 changed files with 6 additions and 4 deletions

View file

@ -17,7 +17,7 @@
}; };
in in
{ {
packages.nemu = pkgs.callPackage ./nemu {}; packages.nemu = pkgs.callPackage ./nemu { am-kernels = self.packages.${system}.am-kernels; };
packages.am-kernels = crossPkgs.stdenv.mkDerivation rec { packages.am-kernels = crossPkgs.stdenv.mkDerivation rec {
pname = "am-kernels"; pname = "am-kernels";

View file

@ -95,4 +95,4 @@ integration-tests: $(IMAGES)
test: unit-tests integration-tests test: unit-tests integration-tests
@$(OBJ_DIR)/tests/expr_test @$(OBJ_DIR)/tests/expr_test
.PHONY: test integration-tests .PHONY: test integration-tests unit-tests

View file

@ -23,10 +23,11 @@ stdenv.mkDerivation rec {
]; ];
checkInputs = [ checkInputs = [
pkgs.check
am-kernels am-kernels
]; ];
IMAGES_PATH = "${am-kernels}/share/images" IMAGES_PATH = "${am-kernels}/share/images";
configurePhase = '' configurePhase = ''
export NEMU_HOME=$(pwd) export NEMU_HOME=$(pwd)
@ -37,6 +38,7 @@ stdenv.mkDerivation rec {
make make
''; '';
doCheck = true;
checkPhase = '' checkPhase = ''
make test make test
''; '';

2
result
View file

@ -1 +1 @@
/nix/store/d0jlcjdrgsb5pis8flyy5ihifdnfhms5-am-kernels-riscv32-none-elf-2024.02.18 /nix/store/g0h98bppypvyz3z4sv45kl9218ad2gsq-nemu-2024-03-02