-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- introduce crate `axfeat` to select features. - divide features into 3 categories: ArceOS modules (axfeat), user library (axstd/axlibc), and app itself (app)
- Loading branch information
1 parent
ef35f47
commit a23315e
Showing
39 changed files
with
373 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
[package] | ||
name = "axfeat" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Yuekai Jia <[email protected]>"] | ||
description = "Top-level feature selection for ArceOS" | ||
license = "GPL-3.0-or-later OR Apache-2.0" | ||
homepage = "https://github.com/rcore-os/arceos" | ||
repository = "https://github.com/rcore-os/arceos/tree/main/api/axfeat" | ||
documentation = "https://rcore-os.github.io/arceos/axfeat/index.html" | ||
|
||
[features] | ||
default = [] | ||
|
||
# Multicore | ||
smp = ["axhal/smp", "axruntime/smp", "spinlock/smp"] | ||
|
||
# Floating point/SIMD | ||
fp_simd = ["axhal/fp_simd"] | ||
|
||
# Interrupts | ||
irq = ["axhal/irq", "axruntime/irq", "axtask?/irq"] | ||
|
||
# Memory | ||
alloc = ["dep:axalloc", "axruntime/alloc"] | ||
alloc-tlsf = ["axalloc/tlsf"] | ||
alloc-slab = ["axalloc/slab"] | ||
alloc-buddy = ["axalloc/buddy"] | ||
paging = ["alloc", "axhal/paging", "axruntime/paging"] | ||
|
||
# Multi-threading and scheduler | ||
multitask = ["alloc", "axtask/multitask", "axsync/multitask", "axruntime/multitask"] | ||
sched_fifo = ["axtask/sched_fifo"] | ||
sched_rr = ["axtask/sched_rr", "irq"] | ||
sched_cfs = ["axtask/sched_cfs", "irq"] | ||
|
||
# File system | ||
fs = ["alloc", "paging", "axdriver/virtio-blk", "dep:axfs", "axruntime/fs"] # TODO: try to remove "paging" | ||
myfs = ["axfs?/myfs"] | ||
|
||
# Networking | ||
net = ["alloc", "paging", "axdriver/virtio-net", "dep:axnet", "axruntime/net"] | ||
|
||
# Display | ||
display = ["alloc", "paging", "axdriver/virtio-gpu", "dep:axdisplay", "axruntime/display"] | ||
|
||
# Device drivers | ||
bus-mmio = ["axdriver?/bus-mmio"] | ||
bus-pci = ["axdriver?/bus-pci"] | ||
driver-ramdisk = ["axdriver?/ramdisk", "axfs?/use-ramdisk"] | ||
driver-ixgbe = ["axdriver?/ixgbe"] | ||
driver-bcm2835-sdhci = ["axdriver?/bcm2835-sdhci"] | ||
|
||
# Logging | ||
log-level-off = ["axlog/log-level-off"] | ||
log-level-error = ["axlog/log-level-error"] | ||
log-level-warn = ["axlog/log-level-warn"] | ||
log-level-info = ["axlog/log-level-info"] | ||
log-level-debug = ["axlog/log-level-debug"] | ||
log-level-trace = ["axlog/log-level-trace"] | ||
|
||
[dependencies] | ||
axruntime = { path = "../../modules/axruntime" } | ||
axhal = { path = "../../modules/axhal" } | ||
axlog = { path = "../../modules/axlog" } | ||
axalloc = { path = "../../modules/axalloc", optional = true } | ||
axdriver = { path = "../../modules/axdriver", optional = true } | ||
axfs = { path = "../../modules/axfs", optional = true } | ||
axnet = { path = "../../modules/axnet", optional = true } | ||
axdisplay = { path = "../../modules/axdisplay", optional = true } | ||
axsync = { path = "../../modules/axsync", optional = true } | ||
axtask = { path = "../../modules/axtask", optional = true } | ||
spinlock = { path = "../../crates/spinlock", optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//! Top-level feature selection for [ArceOS]. | ||
//! | ||
//! # Cargo Features | ||
//! | ||
//! - CPU | ||
//! - `smp`: Enable SMP (symmetric multiprocessing) support. | ||
//! - `fp_simd`: Enable floating point and SIMD support. | ||
//! - Interrupts: | ||
//! - `irq`: Enable interrupt handling support. | ||
//! - Memory | ||
//! - `alloc`: Enable dynamic memory allocation. | ||
//! - `alloc-tlsf`: Use the TLSF allocator. | ||
//! - `alloc-slab`: Use the slab allocator. | ||
//! - `alloc-buddy`: Use the buddy system allocator. | ||
//! - `paging`: Enable page table manipulation. | ||
//! - Task management | ||
//! - `multitask`: Enable multi-threading support. | ||
//! - `sched_fifo`: Use the FIFO cooperative scheduler. | ||
//! - `sched_rr`: Use the Round-robin preemptive scheduler. | ||
//! - `sched_cfs`: Use the Completely Fair Scheduler (CFS) preemptive scheduler. | ||
//! - Upperlayer stacks (fs, net, display) | ||
//! - `fs`: Enable file system support. | ||
//! - `myfs`: Allow users to define their custom filesystems to override the default. | ||
//! - `net`: Enable networking support. | ||
//! - `dns`: Enable DNS lookup support. | ||
//! - `display`: Enable graphics support. | ||
//! - Device drivers | ||
//! - `bus-mmio`: Use device tree to probe all MMIO devices. | ||
//! - `bus-pci`: Use PCI bus to probe all PCI devices. | ||
//! - `driver-ramdisk`: Use the RAM disk to emulate the block device. | ||
//! - `driver-ixgbe`: Enable the Intel 82599 10Gbit NIC driver. | ||
//! - `driver-bcm2835-sdhci`: Enable the BCM2835 SDHCI driver (Raspberry Pi SD card). | ||
//! - Logging | ||
//! - `log-level-off`: Disable all logging. | ||
//! - `log-level-error`, `log-level-warn`, `log-level-info`, `log-level-debug`, | ||
//! `log-level-trace`: Keep logging only at the specified level or higher. | ||
//! | ||
//! [ArceOS]: https://github.com/rcore-os/arceos | ||
|
||
#![no_std] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
alloc | ||
paging | ||
net | ||
ax/paging | ||
lib/alloc | ||
lib/net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
alloc | ||
paging | ||
net | ||
ax/paging | ||
lib/alloc | ||
lib/net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
alloc | ||
paging | ||
net | ||
fs | ||
select | ||
fp_simd | ||
ax/paging | ||
lib/fp_simd | ||
lib/alloc | ||
lib/fs | ||
lib/net | ||
lib/select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
alloc | ||
paging | ||
ax/paging | ||
lib/alloc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
alloc | ||
paging | ||
multitask | ||
ax/paging | ||
lib/alloc | ||
lib/multitask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
alloc | ||
paging | ||
multitask | ||
ax/paging | ||
lib/alloc | ||
lib/multitask |
Oops, something went wrong.