Skip to content

Commit

Permalink
Merge pull request syswonder#76 from syswonder/dev
Browse files Browse the repository at this point in the history
Merge dev into main
  • Loading branch information
caodg authored Mar 28, 2024
2 parents 6c6abc1 + 8c43a6a commit 714a944
Show file tree
Hide file tree
Showing 44 changed files with 1,473 additions and 444 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/target
/.vscode
.DS_Store

# clangd
/.cache
compile_commands.json

# downloaded opensbi binary
/fw_dynamic.bin

*.asm
disk.img
actual.out
Expand Down
118 changes: 102 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ members = [
"modules/ruxhal",
"modules/ruxruntime",
"modules/ruxtask",
"modules/ruxfutex",

"api/ruxfeat",
"api/arceos_api",
Expand All @@ -67,5 +68,10 @@ members = [
[profile.release]
lto = true

[profile.reldebug]
inherits = "release"
debug = true


[patch.crates-io]
crate_interface = { path = "crates/crate_interface" }
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - `ARCH`: Target architecture: x86_64, riscv64, aarch64
# - `PLATFORM`: Target platform in the `platforms` directory
# - `SMP`: Number of CPUs
# - `MODE`: Build mode: release, debug
# - `MODE`: Build mode: release, debug, reldebug
# - `LOG:` Logging level: warn, error, info, debug, trace
# - `V`: Verbose level: (empty), 1, 2
# - `ARGS`: Command-line arguments separated by comma. Only available when feature `alloc` is enabled.
Expand Down Expand Up @@ -56,7 +56,7 @@ NET ?= n
GRAPHIC ?= n
V9P ?= n
BUS ?= mmio
RISCV_BIOS ?= $(shell realpath ./platforms/riscv/fw_dynamic.bin)
RISCV_BIOS ?= default

DISK_IMG ?= disk.img
QEMU_LOG ?= n
Expand Down Expand Up @@ -198,6 +198,9 @@ debug: build
-ex 'continue' \
-ex 'disp /16i $$pc'

debug_no_attach: build
$(call run_qemu_debug)

clippy:
ifeq ($(origin ARCH), command line)
$(call cargo_clippy,--target $(TARGET))
Expand Down Expand Up @@ -245,4 +248,4 @@ clean_musl:
rm -rf ulib/ruxmusl/build_*
rm -rf ulib/ruxmusl/install

.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c clean_musl doc disk_image
.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c clean_musl doc disk_image debug_no_attach
2 changes: 1 addition & 1 deletion api/arceos_api/src/imp/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn ax_tcp_send(socket: &AxTcpSocketHandle, buf: &[u8]) -> AxResult<usize> {
}

pub fn ax_tcp_recv(socket: &AxTcpSocketHandle, buf: &mut [u8]) -> AxResult<usize> {
socket.0.recv(buf)
socket.0.recv(buf, 0)
}

pub fn ax_tcp_poll(socket: &AxTcpSocketHandle) -> AxResult<AxPollState> {
Expand Down
7 changes: 5 additions & 2 deletions api/ruxos_posix_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = []

smp = ["ruxfeat/smp"]
alloc = ["dep:axalloc", "ruxfeat/alloc"]
multitask = ["ruxfeat/multitask", "ruxtask/multitask"]
multitask = ["ruxfeat/multitask", "ruxtask/multitask", "dep:ruxfutex"]
fd = ["alloc"]
fs = ["dep:ruxfs", "ruxfeat/fs", "fd"]
net = ["dep:axnet", "ruxfeat/net", "fd"]
Expand All @@ -42,6 +42,7 @@ ruxconfig = { path = "../../modules/ruxconfig" }
axlog = { path = "../../modules/axlog" }
ruxhal = { path = "../../modules/ruxhal" }
axsync = { path = "../../modules/axsync" }
ruxfutex = { path = "../../modules/ruxfutex", optional = true }
axalloc = { path = "../../modules/axalloc", optional = true }
ruxtask = { path = "../../modules/ruxtask", optional = true }
ruxfs = { path = "../../modules/ruxfs", optional = true }
Expand All @@ -56,5 +57,7 @@ spin = { version = "0.9" }
lazy_static = { version = "1.4", features = ["spin_no_std"] }
flatten_objects = { path = "../../crates/flatten_objects" }

bitflags = "2.2"

[build-dependencies]
bindgen ={ version = "0.66" }
bindgen = { version = "0.66" }
Loading

0 comments on commit 714a944

Please sign in to comment.