Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7562d46
feature: board abstraction and automation (init basic stuffs)
enkerewpo Mar 6, 2025
3e5ebff
feat: enhance gen_cargo_config.sh to locate hvisor source and include…
enkerewpo Mar 7, 2025
2e50046
refactor: move unittest locations
enkerewpo Mar 8, 2025
c030cf0
refactor: update build scripts and configurations for improved clarit…
enkerewpo Mar 8, 2025
4d0e673
feat: add platform-specific features and configurations for aarch64 p…
enkerewpo Mar 8, 2025
133421a
feat: add U-Boot binaries for aarch64 platforms and update cargo_test…
enkerewpo Mar 8, 2025
f4591d8
feat: add features information to gen_cargo_config.sh output
enkerewpo Mar 8, 2025
450e5ed
refactor: clean up cargo_test.sh by removing outdated comments and un…
enkerewpo Mar 8, 2025
e2d368b
optimize platform folder structure
enkerewpo Mar 10, 2025
1288049
feat: add BID variable to Makefile for dynamic ARCH and BOARD parsing
enkerewpo Mar 10, 2025
49c83fb
cleanup folder structure
enkerewpo Mar 10, 2025
b115c67
fix: add 'clean' target to test dependencies in Makefile
enkerewpo Mar 10, 2025
53ff415
refactor: remove unused files and update configuration scripts for cl…
enkerewpo Mar 12, 2025
c59357b
fix: disable systemtest job in CI workflow and enhance Makefile forma…
enkerewpo Mar 12, 2025
04754b3
fix: update CI workflow to install additional dependencies and specif…
enkerewpo Mar 12, 2025
818f17e
fix: update VSCode settings example to include additional Rust features
enkerewpo Mar 12, 2025
e2fb253
fix: remove unused 'iommu' feature and clean up config generation script
enkerewpo Mar 13, 2025
724fa90
fix: update zcu102 makefile and fixed build.rs bug
enkerewpo Mar 13, 2025
5027964
riscv64: compatible with platform-abstraction
liulog Mar 13, 2025
8fd7d8b
fix. remove iommu feature from zcu102 board
enkerewpo Mar 13, 2025
e34a81e
Merge pull request #122 from liulog/dev-board-abstract
enkerewpo Mar 13, 2025
c1607ad
feat: add DTS and Makefile support for various AArch64 and RISC-V pla…
enkerewpo Mar 13, 2025
d16d9f7
lsp: update toolchain to nightly-2024-05-05 to use latest rust-analyzer
enkerewpo Mar 13, 2025
b205bb2
test. locally tested qemu-gicv3 and gicv2 with root linux 6.14.0-rc4-…
enkerewpo Mar 13, 2025
a8e27d8
ci. update system test and locally tested
enkerewpo Mar 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cargo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config*
20 changes: 0 additions & 20 deletions .cargo/config

This file was deleted.

56 changes: 20 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
env:
MODE: debug
jobs:

linter:
name: linter
runs-on: ubuntu-latest
Expand All @@ -25,7 +24,14 @@ jobs:
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
targets: aarch64-unknown-none
components: rust-src rustfmt
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-aarch64 qemu-system-riscv64 gdb-multiarch llvm-dev libclang-dev wget
cargo install --version 0.3.0 cargo-binutils
cargo install cargo-xbuild
- name: Format Check
run: make fmt-test

Expand All @@ -39,23 +45,11 @@ jobs:
include:
# aarch64
- arch: aarch64
board: "qemu-gicv3"
rustc_target: aarch64-unknown-none
features: "platform_qemu,gicv3"
board: "qemu"
- arch: aarch64
board: "qemu-gicv2"
rustc_target: aarch64-unknown-none
features: "platform_qemu,gicv2"
board: "qemu"
# riscv64 will be supported in the future but not now,
# because our `make test` uses customized script to run tests, which need extra efforts to
# support riscv64

# - arch: riscv64
# rustc_target: riscv64gc-unknown-none-elf
# features: "platform_qemu,plic"
# - arch: riscv64
# rustc_target: riscv64gc-unknown-none-elf
# features: "platform_qemu,aia"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -73,7 +67,7 @@ jobs:
- name: Set up environment variables
run: |
echo "ARCH=${{ matrix.arch }}" >> $GITHUB_ENV
echo "FEATURES=${{ matrix.features }}" >> $GITHUB_ENV
echo "BOARD=${{ matrix.board }}" >> $GITHUB_ENV
- name: Unit Test
run: make test

