-
Notifications
You must be signed in to change notification settings - Fork 2
Home
PACTHEMAN123 edited this page Apr 30, 2025
·
3 revisions
Chronix 是一个用Rust语言编写的操作系统内核。它旨在提供一个稳定、高效且易于理解的系统实现,适合学习和研究操作系统的开发者。
-
克隆仓库
git clone https://github.com/PACTHEMAN123/Chronix.git cd Chronix -
烧写镜像 注意需要再运行内核之前先烧写镜像。每次测试用例修改,或者用户程序修改,都需要重新烧写。将 烧写镜像 和 运行内核 分开,方便修改内核后快速运行测试。
make fs-img
-
运行内核
make run
-
调试内核
make debug
.
├── bootloader
├── cross-compiler
├── dev-env-info.md
├── Dockerfile
├── host_client.py
├── LICENSE
├── Makefile
├── os
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── hal # 硬件抽象层
│ ├── build.rs
│ ├── Cargo.toml
│ ├── hal-marco
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
│ ├── src
│ │ ├── board
│ │ ├── component
│ │ │ ├── addr # 地址模块
│ │ │ ├── common.rs # 通用
│ │ │ ├── console # 控制台
│ │ │ ├── constant # 系统常量
│ │ │ ├── entry # 入口函数
│ │ │ ├── instruction # 指令抽象
│ │ │ ├── mod.rs
│ │ │ ├── pagetable # 页表抽象
│ │ │ ├── signal # 信号相关
│ │ │ ├── timer # 时钟相关
│ │ │ └── trap # 中断相关
│ │ ├── interface
│ │ │ ├── allocator
│ │ │ └── mod.rs
│ │ ├── lib.rs
│ │ └── util
│ │ ├── backtrace.rs # 调用回溯
│ │ ├── mod.rs
│ │ ├── mutex.rs # 互斥锁
│ │ ├── sie_guard.rs # 中断保护
│ │ └── smart_point.rs # 智能指针
│ └── src
│ ├── banner.rs
│ ├── config.rs
│ ├── devices # 设备模块
│ ├── drivers # 驱动模块
│ ├── executor # 异步调度器
│ ├── fs # 文件系统
│ ├── lang_items.rs
│ ├── linker-loongarch64-qemu.ld # la 链接脚本
│ ├── linker-riscv64-qemu.ld # rv 链接脚本
│ ├── main.rs # 主函数
│ ├── mm # 内存模块
│ ├── net # 网络模块
│ ├── processor # 多核心处理
│ ├── signal # 信号模块
│ ├── sync # 同步原语
│ ├── syscall # 系统调用
│ ├── task # 进程管理
│ ├── timer # 时间模块
│ ├── trap # 中断处理
│ └── utils # 工具模块
├── README.md # 项目基础说明
├── rust-toolchain.toml # 工具链信息
├── scripts # 脚本
├── user
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── Makefile
│ └── src
│ ├── bin # 用户程序
│ ├── console.rs
│ ├── lang_items.rs
│ ├── lib.rs # 用户库
│ ├── linker.ld # 用户程序链接脚本
│ └── syscall.rs # 系统调用
├── utils # 工具模块
└── vendor # 第三方模块
├── bitmap-allocator # 位图分配器
├── ext4fs # Ext4文件系统
├── oskernel-testsuits-cooperation # 比赛协作文档
├── rust-fatfs # Fat32文件系统
├── testsuits-for-oskernel # 比赛测例
└── xmas-elf # elf解析模块