Skip to content

Commit 75b340f

Browse files
authored
Merge pull request rcore-os#229 from equation314/refactor-kernel-hal
Refactor kernel-hal
2 parents 48585cc + e1fb260 commit 75b340f

File tree

147 files changed

+4227
-4423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+4227
-4423
lines changed

.github/workflows/rustc20210727.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: current CI
22

3-
on:
3+
on:
44
push:
55
pull_request:
66
schedule:
@@ -11,21 +11,29 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- uses: actions/checkout@v2
14+
with:
15+
submodules: 'recursive'
1416
- uses: actions-rs/toolchain@v1
1517
with:
1618
profile: minimal
1719
toolchain: nightly-2021-07-27
1820
override: true
19-
components: rustfmt, clippy
21+
components: rust-src, rustfmt, clippy
2022
- name: Check code format
2123
uses: actions-rs/cargo@v1
2224
with:
2325
command: fmt
2426
args: --all -- --check
25-
- name: Clippy x86_64
27+
- name: Clippy LibOS
2628
run: arch=x86_64 cargo clippy
27-
- name: Clippy riscv64
28-
run: arch=riscv64 cargo clippy
29+
- name: Clippy x86_64 bare-metal
30+
run: |
31+
cd zCore
32+
make clippy arch=x86_64
33+
- name: Clippy riscv64 bare-metal
34+
run: |
35+
cd zCore
36+
make clippy arch=riscv64 linux=1
2937
# uses: actions-rs/cargo@v1
3038
# with:
3139
# command: clippy
@@ -52,7 +60,7 @@ jobs:
5260
- name: Build zCore
5361
run: |
5462
cd zCore
55-
make build arch=x86_64
63+
make build arch=x86_64
5664
# FIX LATER
5765
# - name: Build zCore with hypervisor
5866
# run: |
@@ -203,6 +211,7 @@ jobs:
203211
- name: Run libc-tests
204212
run: |
205213
cd scripts
214+
pip3 install -r requirements.txt
206215
python3 libc-tests.py
207216
cat linux/test-result.txt
208217
@@ -275,6 +284,8 @@ jobs:
275284
tar xJf qemu-share.tar.xz && sudo cp -r qemu /usr/local/share/
276285
- name: Prepare rootfs and oscomp
277286
run: make riscv-image
287+
- name: Build kernel
288+
run: cd zCore && make build mode=release linux=1 arch=riscv64
278289
- name: Run baremetal-libc-test
279290
run: |
280291
cd scripts

.github/workflows/rustcnightly.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rustcnightly CI
22

3-
on:
3+
on:
44
push:
55
pull_request:
66
schedule:
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build zCore
5656
run: |
5757
cd zCore
58-
make build arch=x86_64
58+
make build arch=x86_64
5959
# FIX LATER
6060
# - name: Build zCore with hypervisor
6161
# run: |
@@ -212,6 +212,7 @@ jobs:
212212
- name: Run libc-tests
213213
run: |
214214
cd scripts
215+
pip3 install -r requirements.txt
215216
python3 libc-tests.py
216217
cat linux/test-result.txt
217218
@@ -289,6 +290,8 @@ jobs:
289290
tar xJf qemu-share.tar.xz && sudo cp -r qemu /usr/local/share/
290291
- name: Prepare rootfs and oscomp
291292
run: make riscv-image
293+
- name: Build kernel
294+
run: cd zCore && make build mode=release linux=1 arch=riscv64
292295
- name: Run baremetal-libc-test
293296
run: |
294297
cd scripts

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Cargo.lock
88
/prebuilt/linux/riscv64/prebuild*
99
.idea
1010
scripts/linux/test-result.txt
11+
scripts/zircon/test-result.txt
12+
scripts/zircon/test-output.txt
1113
rusty-tags.vi
1214
*.img
1315
zCore/src/link_user.S
@@ -17,4 +19,3 @@ stdout-zcore
1719
scripts/script.sh
1820
stdout-baremetal-test-rv64
1921
stdout-rv64
20-

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
[workspace]
22
members = [
33
"zircon-object",
4+
"zircon-syscall",
45
"zircon-loader",
56
"linux-object",
6-
"zircon-syscall",
7+
"linux-syscall",
78
"linux-loader",
8-
"kernel-hal-unix",
99
"kernel-hal",
1010
]
1111

1212
exclude = [
1313
"zircon-user",
1414
"zCore",
1515
"rboot",
16-
"linux-syscall",
17-
"kernel-hal-bare",
1816
]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ riscv-image: rcore-fs-fuse riscv-rootfs
6767
@echo building riscv.img
6868
@rcore-fs-fuse zCore/riscv64.img riscv_rootfs zip
6969
@qemu-img resize -f raw zCore/riscv64.img +5M
70-
70+
7171
clean:
7272
cargo clean
7373
find zCore -maxdepth 1 -name "*.img" -delete

kernel-hal-bare/Cargo.toml

Lines changed: 0 additions & 45 deletions
This file was deleted.

kernel-hal-bare/src/arch/mod.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

kernel-hal-bare/src/arch/riscv/consts.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)