diff --git a/Cargo.lock b/Cargo.lock index 0c12ac5..db2e6dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,22 +224,6 @@ dependencies = [ "chrono", ] -[[package]] -name = "arm_vcpu" -version = "0.1.1" -dependencies = [ - "aarch64-cpu", - "axaddrspace", - "axdevice_base", - "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", - "axvisor_api", - "log", - "numeric-enum-macro", - "percpu", - "spin 0.10.0", -] - [[package]] name = "arm_vcpu" version = "0.1.1" @@ -249,7 +233,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu", "axvisor_api", "log", "numeric-enum-macro", @@ -257,23 +241,6 @@ dependencies = [ "spin 0.10.0", ] -[[package]] -name = "arm_vgic" -version = "0.1.0" -dependencies = [ - "aarch64-cpu", - "aarch64_sysreg", - "axaddrspace", - "axdevice_base", - "axerrno", - "axvisor_api", - "bitmaps", - "log", - "memory_addr", - "spin 0.9.8", - "tock-registers 0.10.1", -] - [[package]] name = "arm_vgic" version = "0.1.0" @@ -431,22 +398,6 @@ dependencies = [ "x86_64", ] -[[package]] -name = "axdevice" -version = "0.1.0" -dependencies = [ - "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", - "axaddrspace", - "axdevice_base", - "axerrno", - "axvmconfig", - "cfg-if", - "log", - "memory_addr", - "range-alloc", - "spin 0.9.8", -] - [[package]] name = "axdevice" version = "0.1.0" @@ -1109,17 +1060,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axvcpu" -version = "0.1.2" -dependencies = [ - "axaddrspace", - "axerrno", - "axvisor_api", - "memory_addr", - "percpu", -] - [[package]] name = "axvcpu" version = "0.1.2" @@ -1141,15 +1081,15 @@ dependencies = [ "arm-gic-driver", "axaddrspace", "axconfig", - "axdevice 0.1.0 (git+https://github.com/arceos-hypervisor/axdevice.git)", + "axdevice", "axdevice_base", "axerrno", "axhvc", "axruntime", "axstd", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu", "axvisor_api", - "axvm 0.1.0 (git+https://github.com/arceos-hypervisor/axvm.git?branch=next)", + "axvm", "bitflags 2.10.0", "byte-unit", "cfg-if", @@ -1201,42 +1141,18 @@ dependencies = [ "syn 2.0.110", ] -[[package]] -name = "axvm" -version = "0.1.0" -dependencies = [ - "arm_vcpu 0.1.1 (git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next)", - "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "axaddrspace", - "axdevice 0.1.0 (git+https://github.com/arceos-hypervisor/axdevice.git)", - "axdevice_base", - "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", - "axvmconfig", - "cfg-if", - "cpumask", - "log", - "memory_addr", - "page_table_entry", - "page_table_multiarch", - "percpu", - "riscv_vcpu", - "spin 0.9.8", - "x86_vcpu", -] - [[package]] name = "axvm" version = "0.1.0" source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#0393f27dea948433e53285a400e356cdfd4c4fa3" dependencies = [ - "arm_vcpu 0.1.1 (git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next)", + "arm_vcpu", "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "axaddrspace", - "axdevice 0.1.0 (git+https://github.com/arceos-hypervisor/axdevice.git)", + "axdevice", "axdevice_base", "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu", "axvmconfig", "cfg-if", "cpumask", @@ -4606,7 +4522,7 @@ checksum = "13f38f28fe6c02bb3ced43087c9667b23d18adf729becdc5adf1253f7df83904" dependencies = [ "axaddrspace", "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -6620,7 +6536,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", diff --git a/xtask/src/ctx.rs b/xtask/src/ctx.rs index ef3aefa..9398f37 100644 --- a/xtask/src/ctx.rs +++ b/xtask/src/ctx.rs @@ -3,7 +3,7 @@ use ostool::ctx::AppContext; pub struct Context { pub ctx: AppContext, pub build_config_path: Option, - pub vmconfigs: Vec, + pub vmconfigs: String, } impl Context { @@ -18,7 +18,7 @@ impl Context { Context { ctx, build_config_path: None, - vmconfigs: vec![], + vmconfigs: String::new(), } } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index ccc3bf1..c9fd7ae 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -44,12 +44,15 @@ enum Commands { #[derive(Parser)] struct QemuArgs { + /// Path to the build configuration file #[arg(long)] build_config: Option, + /// Path to the QEMU configuration file #[arg(long)] qemu_config: Option, + /// VM configuration files (comma-separated paths) #[arg(long)] - vmconfigs: Vec, + vmconfigs: String, } #[derive(Parser)] @@ -76,12 +79,15 @@ struct ClippyArgs { #[derive(Parser)] struct UbootArgs { + /// Path to the build configuration file #[arg(long)] build_config: Option, + /// Path to the uboot configuration file #[arg(long)] uboot_config: Option, + /// VM configuration files (comma-separated paths) #[arg(long)] - vmconfigs: Vec, + vmconfigs: String, } #[tokio::main] diff --git a/xtask/src/tbuld.rs b/xtask/src/tbuld.rs index 539913f..9a2fcdb 100644 --- a/xtask/src/tbuld.rs +++ b/xtask/src/tbuld.rs @@ -1,4 +1,4 @@ -use std::path::PathBuf; +use std::{env, path::PathBuf}; use anyhow::Context as _; use ostool::build::config::{Cargo, LogLevel}; @@ -45,8 +45,15 @@ impl Context { self.ctx.build_config_path = Some(config_path); - let mut vm_configs = config.vm_configs.to_vec(); - vm_configs.extend(self.vmconfigs.iter().cloned()); + let vm_configs = if !self.vmconfigs.is_empty() { + self.vmconfigs + .split(',') + .map(|s| s.trim().to_string()) + .filter(|s| !s.is_empty()) + .collect() + } else { + vec![] + }; let mut vm_config_paths = vec![]; for vm_config in &vm_configs { @@ -78,12 +85,12 @@ impl Context { } if !vm_config_paths.is_empty() { - let value = vm_config_paths - .iter() - .map(|p| format!("{}", p.display())) - .collect::>() - .join(";"); - cargo.env.insert("AXVISOR_VM_CONFIGS".to_string(), value); + if let Ok(joined) = env::join_paths(&vm_config_paths) { + cargo.env.insert( + "AXVISOR_VM_CONFIGS".to_string(), + joined.to_string_lossy().into_owned() + ); + } } Ok(cargo)