Skip to content

Commit 7b66a5d

Browse files
committed
feat: add ext4 support
1 parent 23f441e commit 7b66a5d

File tree

4 files changed

+33
-20
lines changed

4 files changed

+33
-20
lines changed

Cargo.lock

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ ifeq ($(ROOT_FS), fat32)
9292
mkdir mount/ -p
9393
sudo mount $(FS_IMG) mount/ -o uid=1000,gid=1000
9494
sudo rm -rf mount/*
95-
else ifeq ($(ROOT_FS), ext4)
95+
else ifeq ($(ROOT_FS), ext4_rs)
96+
mkfs.ext4 $(FS_IMG)
97+
mkdir mount/ -p
98+
sudo mount $(FS_IMG) mount/
99+
else
96100
mkfs.ext4 -F -O ^metadata_csum_seed $(FS_IMG)
97101
mkdir mount/ -p
98102
sudo mount $(FS_IMG) mount/

README.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,13 @@ Run with make file.
1111

1212
```shell
1313
# riscv64
14-
make ARCH=riscv64 run
14+
make BIN=riscv64-qemu run
1515
# aarch64
16-
make ARCH=aarch64 run
16+
make BIN=aarch64-qemu run
1717
# x86_64
18-
make ARCH=x86_64 run
18+
make BIN=x86_64-qemu run
1919
# loongarch64
20-
make ARCH=loongarch64 run
21-
```
22-
23-
Run with build tool.
24-
25-
```shell
26-
# riscv64
27-
byteos build byteos.toml riscv64-qemu
28-
# aarch64
29-
byteos build byteos.toml aarch64-qemu
30-
# x86_64
31-
byteos build byteos.toml x86_64-qemu
32-
# loongarch64
33-
byteos build byteos.toml loongarch64-qemu
20+
make BIN=loongarch64-qemu run
3421
```
3522

3623
You can find available modules using the following command.
@@ -45,7 +32,18 @@ byteos patch add arch
4532
byteos patch remove arch
4633
```
4734

48-
Additionally, you maybe need to careabout the workspace in the Cargo.toml(Improve it in the future).
35+
## byteos.yaml
36+
37+
> byteos.yaml is a configuration file for the ByteOS.
38+
39+
You can change the config in this file. For example, you want to use the ext4 fielsystem.
40+
41+
Set the root_fs to 'ext4' or 'ext4_rs' will change the root_fs from 'fat32' to 'ext4'.
42+
43+
The 'ext4' and 'ext4_rs' are the different implementation of the ext4.
44+
45+
TIPS: Make ensure that the mkefs version of your system lower than 1.70. If not, you have to use another argument to build the ext4 image.
46+
4947

5048
## Kernel struct Design
5149

byteos.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
global:
33
configs:
44
board: "qemu"
5+
# Available are fat32, ext4 and ext4_rs.
56
root_fs: "fat32"
67
env:
78
HEAP_SIZE: "0x0180_0000"

0 commit comments

Comments
 (0)