mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-25 17:33:28 +04:00
Change user sub-project structure
This commit is contained in:
parent
f819a702c7
commit
935bcb3e15
@ -1,6 +1,7 @@
|
||||
[workspace]
|
||||
[package]
|
||||
name = "ucore-user-programs"
|
||||
version = "0.1.0"
|
||||
authors = ["Runji Wang <wangrunji0408@163.com>"]
|
||||
|
||||
members = [
|
||||
"ucore-ulib",
|
||||
"hello",
|
||||
]
|
||||
[dependencies]
|
||||
"ucore-ulib" = { path = "ucore-ulib" }
|
@ -1,2 +1,5 @@
|
||||
# arch = {riscv32, x86_64}
|
||||
arch := riscv32
|
||||
|
||||
all:
|
||||
@RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-blog_os
|
||||
@RUST_TARGET_PATH=$(shell pwd) xargo build --target $(arch)-ucore
|
@ -1,7 +0,0 @@
|
||||
[package]
|
||||
name = "hello"
|
||||
version = "0.1.0"
|
||||
authors = ["WangRunji <wangrunji0408@163.com>"]
|
||||
|
||||
[dependencies]
|
||||
ucore-ulib = { path = "../ucore-ulib" }
|
@ -39,7 +39,7 @@ fn sys_call(id: usize, arg0: usize, arg1: usize, arg2: usize, arg3: usize, arg4:
|
||||
: "memory"
|
||||
: "volatile");
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
asm!("int 0x80"
|
||||
asm!("int 0x40"
|
||||
: "={rax}" (ret)
|
||||
: "{rax}" (id), "{rdi}" (arg0), "{rsi}" (arg1), "{rdx}" (arg2), "{rcx}" (arg3), "{r8}" (arg4), "{r9}" (arg5)
|
||||
: "memory"
|
||||
|
Loading…
Reference in New Issue
Block a user