Parcourir la source

Update README.md

徐启航 il y a 1 an
Parent
commit
470aa6a6c0
3 fichiers modifiés avec 49 ajouts et 5 suppressions
  1. 23 2
      README.md
  2. 23 2
      README.zh-cn.md
  3. 3 1
      scripts/install.sh

+ 23 - 2
README.md

@@ -11,6 +11,28 @@ virtual machines or bare metals should be taken into account by the user.
 Currently, the project only supports x86_64 architecture, and it will probably
 support aarch64 in the future. 
 
+# Features
+
+- **Pure microkernel architecture**: Only necessary functions such as memory management, task scheduling and inter-process communication are owned by the kernel, leaving others to the userspace tasks.
+- **Fully asynchronous kernel objects**: Every system call supports **proactor** async API based on async dispatcher objects, which is theoretically more convenient and more resource-friendly than Linux's `io-uring`.
+- **Fully asynchronous drivers**: Drivers are represented by dynamic libraries, loaded by driver hosts and controlled by the device manager. The DDK library enables drivers to run as async tasks on driver hosts, and multiple drivers can run on single driver host as they wish.
+- **Type-based task management**: Every task's state are represented by Rust's type system instead of a single state field, and its structure doesn't need to rely on reference-counted pointers. The running tasks are owned by the scheduler, while the blocking ones by futex references or suspend tokens, thus decreasing code complexity.
+- **Isolated and local VFS**: (Inspired by Fuchsia) Every process has its own VFS, and it's the task's choice whether to share the VFS with its child tasks.
+
+# Road map
+
+## Current working
+
+- [ ] Complete the DDK library.
+- [ ] Implement basic drivers (PCI, ACPI, etc).
+
+## Further to-dos (may change)
+
+- Implement storage drivers.
+- Implement some storage FSes (FAT, etc).
+- Complete the device manager and the program manager implementation.
+- Merge into Rust std.
+
 # Source tree
 
 - `debug` - contains the decompiled assembly files, debug symbols, object file informations. and the serial log files of the virtual machines.
@@ -28,8 +50,7 @@ support aarch64 in the future.
    ```sh
    # Select the nightly channel for rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-   bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
-   sudo apt install build-essential qemu-system-x86
+   sudo apt install build-essential qemu-system-x86 llvm
    ```
 
 2. Add the following target:

+ 23 - 2
README.zh-cn.md

@@ -6,6 +6,28 @@
 
 当前这个项目只支持x86_64架构。未来可能会支持aarch64。
 
+# 特色
+
+- **纯·微内核架构**:内核中只保留内存管理、任务调度、进程间通信等必要功能,其他的都在用户空间实现。
+- **全异步内核对象**:所有系统调用均在异步派发器内核对象的支持下实现proactor的异步API,理论上比Linux的`io-uring`更加方便,占用更少资源。
+- **全异步的驱动程序**:驱动程序以动态库为单位,在驱动宿主上运行,由设备管理进程控制。DDK使驱动程序能以异步任务的方式运行,也支持多个驱动程序在同一个宿主上运行。
+- **以类型系统为基础的任务调度**:任务的状态用Rust的类型系统表示,而不是一个状态变量,并且不需要依赖引用计数指针。正在运行的任务由调度器拥有,而正在等待(堵塞)的任务则由futex引用或者挂起令牌拥有。这样可以减小代码复杂度。
+- **非全局的隔离虚拟文件系统**:(借鉴自Fuchsia)每一个进程有自己的VFS,也可以自由选择是否将自己的VFS共享给自己的子进程。
+
+# 路线图
+
+## 正在实现的
+
+- [ ] 完成DDK。
+- [ ] 实现基础的驱动(PCI,ACPI等)。
+
+## 之后要做的(可能会改)
+
+- 实现存储设备的驱动。
+- 实现一些文件系统(FAT等)。
+- 完成设备管理进程和程序管理进程的实现。
+- 进入Rust标准库。
+
 # 代码结构
 
 - `debug` - 存储反汇编文件、调试符号表、二进制文件信息和虚拟机的串口记录文件。
@@ -23,8 +45,7 @@
    ```sh
    # 配置 Rust 时需要选择 nightly 通道
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-   bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
-   sudo apt install build-essential qemu-system-x86
+   sudo apt install build-essential qemu-system-x86 llvm
    ```
 
 2. 添加下列目标:

+ 3 - 1
scripts/install.sh

@@ -1,7 +1,9 @@
+#!/bin/bash
+
 mkdir -p target/img/mnt
 cd target
 
-tar vcf H2O.k KERNEL TINIT
+tar vcf H2O.k KERNEL TINIT BOOT.fs
 
 cd img