Rename crates from jinux-* to aster-*

This commit is contained in:
Jianfeng Jiang
2023-12-25 03:12:25 +00:00
committed by Tate, Hongliang Tian
parent 6dbf5d560d
commit 93781df27b
460 changed files with 596 additions and 595 deletions

450
Cargo.lock generated
View File

@ -113,6 +113,227 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
[[package]]
name = "aster-block"
version = "0.1.0"
dependencies = [
"aster-frame",
"aster-util",
"bitflags 1.3.2",
"component",
"lazy_static",
"log",
"spin 0.9.8",
]
[[package]]
name = "aster-console"
version = "0.1.0"
dependencies = [
"aster-frame",
"aster-util",
"bitflags 1.3.2",
"component",
"log",
"spin 0.9.8",
]
[[package]]
name = "aster-frame"
version = "0.1.0"
dependencies = [
"acpi",
"align_ext",
"aml",
"bit_field",
"bitflags 1.3.2",
"bitvec",
"buddy_system_allocator",
"cfg-if",
"gimli",
"inherit-methods-macro",
"int-to-c-enum",
"intrusive-collections",
"ktest",
"lazy_static",
"log",
"multiboot2",
"pod",
"rsdp",
"spin 0.9.8",
"static_assertions",
"tdx-guest",
"trapframe",
"unwinding",
"volatile",
"x86",
"x86_64",
]
[[package]]
name = "aster-frame-x86-boot-linux-setup"
version = "0.1.0"
dependencies = [
"uart_16550",
"xmas-elf",
]
[[package]]
name = "aster-framebuffer"
version = "0.1.0"
dependencies = [
"aster-frame",
"component",
"font8x8",
"log",
"spin 0.9.8",
]
[[package]]
name = "aster-input"
version = "0.1.0"
dependencies = [
"aster-frame",
"aster-rights",
"aster-util",
"bitflags 1.3.2",
"component",
"lazy_static",
"log",
"spin 0.9.8",
"virtio-input-decoder",
]
[[package]]
name = "aster-network"
version = "0.1.0"
dependencies = [
"align_ext",
"aster-frame",
"aster-rights",
"aster-util",
"bitflags 1.3.2",
"bytes",
"component",
"int-to-c-enum",
"log",
"pod",
"ringbuf",
"smoltcp",
"spin 0.9.8",
]
[[package]]
name = "aster-rights"
version = "0.1.0"
dependencies = [
"aster-rights-proc",
"bitflags 1.3.2",
"typeflags",
"typeflags-util",
]
[[package]]
name = "aster-rights-proc"
version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "aster-std"
version = "0.1.0"
dependencies = [
"align_ext",
"ascii",
"aster-block",
"aster-console",
"aster-frame",
"aster-input",
"aster-network",
"aster-rights",
"aster-rights-proc",
"aster-time",
"aster-util",
"aster-virtio",
"bitflags 1.3.2",
"controlled",
"core2",
"cpio-decoder",
"getrandom",
"int-to-c-enum",
"intrusive-collections",
"keyable-arc",
"ktest",
"lazy_static",
"lending-iterator",
"libflate",
"log",
"lru",
"pod",
"ringbuf",
"smoltcp",
"spin 0.9.8",
"tdx-guest",
"time",
"typeflags",
"typeflags-util",
"virtio-input-decoder",
"vte",
"xmas-elf",
]
[[package]]
name = "aster-time"
version = "0.1.0"
dependencies = [
"aster-frame",
"aster-util",
"component",
"log",
"spin 0.9.8",
]
[[package]]
name = "aster-util"
version = "0.1.0"
dependencies = [
"aster-frame",
"aster-rights",
"aster-rights-proc",
"bitvec",
"ktest",
"pod",
"typeflags-util",
]
[[package]]
name = "aster-virtio"
version = "0.1.0"
dependencies = [
"align_ext",
"aster-block",
"aster-console",
"aster-frame",
"aster-input",
"aster-network",
"aster-rights",
"aster-util",
"bit_field",
"bitflags 1.3.2",
"bytes",
"component",
"int-to-c-enum",
"log",
"pod",
"smoltcp",
"spin 0.9.8",
"typeflags-util",
"virtio-input-decoder",
]
[[package]] [[package]]
name = "atomic-polyfill" name = "atomic-polyfill"
version = "0.1.11" version = "0.1.11"
@ -607,143 +828,14 @@ dependencies = [
name = "jinux" name = "jinux"
version = "0.2.2" version = "0.2.2"
dependencies = [ dependencies = [
"aster-frame",
"aster-framebuffer",
"aster-std",
"aster-time",
"component", "component",
"jinux-frame",
"jinux-framebuffer",
"jinux-std",
"jinux-time",
"x86_64", "x86_64",
] ]
[[package]]
name = "jinux-block"
version = "0.1.0"
dependencies = [
"bitflags 1.3.2",
"component",
"jinux-frame",
"jinux-util",
"lazy_static",
"log",
"spin 0.9.8",
]
[[package]]
name = "jinux-console"
version = "0.1.0"
dependencies = [
"bitflags 1.3.2",
"component",
"jinux-frame",
"jinux-util",
"log",
"spin 0.9.8",
]
[[package]]
name = "jinux-frame"
version = "0.1.0"
dependencies = [
"acpi",
"align_ext",
"aml",
"bit_field",
"bitflags 1.3.2",
"bitvec",
"buddy_system_allocator",
"cfg-if",
"gimli",
"inherit-methods-macro",
"int-to-c-enum",
"intrusive-collections",
"ktest",
"lazy_static",
"log",
"multiboot2",
"pod",
"rsdp",
"spin 0.9.8",
"static_assertions",
"tdx-guest",
"trapframe",
"unwinding",
"volatile",
"x86",
"x86_64",
]
[[package]]
name = "jinux-frame-x86-boot-linux-setup"
version = "0.1.0"
dependencies = [
"uart_16550",
"xmas-elf",
]
[[package]]
name = "jinux-framebuffer"
version = "0.1.0"
dependencies = [
"component",
"font8x8",
"jinux-frame",
"log",
"spin 0.9.8",
]
[[package]]
name = "jinux-input"
version = "0.1.0"
dependencies = [
"bitflags 1.3.2",
"component",
"jinux-frame",
"jinux-rights",
"jinux-util",
"lazy_static",
"log",
"spin 0.9.8",
"virtio-input-decoder",
]
[[package]]
name = "jinux-network"
version = "0.1.0"
dependencies = [
"align_ext",
"bitflags 1.3.2",
"bytes",
"component",
"int-to-c-enum",
"jinux-frame",
"jinux-rights",
"jinux-util",
"log",
"pod",
"ringbuf",
"smoltcp",
"spin 0.9.8",
]
[[package]]
name = "jinux-rights"
version = "0.1.0"
dependencies = [
"bitflags 1.3.2",
"jinux-rights-proc",
"typeflags",
"typeflags-util",
]
[[package]]
name = "jinux-rights-proc"
version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]] [[package]]
name = "jinux-runner" name = "jinux-runner"
version = "0.1.0" version = "0.1.0"
@ -755,98 +847,6 @@ dependencies = [
"xmas-elf", "xmas-elf",
] ]
[[package]]
name = "jinux-std"
version = "0.1.0"
dependencies = [
"align_ext",
"ascii",
"bitflags 1.3.2",
"controlled",
"core2",
"cpio-decoder",
"getrandom",
"int-to-c-enum",
"intrusive-collections",
"jinux-block",
"jinux-console",
"jinux-frame",
"jinux-input",
"jinux-network",
"jinux-rights",
"jinux-rights-proc",
"jinux-time",
"jinux-util",
"jinux-virtio",
"keyable-arc",
"ktest",
"lazy_static",
"lending-iterator",
"libflate",
"log",
"lru",
"pod",
"ringbuf",
"smoltcp",
"spin 0.9.8",
"tdx-guest",
"time",
"typeflags",
"typeflags-util",
"virtio-input-decoder",
"vte",
"xmas-elf",
]
[[package]]
name = "jinux-time"
version = "0.1.0"
dependencies = [
"component",
"jinux-frame",
"jinux-util",
"log",
"spin 0.9.8",
]
[[package]]
name = "jinux-util"
version = "0.1.0"
dependencies = [
"bitvec",
"jinux-frame",
"jinux-rights",
"jinux-rights-proc",
"ktest",
"pod",
"typeflags-util",
]
[[package]]
name = "jinux-virtio"
version = "0.1.0"
dependencies = [
"align_ext",
"bit_field",
"bitflags 1.3.2",
"bytes",
"component",
"int-to-c-enum",
"jinux-block",
"jinux-console",
"jinux-frame",
"jinux-input",
"jinux-network",
"jinux-rights",
"jinux-util",
"log",
"pod",
"smoltcp",
"spin 0.9.8",
"typeflags-util",
"virtio-input-decoder",
]
[[package]] [[package]]
name = "json" name = "json"
version = "0.12.4" version = "0.12.4"

