Skip to content

Commit 16f0dd7

Browse files
authored
refactor: migrate to new arceos branch (#68)
1 parent 4bff807 commit 16f0dd7

31 files changed

Lines changed: 86 additions & 77 deletions

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "arceos"]
22
path = arceos
33
url = https://github.com/Starry-OS/arceos
4-
branch = main
4+
branch = dev

Cargo.lock

Lines changed: 35 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@ repository = "https://github.com/arceos-org/starry-next"
2222
axfeat = { path = "arceos/api/axfeat", features = [
2323
"alloc-slab",
2424
"fp-simd",
25-
"ext4",
26-
"fs",
25+
"fs-ext4",
2726
"irq",
2827
"multitask",
2928
"net",
3029
"page-alloc-4g",
3130
"rtc",
32-
# "sched-fifo",
3331
"sched-rr",
32+
"task-ext",
33+
"uspace",
3434
] }
3535

3636
axalloc = { path = "arceos/modules/axalloc" }
3737
axconfig = { path = "arceos/modules/axconfig" }
3838
axdisplay = { path = "arceos/modules/axdisplay" }
3939
axdriver = { path = "arceos/modules/axdriver" }
40-
axfs-ng = { path = "arceos/modules/axfs-ng" }
41-
axhal = { path = "arceos/modules/axhal", features = ["uspace"] }
40+
axfs = { path = "arceos/modules/axfs" }
41+
axhal = { path = "arceos/modules/axhal" }
4242
axinput = { path = "arceos/modules/axinput" }
4343
axlog = { path = "arceos/modules/axlog" }
4444
axmm = { path = "arceos/modules/axmm" }
4545
axnet = { path = "arceos/modules/axnet" }
4646
axruntime = { path = "arceos/modules/axruntime" }
4747
axsync = { path = "arceos/modules/axsync" }
48-
axtask = { path = "arceos/modules/axtask", features = ["task-ext"] }
48+
axtask = { path = "arceos/modules/axtask" }
4949

