test! test! feat(qemu-nand): script to launch with nand
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Failing after 1m18s

This commit is contained in:
catvayor 2024-10-07 14:22:09 +02:00
parent 9425157499
commit 4744e3b3be
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -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
'';
} }