Skip to content

Commit 407cc83

Browse files
authored
refactor: extract shell and VMM into separate modules with enhanced shell features (#340)
* refactor: extract shell and vmm into separate modules * fix: update paths for axvisor-vmm and axvisor-shell to relative references * feat: Implement tab completion and command history management * refactor: integrate shell and vmm modules directly into kernel
1 parent 1a199f0 commit 407cc83

File tree

27 files changed

+2302
-3962
lines changed

27 files changed

+2302
-3962
lines changed

kernel/Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ cfg-if.workspace = true
1616
cpumask.workspace = true
1717
kernel_guard.workspace = true
1818
kspin = "0.1"
19-
lazy_static = {version = "1.5", default-features = false, features = ["spin_no_std"]}
2019
lazyinit = "0.2"
2120
log = "0.4"
22-
spin = "0.9"
2321
timer_list = "0.1.0"
2422
toml = {version = "0.9", default-features = false}
2523

@@ -29,14 +27,20 @@ axstd.workspace = true
2927
# System dependent modules provided by ArceOS-Hypervisor.
3028
axhvc.workspace = true
3129
axvm.workspace = true
32-
axvmconfig = {workspace = true}
30+
axvmconfig = { workspace = true }
3331

3432
# System independent crates provided by ArceOS, these crates could be imported by remote url.
3533
axerrno.workspace = true
3634
byte-unit = {version = "5", default-features = false, features = ["byte"]}
3735
extern-trait = "0.2"
3836
memory_addr.workspace = true
3937
driver.workspace = true
38+
spin = "0.9"
39+
40+
# axvm = { path = "../axvm" }
41+
# axvmconfig = { version = "0.1", default-features = false }
42+
43+
lazy_static = {version = "1.5", default-features = false, features = ["spin_no_std"]}
4044

4145
[build-dependencies]
4246
anyhow = "1.0"

kernel/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ extern crate log;
88
extern crate alloc;
99

1010
extern crate axstd as std;
11+
extern crate driver;
1112

1213
// extern crate axruntime;
13-
extern crate driver;
1414

1515
mod logo;
16-
// mod shell;
1716
mod task;
17+
mod shell;
1818
mod vmm;
1919

20+
pub use shell::*;
21+
pub use vmm::*;
22+
2023
#[unsafe(no_mangle)]
2124
fn main() {
2225
logo::print_logo();
@@ -30,5 +33,5 @@ fn main() {
3033
info!("[OK] Default guest initialized");
3134
vmm::wait_for_all_vms_exit();
3235
info!("All guest VMs exited.");
33-
// shell::console_init();
36+
shell::console_init();
3437
}

0 commit comments

Comments
 (0)