fix(qemu): give it a NAND on MIPS #34
1 changed files with 13 additions and 1 deletions
14
default.nix
14
default.nix
|
@ -52,7 +52,7 @@ let
|
||||||
borderVmConf
|
borderVmConf
|
||||||
];
|
];
|
||||||
}).config.system;
|
}).config.system;
|
||||||
in {
|
in rec {
|
||||||
inherit evalModules;
|
inherit evalModules;
|
||||||
|
|
||||||
outputs = config.system.outputs // {
|
outputs = config.system.outputs // {
|
||||||
|
@ -90,4 +90,16 @@ in {
|
||||||
lua
|
lua
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
try-nand = pkgs.pkgsBuildBuild.writeShellScriptBin "try-nand.sh" ''
|
||||||
|
rootfs=$(mktemp)
|
||||||
|
cp ${outputs.default}/rootfs $rootfs
|
||||||
|
${pkgs.pkgsBuildBuild.qemuLim}/bin/qemu-system-mips \
|
||||||
|
-M malta -echr 16 -m 272 \
|
||||||
|
-device nand,chip_id=0x59,id=nand -drive format=raw,file=''${rootfs},if=mtd,id=nand \
|
||||||
|
-serial mon:stdio -kernel ${outputs.default}/vmlinux \
|
||||||
|
-append "root=/dev/mtdblock0 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 root=/dev/mtdblock0 rootfstype=squashfs fw_devlink=off mem=256M liminix mtdparts=phram0:16M(rootfs) phram.phram=phram0,0x90000000,16Mi,65536" \
|
||||||
|
-display none
|
||||||
|
rm $rootfs
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue