From 1f0f85f9791fe369475e2a332e127967b92cfb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Fri, 23 Mar 2018 16:41:05 +0100 Subject: [PATCH] sculpt: add NVMe support Fixes #2794. --- repos/gems/recipes/pkg/sculpt/archives | 1 + repos/gems/run/sculpt_test.run | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/repos/gems/recipes/pkg/sculpt/archives b/repos/gems/recipes/pkg/sculpt/archives index 1e2d0207b..62678281d 100644 --- a/repos/gems/recipes/pkg/sculpt/archives +++ b/repos/gems/recipes/pkg/sculpt/archives @@ -40,3 +40,4 @@ _/src/depot_deploy _/src/part_blk _/src/nic_router _/src/e2fsprogs-minimal +_/src/nvme_drv diff --git a/repos/gems/run/sculpt_test.run b/repos/gems/run/sculpt_test.run index 416c10eb3..89476e7b1 100644 --- a/repos/gems/run/sculpt_test.run +++ b/repos/gems/run/sculpt_test.run @@ -1,3 +1,5 @@ +set use_nvme 0 + source ${genode_dir}/repos/gems/run/sculpt.run # enable Qemu networking, usable via the nic_drv @@ -12,4 +14,15 @@ if {![file exists bin/sculpt-ahci.raw]} { append qemu_args " -device ahci,id=ahci " append qemu_args " -drive id=hdd,file=$disk_image,format=raw,if=none -device ide-hd,drive=hdd,bus=ahci.0 " +# attach small NVMe disk to Qemu to experiment with file-system access +if {$use_nvme} { + set disk_image "bin/sculpt-nvme.raw" + if {![file exists bin/sculpt-nvme.raw]} { + puts stderr "creating toy disk image $disk_image for use in Qemu" + catch { exec dd if=/dev/zero of=$disk_image bs=1M count=512 } + } + append qemu_args " -drive id=nvme0,file=$disk_image,format=raw,if=none " + append qemu_args " -device nvme,drive=nvme0,serial=NVMe_666,id=nvme0n1 " +} + run_genode_until forever