Expand All @@ -88,35 +82,28 @@ jobs:
include:
# aarch64
- arch: aarch64
board: "qemu-gicv3"
rustc_target: aarch64-unknown-none
features: "platform_qemu,gicv3"
board: "qemu"
- arch: aarch64
board: "qemu-gicv2"
rustc_target: aarch64-unknown-none
features: "platform_qemu,gicv2"
board: "qemu"
- arch: aarch64
rustc_target: aarch64-unknown-none
features: "platform_zcu102,gicv2"
board: "zcu102"
rustc_target: aarch64-unknown-none
- arch: aarch64
board: "imx8mp"
rustc_target: aarch64-unknown-none
features: "platform_imx8mp,gicv3"
board: "qemu"
# riscv64
- arch: riscv64
board: "qemu-aia"
rustc_target: riscv64gc-unknown-none-elf
features: "platform_qemu,plic"
board: "qemu"
- arch: riscv64
board: "qemu-plic"
rustc_target: riscv64gc-unknown-none-elf
features: "platform_qemu,aia"
board: "qemu"
# loongarch64
- arch: loongarch64
board: "ls3a5000"
rustc_target: loongarch64-unknown-none
features: ""
board: "3a5000"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -137,13 +124,13 @@ jobs:
- name: Set up environment variables
run: |
echo "ARCH=${{ matrix.arch }}" >> $GITHUB_ENV
echo "FEATURES=${{ matrix.features }}" >> $GITHUB_ENV
echo "BOARD=${{ matrix.board }}" >> $GITHUB_ENV
- name: Build
run: make

# this job is for booting root and nonroot inside qemu for system test
systemtest:
if: false # we need to update corresponding scripts for the new board abstraction
name: systemtest
runs-on: ubuntu-latest
strategy:
Expand All @@ -153,9 +140,7 @@ jobs:
# aarch64
- arch: aarch64
rustc_target: aarch64-unknown-none
features: "platform_qemu,gicv3"
board: "qemu"
# currently supports only "platform_qemu,gicv3"
board: "qemu-gicv3"
# Because other features need to be customized scripts
steps:
- name: Checkout Repository
Expand All @@ -174,7 +159,6 @@ jobs:
- name: Set up environment variables
run: |
echo "ARCH=${{ matrix.arch }}" >> $GITHUB_ENV
echo "FEATURES=${{ matrix.features }}" >> $GITHUB_ENV
echo "BOARD=${{ matrix.board }}" >> $GITHUB_ENV
- name: Compile DTB
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ sd.img
flash.img*
.vscode/settings.json
compile.sh

src/platform/__board.rs
.config
2 changes: 1 addition & 1 deletion .vscode/settings-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
// "rust-analyzer.cargo.target": "loongarch64-unknown-none",
"rust-analyzer.checkOnSave.allTargets": false,
"rust-analyzer.cargo.features": [
"platform_qemu"
"gicv3 pl011 iommu pci pt_layout_qemu"
]
}
73 changes: 73 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 27 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,38 @@ riscv-decode = "0.2.1"
[target.'cfg(target_arch = "loongarch64")'.dependencies]
loongArch64 = "0.2.4"

[target.'cfg(target_arch = "x86_64")'.dependencies]
x86 = "0.52.0"
x86_64 = "=0.14.10"
x2apic = "0.4.3"
raw-cpuid = "10.7.0"

[features]
platform_qemu = []
platform_imx8mp = []
platform_zcu102 = []
gicv3 = []
############# aarch64 ##############
# irqchip driver
gicv2 = []
gicv3 = []
# uart driver
pl011 = []
xuartps = []
imx_uart = []
# functionality
iommu = []
pci = []
# pagetable layout
pt_layout_qemu = []
############## riscv64 #############
# irqchip driver
plic = []
aia = []
########### loongarch64 ############
# irqchip driver
loongson_7a2000 = []
# uart driver
loongson_uart = []


[profile.dev]
# panic = "abort" # avoid test compiler erros(still a bug for rust)
# panic = "abort" # avoid cargo test failure, this is a bug of cargo
debug = 2

[profile.release]
# panic = "abort"

[unstable]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins"]
Loading