From eb6a99eb90d6989a02db35e7e5c755684dd23949 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 18 Oct 2017 20:32:04 +0000 Subject: [PATCH] A better layout with both binaries in a single crate --- {ph => rust}/Cargo.lock | 0 {ph => rust}/Cargo.toml | 8 ++++++++ {ph => rust}/src/devices/mod.rs | 0 {ph => rust}/src/devices/rtc.rs | 0 {ph => rust}/src/devices/serial.rs | 0 {ph => rust}/src/devices/virtio_9p/commands.rs | 0 {ph => rust}/src/devices/virtio_9p/fid.rs | 0 {ph => rust}/src/devices/virtio_9p/filesystem.rs | 0 {ph => rust}/src/devices/virtio_9p/mod.rs | 0 {ph => rust}/src/devices/virtio_9p/pdu.rs | 0 {ph => rust}/src/devices/virtio_9p/readdir.rs | 0 {ph => rust}/src/devices/virtio_rng.rs | 0 {ph => rust}/src/devices/virtio_serial.rs | 0 {ph-init/src => rust/src/init}/main.rs | 0 {ph-init/src => rust/src/init}/sys.rs | 0 {ph => rust}/src/kvm/ioctl.rs | 0 {ph => rust}/src/kvm/mod.rs | 0 {ph => rust}/src/main.rs | 0 {ph => rust}/src/memory/address.rs | 0 {ph => rust}/src/memory/mmap.rs | 0 {ph => rust}/src/memory/mod.rs | 0 {ph => rust}/src/memory/ram.rs | 0 {ph => rust}/src/system/ioctl.rs | 0 {ph => rust}/src/system/mod.rs | 0 {ph => rust}/src/virtio/bus.rs | 0 {ph => rust}/src/virtio/chain.rs | 0 {ph => rust}/src/virtio/config.rs | 0 {ph => rust}/src/virtio/consts.rs | 0 {ph => rust}/src/virtio/device.rs | 0 {ph => rust}/src/virtio/eventfd.rs | 0 {ph => rust}/src/virtio/mod.rs | 0 {ph => rust}/src/virtio/pci.rs | 0 {ph => rust}/src/virtio/virtqueue.rs | 0 {ph => rust}/src/virtio/vring.rs | 0 {ph => rust}/src/vm/error.rs | 0 {ph => rust}/src/vm/io.rs | 0 {ph => rust}/src/vm/kernel_cmdline.rs | 0 {ph => rust}/src/vm/mod.rs | 0 {ph => rust}/src/vm/run.rs | 0 {ph => rust}/src/vm/setup/cpu.rs | 0 {ph => rust}/src/vm/setup/kernel.rs | 0 {ph => rust}/src/vm/setup/mod.rs | 0 {ph => rust}/src/vm/setup/mptable.rs | 0 43 files changed, 8 insertions(+) rename {ph => rust}/Cargo.lock (100%) rename {ph => rust}/Cargo.toml (63%) rename {ph => rust}/src/devices/mod.rs (100%) rename {ph => rust}/src/devices/rtc.rs (100%) rename {ph => rust}/src/devices/serial.rs (100%) rename {ph => rust}/src/devices/virtio_9p/commands.rs (100%) rename {ph => rust}/src/devices/virtio_9p/fid.rs (100%) rename {ph => rust}/src/devices/virtio_9p/filesystem.rs (100%) rename {ph => rust}/src/devices/virtio_9p/mod.rs (100%) rename {ph => rust}/src/devices/virtio_9p/pdu.rs (100%) rename {ph => rust}/src/devices/virtio_9p/readdir.rs (100%) rename {ph => rust}/src/devices/virtio_rng.rs (100%) rename {ph => rust}/src/devices/virtio_serial.rs (100%) rename {ph-init/src => rust/src/init}/main.rs (100%) rename {ph-init/src => rust/src/init}/sys.rs (100%) rename {ph => rust}/src/kvm/ioctl.rs (100%) rename {ph => rust}/src/kvm/mod.rs (100%) rename {ph => rust}/src/main.rs (100%) rename {ph => rust}/src/memory/address.rs (100%) rename {ph => rust}/src/memory/mmap.rs (100%) rename {ph => rust}/src/memory/mod.rs (100%) rename {ph => rust}/src/memory/ram.rs (100%) rename {ph => rust}/src/system/ioctl.rs (100%) rename {ph => rust}/src/system/mod.rs (100%) rename {ph => rust}/src/virtio/bus.rs (100%) rename {ph => rust}/src/virtio/chain.rs (100%) rename {ph => rust}/src/virtio/config.rs (100%) rename {ph => rust}/src/virtio/consts.rs (100%) rename {ph => rust}/src/virtio/device.rs (100%) rename {ph => rust}/src/virtio/eventfd.rs (100%) rename {ph => rust}/src/virtio/mod.rs (100%) rename {ph => rust}/src/virtio/pci.rs (100%) rename {ph => rust}/src/virtio/virtqueue.rs (100%) rename {ph => rust}/src/virtio/vring.rs (100%) rename {ph => rust}/src/vm/error.rs (100%) rename {ph => rust}/src/vm/io.rs (100%) rename {ph => rust}/src/vm/kernel_cmdline.rs (100%) rename {ph => rust}/src/vm/mod.rs (100%) rename {ph => rust}/src/vm/run.rs (100%) rename {ph => rust}/src/vm/setup/cpu.rs (100%) rename {ph => rust}/src/vm/setup/kernel.rs (100%) rename {ph => rust}/src/vm/setup/mod.rs (100%) rename {ph => rust}/src/vm/setup/mptable.rs (100%) diff --git a/ph/Cargo.lock b/rust/Cargo.lock similarity index 100% rename from ph/Cargo.lock rename to rust/Cargo.lock diff --git a/ph/Cargo.toml b/rust/Cargo.toml similarity index 63% rename from ph/Cargo.toml rename to rust/Cargo.toml index 8247bf8..b39cd6a 100644 --- a/ph/Cargo.toml +++ b/rust/Cargo.toml @@ -3,6 +3,14 @@ name = "pH" version = "0.1.0" authors = ["Bruce Leidl "] +[[bin]] +name="pH" +path="src/main.rs" + +[[bin]] +name="ph-init" +path="src/init/main.rs" + [dependencies] byteorder="1.0.0" libc = "*" diff --git a/ph/src/devices/mod.rs b/rust/src/devices/mod.rs similarity index 100% rename from ph/src/devices/mod.rs rename to rust/src/devices/mod.rs diff --git a/ph/src/devices/rtc.rs b/rust/src/devices/rtc.rs similarity index 100% rename from ph/src/devices/rtc.rs rename to rust/src/devices/rtc.rs diff --git a/ph/src/devices/serial.rs b/rust/src/devices/serial.rs similarity index 100% rename from ph/src/devices/serial.rs rename to rust/src/devices/serial.rs diff --git a/ph/src/devices/virtio_9p/commands.rs b/rust/src/devices/virtio_9p/commands.rs similarity index 100% rename from ph/src/devices/virtio_9p/commands.rs rename to rust/src/devices/virtio_9p/commands.rs diff --git a/ph/src/devices/virtio_9p/fid.rs b/rust/src/devices/virtio_9p/fid.rs similarity index 100% rename from ph/src/devices/virtio_9p/fid.rs rename to rust/src/devices/virtio_9p/fid.rs diff --git a/ph/src/devices/virtio_9p/filesystem.rs b/rust/src/devices/virtio_9p/filesystem.rs similarity index 100% rename from ph/src/devices/virtio_9p/filesystem.rs rename to rust/src/devices/virtio_9p/filesystem.rs diff --git a/ph/src/devices/virtio_9p/mod.rs b/rust/src/devices/virtio_9p/mod.rs similarity index 100% rename from ph/src/devices/virtio_9p/mod.rs rename to rust/src/devices/virtio_9p/mod.rs diff --git a/ph/src/devices/virtio_9p/pdu.rs b/rust/src/devices/virtio_9p/pdu.rs similarity index 100% rename from ph/src/devices/virtio_9p/pdu.rs rename to rust/src/devices/virtio_9p/pdu.rs diff --git a/ph/src/devices/virtio_9p/readdir.rs b/rust/src/devices/virtio_9p/readdir.rs similarity index 100% rename from ph/src/devices/virtio_9p/readdir.rs rename to rust/src/devices/virtio_9p/readdir.rs diff --git a/ph/src/devices/virtio_rng.rs b/rust/src/devices/virtio_rng.rs similarity index 100% rename from ph/src/devices/virtio_rng.rs rename to rust/src/devices/virtio_rng.rs diff --git a/ph/src/devices/virtio_serial.rs b/rust/src/devices/virtio_serial.rs similarity index 100% rename from ph/src/devices/virtio_serial.rs rename to rust/src/devices/virtio_serial.rs diff --git a/ph-init/src/main.rs b/rust/src/init/main.rs similarity index 100% rename from ph-init/src/main.rs rename to rust/src/init/main.rs diff --git a/ph-init/src/sys.rs b/rust/src/init/sys.rs similarity index 100% rename from ph-init/src/sys.rs rename to rust/src/init/sys.rs diff --git a/ph/src/kvm/ioctl.rs b/rust/src/kvm/ioctl.rs similarity index 100% rename from ph/src/kvm/ioctl.rs rename to rust/src/kvm/ioctl.rs diff --git a/ph/src/kvm/mod.rs b/rust/src/kvm/mod.rs similarity index 100% rename from ph/src/kvm/mod.rs rename to rust/src/kvm/mod.rs diff --git a/ph/src/main.rs b/rust/src/main.rs similarity index 100% rename from ph/src/main.rs rename to rust/src/main.rs diff --git a/ph/src/memory/address.rs b/rust/src/memory/address.rs similarity index 100% rename from ph/src/memory/address.rs rename to rust/src/memory/address.rs diff --git a/ph/src/memory/mmap.rs b/rust/src/memory/mmap.rs similarity index 100% rename from ph/src/memory/mmap.rs rename to rust/src/memory/mmap.rs diff --git a/ph/src/memory/mod.rs b/rust/src/memory/mod.rs similarity index 100% rename from ph/src/memory/mod.rs rename to rust/src/memory/mod.rs diff --git a/ph/src/memory/ram.rs b/rust/src/memory/ram.rs similarity index 100% rename from ph/src/memory/ram.rs rename to rust/src/memory/ram.rs diff --git a/ph/src/system/ioctl.rs b/rust/src/system/ioctl.rs similarity index 100% rename from ph/src/system/ioctl.rs rename to rust/src/system/ioctl.rs diff --git a/ph/src/system/mod.rs b/rust/src/system/mod.rs similarity index 100% rename from ph/src/system/mod.rs rename to rust/src/system/mod.rs diff --git a/ph/src/virtio/bus.rs b/rust/src/virtio/bus.rs similarity index 100% rename from ph/src/virtio/bus.rs rename to rust/src/virtio/bus.rs diff --git a/ph/src/virtio/chain.rs b/rust/src/virtio/chain.rs similarity index 100% rename from ph/src/virtio/chain.rs rename to rust/src/virtio/chain.rs diff --git a/ph/src/virtio/config.rs b/rust/src/virtio/config.rs similarity index 100% rename from ph/src/virtio/config.rs rename to rust/src/virtio/config.rs diff --git a/ph/src/virtio/consts.rs b/rust/src/virtio/consts.rs similarity index 100% rename from ph/src/virtio/consts.rs rename to rust/src/virtio/consts.rs diff --git a/ph/src/virtio/device.rs b/rust/src/virtio/device.rs similarity index 100% rename from ph/src/virtio/device.rs rename to rust/src/virtio/device.rs diff --git a/ph/src/virtio/eventfd.rs b/rust/src/virtio/eventfd.rs similarity index 100% rename from ph/src/virtio/eventfd.rs rename to rust/src/virtio/eventfd.rs diff --git a/ph/src/virtio/mod.rs b/rust/src/virtio/mod.rs similarity index 100% rename from ph/src/virtio/mod.rs rename to rust/src/virtio/mod.rs diff --git a/ph/src/virtio/pci.rs b/rust/src/virtio/pci.rs similarity index 100% rename from ph/src/virtio/pci.rs rename to rust/src/virtio/pci.rs diff --git a/ph/src/virtio/virtqueue.rs b/rust/src/virtio/virtqueue.rs similarity index 100% rename from ph/src/virtio/virtqueue.rs rename to rust/src/virtio/virtqueue.rs diff --git a/ph/src/virtio/vring.rs b/rust/src/virtio/vring.rs similarity index 100% rename from ph/src/virtio/vring.rs rename to rust/src/virtio/vring.rs diff --git a/ph/src/vm/error.rs b/rust/src/vm/error.rs similarity index 100% rename from ph/src/vm/error.rs rename to rust/src/vm/error.rs diff --git a/ph/src/vm/io.rs b/rust/src/vm/io.rs similarity index 100% rename from ph/src/vm/io.rs rename to rust/src/vm/io.rs diff --git a/ph/src/vm/kernel_cmdline.rs b/rust/src/vm/kernel_cmdline.rs similarity index 100% rename from ph/src/vm/kernel_cmdline.rs rename to rust/src/vm/kernel_cmdline.rs diff --git a/ph/src/vm/mod.rs b/rust/src/vm/mod.rs similarity index 100% rename from ph/src/vm/mod.rs rename to rust/src/vm/mod.rs diff --git a/ph/src/vm/run.rs b/rust/src/vm/run.rs similarity index 100% rename from ph/src/vm/run.rs rename to rust/src/vm/run.rs diff --git a/ph/src/vm/setup/cpu.rs b/rust/src/vm/setup/cpu.rs similarity index 100% rename from ph/src/vm/setup/cpu.rs rename to rust/src/vm/setup/cpu.rs diff --git a/ph/src/vm/setup/kernel.rs b/rust/src/vm/setup/kernel.rs similarity index 100% rename from ph/src/vm/setup/kernel.rs rename to rust/src/vm/setup/kernel.rs diff --git a/ph/src/vm/setup/mod.rs b/rust/src/vm/setup/mod.rs similarity index 100% rename from ph/src/vm/setup/mod.rs rename to rust/src/vm/setup/mod.rs diff --git a/ph/src/vm/setup/mptable.rs b/rust/src/vm/setup/mptable.rs similarity index 100% rename from ph/src/vm/setup/mptable.rs rename to rust/src/vm/setup/mptable.rs