• Stars
    star
    1,717
  • Rank 27,181 (Top 0.6 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zircon microkernel reimplemented in Rust.

zCore

CI Docs Coverage Status issue forks stars license

ๅŸบไบŽ zircon ๅนถๆไพ› Linux ๅ…ผๅฎนๆ€ง็š„ๆ“ไฝœ็ณป็ปŸๅ†…ๆ ธใ€‚

ๅŽŸ็‰ˆREADME

Reimplement Zircon microkernel in safe Rust as a userspace program!

  • zCore่ฎพ่ฎกๆžถๆž„ๆฆ‚่ฟฐ
  • ๆ”ฏๆŒbare-metalๆจกๅผ็š„Zircon & Linux
  • ๆ”ฏๆŒlibosๆจกๅผ็š„Zircon & Linux
  • ๆ”ฏๆŒ็š„ๅ›พๅฝขๅบ”็”จ็จ‹ๅบ็ญ‰ๆ›ดๅคšๆŒ‡ๅฏผ่ฏทๆŸฅ็œ‹ๅŽŸ็‰ˆREADMEๆ–‡ๆกฃใ€‚

ๅฏๅŠจๅ†…ๆ ธ

cargo qemu --arch riscv64

่ฟ™ไธชๅ‘ฝไปคไผšไฝฟ็”จ qemu-system-riscv64 ๅฏๅŠจ zCoreใ€‚

้ป˜่ฎค็š„ๆ–‡ไปถ็ณป็ปŸไธญๅฐ†ๅŒ…ๅซ busybox ๅบ”็”จ็จ‹ๅบๅ’Œ musl-libc ้“พๆŽฅๅ™จใ€‚ๅฎƒไปฌๆ˜ฏ็”จ่‡ชๅŠจไธ‹่ฝฝ็š„ musl-libc RISC-V ไบคๅ‰็ผ–่ฏ‘ๅทฅๅ…ท้“พ็ผ–่ฏ‘็š„ใ€‚

็›ฎๅฝ•

้กน็›ฎๆž„ๅปบ

้กน็›ฎๆž„ๅปบ้‡‡็”จ xtask ๆจกๅผ๏ผŒๅธธ็”จๆ“ไฝœ่ขซๅฐ่ฃ…ๆˆ cargo ๅ‘ฝไปคใ€‚

ๅฆๅค–๏ผŒ่ฟ˜้€š่ฟ‡ Makefile ๆไพ› make ่ฐƒ็”จ๏ผŒไปฅๅ…ผๅฎนไธ€ไบ›ๆ—ง่„šๆœฌใ€‚

็›ฎๅ‰ๅทฒๆต‹่ฏ•็š„ๅผ€ๅ‘็ŽฏๅขƒๅŒ…ๆ‹ฌ Ubuntu20.04ใ€Ubuntu22.04 ๅ’Œ Debian11๏ผŒUbuntu22.04 ไธ่ƒฝๆญฃ็กฎ็ผ–่ฏ‘ x86_64 ็š„ libc ๆต‹่ฏ•ใ€‚่‹ฅไธ้œ€่ฆ็ƒงๅ†™ๅˆฐ็‰ฉ็†็กฌไปถ๏ผŒไฝฟ็”จ WSL2 ๆˆ–ๅ…ถไป–่™šๆ‹Ÿๆœบ็š„ๆ“ไฝœไธŽ็œŸๆœบๅนถๆ— ไธๅŒไน‹ๅค„ใ€‚

ๆž„ๅปบๅ‘ฝไปค

ๅ‘ฝไปค็š„ๅŸบๆœฌๆ ผๅผไธบ cargo <command> [--args [value]]๏ผŒ่ฟ™ๅฎž้™…ไธŠๆ˜ฏ cargo run --package xtask --release -- <command> [--args [value]] ็š„็ฎ€ๅ†™ใ€‚command ่ขซไผ ้€’็ป™ xtask ๅบ”็”จ็จ‹ๅบ๏ผŒ่งฃๆžๅนถๆ‰ง่กŒใ€‚

่ฎธๅคšๅ‘ฝไปค็š„ๆ•ˆๆžœๅ—ๅˆฐไป“ๅบ“็Žฏๅขƒ็š„ๅฝฑๅ“๏ผŒไนŸไผšๅฝฑๅ“ไป“ๅบ“็š„็Žฏๅขƒใ€‚ไธบไบ†ไฝฟ็”จๆ–นไพฟ๏ผŒๅฆ‚ๆžœไธ€ไธชๅ‘ฝไปคไพ่ต–ไบŽๅฆไธ€ไธชๅ‘ฝไปค็š„ๆ•ˆๆžœ๏ผŒๅฎƒไปฌ่ขซ่ฎพ่ฎกไธบ้€’ๅฝ’็š„ใ€‚ๅ‘ฝไปค็š„้€’ๅฝ’ๅ…ณ็ณปๅ›พๅฆ‚ไธ‹๏ผŒๅฏนไบŽๅฎƒไปฌ็š„่ฏฆ็ป†่งฃ้‡Šๅœจไธ‹ไธ€่Š‚๏ผš


NOTICE ๅปบ่ฎฎไฝฟ็”จ็ญ‰ๅฎฝๅญ—ไฝ“


โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
| update-all | | check-style | | zircon-init |
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
| asm | | qemu |โ”€โ†’| bin |  | linux-libos | | libos-libc-test |
โ””โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     |            โ””โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”˜   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ†“                โ†“โ†“      โ”Œโ”€โ”€| libc-test |
                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ†โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 | image |โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’| rootfs |โ†โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€| other-test |
                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           โ†‘         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 | opencv |โ”€โ”€โ”€โ”€โ†’โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”Œโ”€โ†’| musl-libc |
                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  |  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 | ffmpeg |โ”€โ”€โ”˜
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
-------------------------------------------------------------------
ๅ›พไพ‹๏ผšA ้€’ๅฝ’ๆ‰ง่กŒ B๏ผˆA ไพ่ต– B ็š„็ป“ๆžœ๏ผŒๆ‰ง่กŒ A ๆ—ถ่‡ชๅŠจๅ…ˆๆ‰ง่กŒ B๏ผ‰
โ”Œโ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”
| A |โ”€โ†’| B |
โ””โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”˜

ๅ‘ฝไปคๅ‚่€ƒ

ๅฆ‚ๆžœไธ‹้ข็š„ๅ‘ฝไปคๆ่ฟฐไธŽ่กŒไธบไธ็ฌฆ๏ผŒๆˆ–ๆ€€็–‘ๆญคๆ–‡ๆกฃๆ›ดๆ–ฐไธๅŠๆ—ถ๏ผŒไบฆๅฏ็›ดๆŽฅๆŸฅ็œ‹ๅ†…่”ๆ–‡ๆกฃใ€‚ ๅฆ‚ๆžœๅ‘็Žฐ error: no such subcommand: ...๏ผŒๆŸฅ็œ‹ๅ‘ฝไปค็ฎ€ๅ†™ไธบๅ“ชไบ›ๅ‘ฝไปค่ฎพ็ฝฎไบ†ๅˆซๅใ€‚


NOTICE ๅ†…่”ๆ–‡ๆกฃไนŸๆ˜ฏไธญ่‹ฑๅŒ่ฏญ


update-all

ๆ›ดๆ–ฐๅทฅๅ…ท้“พใ€ไพ่ต–ๅ’Œ git ๅญๆจกๅ—ใ€‚

ๅฆ‚ๆžœๆฒกๆœ‰้€’ๅฝ’ๅ…‹้š†ๅญๆจกๅ—๏ผŒๅฏไปฅไฝฟ็”จ่ฟ™ไธชๅ‘ฝไปคๅ…‹้š†ใ€‚

cargo update-all

check-style

้™ๆ€ๆฃ€ๆŸฅใ€‚่ฎพ็ฝฎๅคš็ง็ผ–่ฏ‘้€‰้กน๏ผŒๆฃ€ๆŸฅไปฃ็ ่ƒฝๅฆ็ผ–่ฏ‘ใ€‚

cargo check-style

zircon-init

ไธ‹่ฝฝ zircon ๆจกๅผๆ‰€้œ€็š„ไบŒ่ฟ›ๅˆถๆ–‡ไปถใ€‚

cargo zircon-init

asm

ๅๆฑ‡ๅนถไฟๅญ˜็ผ–ๆŒ‡ๅฎšๆžถๆž„็š„ๅ†…ๆ ธใ€‚้ป˜่ฎคไฟๅญ˜ๅˆฐ target/zcore.asmใ€‚

cargo asm -m virt-riscv64 -o z.asm

bin

็”Ÿๆˆๅ†…ๆ ธ raw ้•œๅƒๅˆฐๆŒ‡ๅฎšไฝ็ฝฎใ€‚้ป˜่ฎค่พ“ๅ‡บๅˆฐ target/{arch}/release/zcore.binใ€‚

cargo bin -m virt-riscv64 -o z.bin

qemu

ๅœจ Qemu ไธญๅฏๅŠจ zCoreใ€‚่ฟ™้œ€่ฆ Qemu ๅทฒ็ปๅฎ‰่ฃ…ๅฅฝไบ†ใ€‚

cargo qemu --arch riscv64 --smp 4

ๆ”ฏๆŒๅฐ† qemu ่ฟžๆŽฅๅˆฐ gdb๏ผš

cargo qemu --arch riscv64 --smp 4 --gdb 1234

rootfs

้‡ๅปบ Linux rootfsใ€‚็›ดๆŽฅๆ‰ง่กŒ่ฟ™ไธชๅ‘ฝไปคไผšๆธ…็ฉบๅทฒๆœ‰็š„ไธบๆญคๆžถๆž„ๆž„้€ ็š„ rootfs ็›ฎๅฝ•๏ผŒ้‡ๅปบๆœ€ๅฐ็š„ rootfsใ€‚

cargo rootfs --arch riscv64

musl-libs

ๅฐ† musl ๅŠจๆ€ๅบ“ๆ‹ท่ดๅˆฐ rootfs ็›ฎๅฝ•ๅฏนๅบ”ไฝ็ฝฎใ€‚

cargo musl-libs --arch riscv64

ffmpeg

ๅฐ† ffmpeg ๅŠจๆ€ๅบ“ๆ‹ท่ดๅˆฐ rootfs ็›ฎๅฝ•ๅฏนๅบ”ไฝ็ฝฎใ€‚

cargo ffmpeg --arch riscv64

opencv

ๅฐ† opencv ๅŠจๆ€ๅบ“ๆ‹ท่ดๅˆฐ rootfs ็›ฎๅฝ•ๅฏนๅบ”ไฝ็ฝฎใ€‚ๅฆ‚ๆžœ ffmpeg ๅทฒ็ปๆ”พๅฅฝไบ†๏ผŒopencv ๅฐ†ไผš็ผ–่ฏ‘ๅ‡บๅŒ…ๅซ ffmepg ๆ”ฏๆŒ็š„็‰ˆๆœฌใ€‚

cargo opencv --arch riscv64

libc-test

ๅฐ† libc ๆต‹่ฏ•้›†ๆ‹ท่ดๅˆฐ rootfs ็›ฎๅฝ•ๅฏนๅบ”ไฝ็ฝฎใ€‚

cargo libc-test --arch riscv64

other-test

ๅฐ†ๅ…ถไป–ๆต‹่ฏ•้›†ๆ‹ท่ดๅˆฐ rootfs ็›ฎๅฝ•ๅฏนๅบ”ไฝ็ฝฎใ€‚

cargo other-test --arch riscv64

image

ไปŽ rootfs ็›ฎๅฝ•ๆž„ๅปบ Linux rootfs ้•œๅƒๆ–‡ไปถใ€‚

cargo image --arch riscv64

linux-libos

ๅœจ linux libos ๆจกๅผไธ‹ๅฏๅŠจ zCore ๅนถๆ‰ง่กŒไฝไบŽๆŒ‡ๅฎš่ทฏๅพ„็š„ๅบ”็”จ็จ‹ๅบใ€‚

NOTICE libos ๆจกๅผๅช่ƒฝๆ‰ง่กŒๅ•ไธชๅบ”็”จ็จ‹ๅบ๏ผŒๅฎŒๆˆๅฐฑไผš้€€ๅ‡บใ€‚

cargo linux-libos --args "/bin/busybox"

ๅฏไปฅ็›ดๆŽฅ็ป™ๅบ”็”จ็จ‹ๅบไผ ๅ‚ๆ•ฐ๏ผš

cargo linux-libos --args "/bin/busybox ls"

ๅนณๅฐๆ”ฏๆŒ

Qemu/virt

็›ดๆŽฅไฝฟ็”จๅ‘ฝไปคๅฏๅŠจ๏ผŒๅ‚่งๅฏๅŠจๅ†…ๆ ธๅ’Œ qemu ๅ‘ฝไปคใ€‚

ๅ…จๅฟ—/ๅ“ชๅ’

ไฝฟ็”จไปฅไธ‹ๅ‘ฝไปคๆž„้€ ็ณป็ปŸ้•œๅƒ๏ผš

cargo bin -m nezha -o z.bin

็„ถๅŽไฝฟ็”จ rustsbi-d1 ๅฐ†้•œๅƒ้ƒจ็ฝฒๅˆฐ Flash ๆˆ– DRAMใ€‚

ๅฆ: ๅฏไปฅๆŸฅ็œ‹README for D1 ๆ–‡ๆกฃ่Žท็Ÿฅๆ›ดๅคšD1ๅผ€ๅ‘ๆฟๆœ‰ๅ…ณ็š„ๆ“ไฝœๆŒ‡ๅฏผใ€‚

่ต›ๆ˜‰/ๆ˜Ÿๅ…‰

ไฝฟ็”จไปฅไธ‹ๅ‘ฝไปคๆž„้€ ็ณป็ปŸ้•œๅƒ๏ผš

cargo bin -m visionfive -o z.bin

็„ถๅŽๆ นๆฎๆญคๆ–‡ๆกฃ็š„่ฏฆ็ป†่ฏดๆ˜Ž้€š่ฟ‡ u-boot ็ฝ‘็ปœๅฏๅŠจ็ณป็ปŸใ€‚

ๆ™ถ่ง†/cr1825

ไฝฟ็”จไปฅไธ‹ๅ‘ฝไปคๆž„้€ ็ณป็ปŸ้•œๅƒ๏ผš

cargo bin -m cr1825 -o z.bin

็„ถๅŽ้€š่ฟ‡ u-boot ็ฝ‘็ปœๅฏๅŠจ็ณป็ปŸใ€‚

ๅ…ถไป–

More Repositories

1

rCore

Rust version of THU uCore OS. Linux compatible.
Rust
3,460
star
2

rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
Rust
1,633
star
3

rCore-Tutorial-Book-v3

A book about how to write OS kernels in Rust easily.
Python
1,220
star
4

rCore-Tutorial

Tutorial for rCore OS step by step (3rd edition)
Rust
462
star
5

virtio-drivers

VirtIO guest drivers in Rust.
Rust
208
star
6

rCore_tutorial

Tutorial for rCore OS step by step (2nd edition)
Rust
140
star
7

RVM

Rcore Virtual Machine
Rust
106
star
8

buddy_system_allocator

A buddy system allocator in pure Rust.
Rust
87
star
9

rCore_tutorial_doc

Tutorial doc for rCore OS step by step (2nd edition)
Rust
64
star
10

zCore-Tutorial

[WIP] Tutorial for zCore kernel.
Rust
57
star
11

RVM1.5

A Type-1.5 hypervisor written in Rust.
Rust
54
star
12

rcore-fs

The file system module for rCore OS.
Rust
48
star
13

rboot

The x86_64 UEFI bootloader for rCore
Rust
43
star
14

blog

rcore-os Developer Blog
Stylus
41
star
15

arceos-tutorial-book

39
star
16

rust-for-linux

Rust for Linux ่ฎพๅค‡้ฉฑๅŠจๅผ€ๅ‘
33
star
17

aCore

Asynchronous OS kernel written in Rust.
33
star
18

nvme_driver

Rust
30
star
19

trapframe-rs

Handle TrapFrame across kernel and user space on multiple ISAs.
Rust
30
star
20

learn-rust

22
star
21

zcore_tutorial_developers

zcore_tutorialๆ–‡ๆกฃๆ’ฐๅ†™ๅทฅไฝœไปฅๅŠๅ•ๅ…ƒๆต‹่ฏ•ๅทฅไฝœ็ป„
HTML
19
star
22

rcore-user

User programs for rCore OS
C
18
star
23

riscv-sbi-rt

A mininal runtime / startup for Supervisor Binary Interface (SBI) on RISC-V.
Rust
18
star
24

rcore-thread

Bare-metal multithreading on multi-core processor.
Rust
17
star
25

rCore-Tutorial-v3-arm64

Let's write an OS which can run on ARM in Rust from scratch! (๐ŸšงWIP)
Rust
15
star
26

bcm2837

Low level access to BCM2837 SoC on Raspberry Pi 3 Model B/B+
Rust
12
star
27

x86-smpboot

Booting multi-processors on x86 bare-metal.
Assembly
11
star
28

rCore-Tutorial-v3-x86_64

Let's write an OS which can run on x86_64 in Rust from scratch! (๐ŸšงWIP)
Rust
9
star
29

cpio

Freestanding CPIO file reader in Rust.
Rust
9
star
30

bitmap-allocator

Free space bitmap allocator
Rust
8
star
31

embedded-term

The virtual console embedded in rCore kernel.
Rust
8
star
32

apic-rs

Rust APIC crate for x86 kernel.
Rust
7
star
33

pci-rs

A platform-agnostic PCI bus management and configuration access library.
Rust
5
star
34

naive-timer

A minimal naive timer for embedded platforms (no_std) in Rust.
Rust
5
star
35

community

rCore-OS community
5
star
36

rlibc-opt

An optimized version of rlibc.
Rust
5
star
37

rcore-vmm

Virtual machine monitor app for rCore OS
C
5
star
38

riscv-sbi

Low level access to RISC-V Supervisor Binary Interface (SBI) implementations
Rust
4
star
39

isomorphic_drivers

A set of isomorphic drivers that can run both in kernel and user space without modifications.
Rust
3
star
40

software-hardware-analysis

3
star
41

rcore-lkm

Loadable Kernel Module for rCore OS
Rust
3
star
42

.github

3
star
43

rCore-Tutorial-deploy

Tutorial Doc for rCore OS step by step (3rd edition)
Rust
3
star
44

rcore_tutorial_tests

Rust
3
star
45

rcore-tutorial-book-code

Rust
3
star
46

e1000e-driver

Intel 82574L GbE Controller e1000e driver in Rust.
2
star
47

zircon-notes

Some analysis of zircon
2
star
48

testos

2
star
49

busybox-prebuilts

2
star
50

mem_malloc_subsystem

C
2
star
51

zcore-tests

Test scripts for zCore OS
Python
1
star
52

discussions

1
star
53

rcore-os.github.io

rCore-OS website
1
star