5050
axbacktrace = "0.1"
5151
axerrno = "0.2"
@@ -57,7 +57,7 @@ bytemuck = { version = "1.23", features = ["unsound_ptr_pod_impl"] }
5757
cfg-if = "1.0"
5858
event-listener = { version = "5.4.0", default-features = false }
5959
extern-trait = "0.2"
60-
hashbrown = "0.15.4"
60+
hashbrown = "0.16"
6161
kspin = "0.1"
6262
lazy_static = { version = "1.5", features = ["spin_no_std"] }
6363
linkme = "0.3.33"
@@ -91,16 +91,8 @@ repository.workspace = true
9191
[features]
9292
default = []
9393
qemu = [
94-
"axfeat/driver-virtio-blk",
95-
"axfeat/driver-virtio-net",
96-
"axfeat/driver-virtio-socket",
97-
98-
"axfeat/driver-virtio-gpu",
9994
"axfeat/display",
100-
101-
"axfeat/driver-virtio-input",
10295
"axfeat/input",
103-
# "axdriver/dyn",
10496
"starry-api/input",
10597

10698
"axfeat/vsock",
@@ -121,7 +113,7 @@ vf2 = ["dep:axplat-riscv64-visionfive2", "axfeat/driver-sdmmc"]
121113
axdriver.workspace = true
122114
axerrno.workspace = true
123115
axfeat.workspace = true
124-
axfs-ng.workspace = true
116+
axfs.workspace = true
125117
axhal.workspace = true
126118
axlog.workspace = true
127119
axruntime.workspace = true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build Options
22
export ARCH := riscv64
33
export LOG := warn
4-
export BACKTRACE := y
4+
export DWARF := y
55
export MEMTRACK := n
66

77
# QEMU Options

api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository.workspace = true
99

1010
[features]
1111
input = ["dep:axinput"]
12-
memtrack = ["axfeat/backtrace", "axalloc/tracking", "dep:gimli"]
12+
memtrack = ["axfeat/dwarf", "axalloc/tracking", "dep:gimli"]
1313
vsock = ["axnet/vsock"]
1414
dev-log = []
1515

@@ -22,7 +22,7 @@ axdriver.workspace = true
2222
axerrno.workspace = true
2323
axfeat.workspace = true
2424
axfs-ng-vfs.workspace = true
25-
axfs-ng.workspace = true
25+
axfs.workspace = true
2626
axhal.workspace = true
2727
axinput = { workspace = true, optional = true }
2828
axio.workspace = true

api/src/file/fs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::{
88
};
99

1010
use axerrno::{AxError, AxResult};
11-
use axfs_ng::{FS_CONTEXT, FsContext};
11+
use axfs::{FS_CONTEXT, FsContext};
1212
use axfs_ng_vfs::{Location, Metadata, NodeFlags};
1313
use axpoll::{IoEvents, Pollable};
1414
use axsync::Mutex;
@@ -99,19 +99,19 @@ pub fn metadata_to_kstat(metadata: &Metadata) -> Kstat {
9999

100100
/// File wrapper for `axfs::fops::File`.
101101
pub struct File {
102-
inner: axfs_ng::File,
102+
inner: axfs::File,
103103
nonblock: AtomicBool,
104104
}
105105

106106
impl File {
107-
pub fn new(inner: axfs_ng::File) -> Self {
107+
pub fn new(inner: axfs::File) -> Self {
108108
Self {
109109
inner,
110110
nonblock: AtomicBool::new(false),
111111
}
112112
}
113113

114-
pub fn inner(&self) -> &axfs_ng::File {
114+
pub fn inner(&self) -> &axfs::File {
115115
&self.inner
116116
}
117117

api/src/file/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use alloc::{borrow::Cow, sync::Arc};
1010
use core::{any::Any, ffi::c_int, time::Duration};
1111

1212
use axerrno::{AxError, AxResult};
13-
use axfs_ng::{FS_CONTEXT, OpenOptions};
13+
use axfs::{FS_CONTEXT, OpenOptions};
1414
use axfs_ng_vfs::DeviceId;
1515
use axio::{Buf, BufMut, Read, Write};
1616
use axpoll::Pollable;

api/src/syscall/fs/ctl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::{
66
};
77

88
use axerrno::{AxError, AxResult};
9-
use axfs_ng::{FS_CONTEXT, FsContext};
9+
use axfs::{FS_CONTEXT, FsContext};
1010
use axfs_ng_vfs::{MetadataUpdate, NodePermission, NodeType, path::Path};
1111
use axhal::time::wall_time;
1212
use axtask::current;

api/src/syscall/fs/fd_ops.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::{
66
};
77

88
use axerrno::{AxError, AxResult};
9-
use axfs_ng::{FS_CONTEXT, FileBackend, OpenOptions, OpenResult};
9+
use axfs::{FS_CONTEXT, FileBackend, OpenOptions, OpenResult};
1010
use axfs_ng_vfs::{DirEntry, FileNode, Location, NodePermission, NodeType, Reference};
1111
use axtask::current;
1212
use bitflags::bitflags;
@@ -77,7 +77,7 @@ fn add_to_fd(result: OpenResult, flags: u32) -> AxResult<i32> {
7777
Reference::new(Some(pts.entry().clone()), pty_number.to_string()),
7878
);
7979
let loc = Location::new(file.location().mountpoint().clone(), entry);
80-
file = axfs_ng::File::new(FileBackend::Direct(loc), file.flags());
80+
file = axfs::File::new(FileBackend::Direct(loc), file.flags());
8181
} else if inner.is::<tty::CurrentTty>() {
8282
let term = current()
8383
.as_thread()
@@ -95,7 +95,7 @@ fn add_to_fd(result: OpenResult, flags: u32) -> AxResult<i32> {
9595
panic!("unknown terminal type")
9696
};
9797
let loc = FS_CONTEXT.lock().resolve(&path)?;
98-
file = axfs_ng::File::new(FileBackend::Direct(loc), file.flags());
98+
file = axfs::File::new(FileBackend::Direct(loc), file.flags());
9999
}
100100
}
101101
Arc::new(File::new(file))

api/src/syscall/fs/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::{
55
};
66

77
use axerrno::{AxError, AxResult};
8-
use axfs_ng::{FS_CONTEXT, FileFlags, OpenOptions};
8+
use axfs::{FS_CONTEXT, FileFlags, OpenOptions};
99
use axio::{Seek, SeekFrom};
1010
use axpoll::{IoEvents, Pollable};
1111
use axtask::current;

0 commit comments

Comments
 (0)