View File

@ -8,14 +8,14 @@ name = "jinux"
path = "kernel/main.rs" path = "kernel/main.rs"
[dependencies] [dependencies]
jinux-frame = { path = "framework/jinux-frame" } aster-frame = { path = "framework/aster-frame" }
jinux-std = { path = "services/libs/jinux-std" } aster-std = { path = "services/libs/aster-std" }
component = { path = "services/libs/comp-sys/component" } component = { path = "services/libs/comp-sys/component" }
[dev-dependencies] [dev-dependencies]
x86_64 = "0.14.2" x86_64 = "0.14.2"
jinux-time = { path = "services/comps/time" } aster-time = { path = "services/comps/time" }
jinux-framebuffer = { path = "services/comps/framebuffer" } aster-framebuffer = { path = "services/comps/framebuffer" }
[profile.dev] [profile.dev]
opt-level = 0 opt-level = 0
@ -33,8 +33,8 @@ panic = "unwind"
members = [ members = [
"runner", "runner",
"framework/jinux-frame", "framework/aster-frame",
"framework/jinux-frame/src/arch/x86/boot/linux_boot/setup", "framework/aster-frame/src/arch/x86/boot/linux_boot/setup",
"framework/libs/align_ext", "framework/libs/align_ext",
"framework/libs/ktest", "framework/libs/ktest",
"framework/libs/tdx-guest", "framework/libs/tdx-guest",
@ -48,10 +48,10 @@ members = [
"services/libs/cpio-decoder", "services/libs/cpio-decoder",
"services/libs/int-to-c-enum", "services/libs/int-to-c-enum",
"services/libs/int-to-c-enum/derive", "services/libs/int-to-c-enum/derive",
"services/libs/jinux-rights", "services/libs/aster-rights",
"services/libs/jinux-rights-proc", "services/libs/aster-rights-proc",
"services/libs/jinux-std", "services/libs/aster-std",
"services/libs/jinux-util", "services/libs/aster-util",
"services/libs/keyable-arc", "services/libs/keyable-arc",
"services/libs/typeflags", "services/libs/typeflags",
"services/libs/typeflags-util", "services/libs/typeflags-util",
@ -65,4 +65,4 @@ exclude = [
] ]
[features] [features]
intel_tdx = ["jinux-frame/intel_tdx", "jinux-std/intel_tdx"] intel_tdx = ["aster-frame/intel_tdx", "aster-std/intel_tdx"]

View File

@ -1,13 +1,13 @@
# template # template
[components] [components]
std = { name = "jinux-std" } std = { name = "aster-std" }
virtio = { name = "jinux-virtio" } virtio = { name = "aster-virtio" }
input = { name = "jinux-input" } input = { name = "aster-input" }
block = { name = "jinux-block" } block = { name = "aster-block" }
console = { name = "jinux-console" } console = { name = "aster-console" }
time = { name = "jinux-time" } time = { name = "aster-time" }
framebuffer = { name = "jinux-framebuffer" } framebuffer = { name = "aster-framebuffer" }
network = { name = "jinux-network" } network = { name = "aster-network" }
main = { name = "jinux" } main = { name = "jinux" }
[whitelist] [whitelist]

View File

@ -92,8 +92,8 @@ USERMODE_TESTABLE := \
services/libs/cpio-decoder \ services/libs/cpio-decoder \
services/libs/int-to-c-enum \ services/libs/int-to-c-enum \
services/libs/int-to-c-enum/derive \ services/libs/int-to-c-enum/derive \
services/libs/jinux-rights \ services/libs/aster-rights \
services/libs/jinux-rights-proc \ services/libs/aster-rights-proc \
services/libs/keyable-arc \ services/libs/keyable-arc \
services/libs/typeflags \ services/libs/typeflags \
services/libs/typeflags-util services/libs/typeflags-util

View File

@ -70,14 +70,14 @@ Nevertheless, you could enter the directory of a specific crate and invoke `carg
#### Kernel mode unit tests #### Kernel mode unit tests
We can run unit tests in kernel mode for crates like `jinux-frame` or `jinux-std`. This is powered by our [ktest](framework/libs/ktest) framework. We can run unit tests in kernel mode for crates like `aster-frame` or `aster-std`. This is powered by our [ktest](framework/libs/ktest) framework.
```bash ```bash
make run KTEST=1 make run KTEST=1
``` ```
You could also specify tests in a crate or a subset of tests to run. You could also specify tests in a crate or a subset of tests to run.
```bash ```bash
make run KTEST=1 KTEST_WHITELIST=failing_assertion,jinux_frame::test::expect_panic KTEST_CRATES=jinux-frame make run KTEST=1 KTEST_WHITELIST=failing_assertion,aster_frame::test::expect_panic KTEST_CRATES=aster-frame
``` ```
#### Component check #### Component check
@ -141,12 +141,12 @@ The codebase of Jinux is organized as below.
* `runner/`: creating a bootable Jinux kernel image along with an initramfs image. It also supports `cargo run` since it is the only package with `main()`. * `runner/`: creating a bootable Jinux kernel image along with an initramfs image. It also supports `cargo run` since it is the only package with `main()`.
* `kernel/`: defining the entry point of the Jinux kernel. * `kernel/`: defining the entry point of the Jinux kernel.
* `framework/`: the privileged half of Jinux (allowed to use `unsafe` keyword) * `framework/`: the privileged half of Jinux (allowed to use `unsafe` keyword)
* `jinux-frame`: providing the safe Rust abstractions for low-level resources like CPU, memory, interrupts, etc; * `aster-frame`: providing the safe Rust abstractions for low-level resources like CPU, memory, interrupts, etc;
* `libs`: Privileged libraries. * `libs`: Privileged libraries.
* `services/`: the unprivileged half of Jinux (not allowed to use `unsafe` directly), implementing most of the OS functionalities. * `services/`: the unprivileged half of Jinux (not allowed to use `unsafe` directly), implementing most of the OS functionalities.
* `comps/`: Jinux OS components; * `comps/`: Jinux OS components;
* `libs/`: Jinux OS libraries; * `libs/`: Jinux OS libraries;
* `jinux-std`: this is where system calls are implemented. Currently, this crate is too big. It will eventually be decomposed into smaller crates. * `aster-std`: this is where system calls are implemented. Currently, this crate is too big. It will eventually be decomposed into smaller crates.
* `tests/`: providing integration tests written in Rust. * `tests/`: providing integration tests written in Rust.
* `regression/`: providing user-space tests written in C. * `regression/`: providing user-space tests written in C.
* `docs/`: The Jinux book (needs a major update). * `docs/`: The Jinux book (needs a major update).

View File

@ -5,7 +5,7 @@ fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let linker_script_path = if target == "x86_64" { let linker_script_path = if target == "x86_64" {
PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()) PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap())
.join("framework") .join("framework")
.join("jinux-frame") .join("aster-frame")
.join("src") .join("src")
.join("arch") .join("arch")
.join("x86") .join("x86")

View File

@ -351,7 +351,7 @@ mod test {
### Implement access rights with typeflags ### Implement access rights with typeflags
The `Jinux-rights/lib.rs` file implements access rights. The `aster-rights/lib.rs` file implements access rights.
```rust ```rust
//! Access rights. //! Access rights.
@ -376,7 +376,7 @@ typeflags! {
} }
``` ```
The `Jinux-rights-proc/lib.rs` file implements the `require` procedural macro. The `aster-rights-proc/lib.rs` file implements the `require` procedural macro.
See the channel capability example later for how `require` is used. See the channel capability example later for how `require` is used.
```rust ```rust

View File

@ -1,5 +1,5 @@
[package] [package]
name = "jinux-frame" name = "aster-frame"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View File

@ -32,7 +32,7 @@ fn build_linux_setup_header(
let cargo = std::env::var("CARGO").unwrap(); let cargo = std::env::var("CARGO").unwrap();
let mut cmd = std::process::Command::new(cargo); let mut cmd = std::process::Command::new(cargo);
cmd.arg("install").arg("jinux-frame-x86-boot-linux-setup"); cmd.arg("install").arg("aster-frame-x86-boot-linux-setup");
cmd.arg("--debug"); cmd.arg("--debug");
cmd.arg("--locked"); cmd.arg("--locked");
cmd.arg("--path").arg(setup_crate_dir.to_str().unwrap()); cmd.arg("--path").arg(setup_crate_dir.to_str().unwrap());

View File

@ -1,5 +1,5 @@
[package] [package]
name = "jinux-frame-x86-boot-linux-setup" name = "aster-frame-x86-boot-linux-setup"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View File

@ -103,13 +103,13 @@ pub fn init() {
/// Call the framework-user defined entrypoint of the actual kernel. /// Call the framework-user defined entrypoint of the actual kernel.
/// ///
/// Any kernel that uses the jinux-frame crate should define a function named /// Any kernel that uses the aster-frame crate should define a function named
/// `jinux_main` as the entrypoint. /// `jinux_main` as the entrypoint.
pub fn call_jinux_main() -> ! { pub fn call_jinux_main() -> ! {
#[cfg(not(ktest))] #[cfg(not(ktest))]
unsafe { unsafe {
// The entry point of kernel code, which should be defined by the package that // The entry point of kernel code, which should be defined by the package that
// uses jinux-frame. // uses aster-frame.
extern "Rust" { extern "Rust" {
fn jinux_main() -> !; fn jinux_main() -> !;
} }

View File

@ -57,7 +57,7 @@ use crate::trap::DisabledLocalIrqGuard;
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use jinux_frame::sync::RwLock; /// use aster_frame::sync::RwLock;
/// ///
/// let lock = RwLock::new(5) /// let lock = RwLock::new(5)
/// ///

View File

@ -46,7 +46,7 @@ use super::WaitQueue;
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use jinux_frame::sync::RwMutex; /// use aster_frame::sync::RwMutex;
/// ///
/// let mutex = RwMutex::new(5) /// let mutex = RwMutex::new(5)
/// ///

Some files were not shown because too many files have changed in this diff Show More