Skip to content

Commit 8e72ecf

Browse files
committed
Merge remote-tracking branch 'origin/next2' into rewrite2
2 parents 70eb5fd + fecfd42 commit 8e72ecf

Some content is hidden

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

46 files changed

+3282
-540
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
args = [
2+
"-nographic",
3+
"-cpu",
4+
"cortex-a72",
5+
"-machine",
6+
"virt,virtualization=on,gic-version=3",
7+
"-smp",
8+
"4",
9+
"-append",
10+
"root=/dev/vda rw init=/init",
11+
"-m",
12+
"8g",
13+
]
14+
fail_regex = []
15+
success_regex = ["Hello, world!"]
16+
to_bin = true
17+
uefi = false

.github/workflows/test.yml renamed to .github/workflows/test-board.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Test CI
1+
name: Test for BOARD
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
board-test:
7-
name: "Test ${{ matrix.board }} - ${{ matrix.vmconfigs_name }}"
6+
test-board:
7+
name: "Test board: ${{ matrix.board }} - ${{ matrix.vmconfigs_name }}"
88
strategy:
99
matrix:
1010
include:
@@ -14,21 +14,21 @@ jobs:
1414
- board: phytiumpi
1515
vmconfigs: configs/vms/arceos-aarch64-e2000-smp1.toml
1616
vmconfigs_name: ArceOS
17-
vmimage_name: phytiumpi_arceos.tar.gz
17+
vmimage_name: phytiumpi_arceos
1818
- board: phytiumpi
1919
vmconfigs: configs/vms/linux-aarch64-e2000-smp1.toml
2020
vmconfigs_name: Linux
21-
vmimage_name: phytiumpi_linux.tar.gz
21+
vmimage_name: phytiumpi_linux
2222
- board: roc-rk3568-pc
2323
vmconfigs: configs/vms/arceos-aarch64-rk3568-smp1.toml
2424
vmconfigs_name: ArceOS
25-
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
26-
vmimage_name: roc-rk3568-pc_arceos.tar.gz
25+
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos,roc-rk3568-pc_linux[,...]
26+
vmimage_name: roc-rk3568-pc_arceos
2727
- board: roc-rk3568-pc
2828
vmconfigs: configs/vms/linux-aarch64-rk3568-smp1.toml
2929
vmconfigs_name: Linux
30-
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos.tar.gz,roc-rk3568-pc_linux.tar.gz[,...]
31-
vmimage_name: roc-rk3568-pc_linux.tar.gz
30+
# Multiple image archive names separated by commas, for example, roc-rk3568-pc_arceos,roc-rk3568-pc_linux[,...]
31+
vmimage_name: roc-rk3568-pc_linux
3232
fail-fast: false
3333
runs-on:
3434
- self-hosted
@@ -39,26 +39,22 @@ jobs:
3939
- name: Checkout
4040
uses: actions/checkout@v4
4141

42-
- name: Install dependencies (${{ matrix.board_name }})
42+
- name: Install dependencies
4343
run: cargo +stable install -f --git https://github.com/ZR233/ostool ostool
4444

4545
- name: Download images and patch VM configs
4646
run: |
4747
echo "Downloading guest images and patching VM config files..."
48-
mkdir -p /tmp/images
4948
IFS=',' read -ra CONFIGS <<< "${{ matrix.vmconfigs }}"
5049
IFS=',' read -ra IMAGES <<< "${{ matrix.vmimage_name }}"
5150
for i in "${!CONFIGS[@]}"; do
5251
img="${IMAGES[$i]}"
5352
img=$(echo "$img" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
5453
config="${CONFIGS[$i]}"
5554
config=$(echo "$config" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
56-
img_name="${img%.tar.gz}"
57-
58-
echo "Downloading $img and patching $config..."
59-
wget -P /tmp/images https://github.com/arceos-hypervisor/axvisor-guest/releases/latest/download/$img
60-
tar -xzf /tmp/images/$img -C /tmp/images
61-
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/images/'"$img_name"'"|' "$config"
55+
cargo xtask image download $img
56+
img_name="${{ matrix.board }}"
57+
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img_name"'"|' "$config"
6258
echo "Updated kernel_path in $config"
6359
done
6460

.github/workflows/test-qemu.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Test for QEMU
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
test-qemu:
7+
name: "Test qemu: ${{ matrix.arch }} - ${{ matrix.vmconfigs_name }}"
8+
strategy:
9+
matrix:
10+
include:
11+
- arch: aarch64
12+
vmconfigs: configs/vms/arceos-aarch64-qemu-smp1.toml
13+
vmconfigs_name: ArceOS
14+
vmimage_name: qemu_arceos_aarch64
15+
# - arch: riscv64
16+
# vmconfigs: configs/vms/arceos-riscv64-qemu-smp1.toml
17+
# vmconfigs_name: ArceOS
18+
# vmimage_name: qemu_arceos_riscv64
19+
# - arch: x86_64
20+
# vmconfigs: configs/vms/arceos-x86_64-qemu-smp1.toml
21+
# vmconfigs_name: ArceOS
22+
# vmimage_name: qemu_arceos_x86_64
23+
fail-fast: false
24+
runs-on:
25+
- self-hosted
26+
- linux
27+
- intel
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Install dependencies
34+
run: cargo +stable install -f --git https://github.com/ZR233/ostool ostool
35+
36+
- name: Download images and patch VM configs
37+
run: |
38+
echo "Downloading guest images and patching VM config files..."
39+
IFS=',' read -ra CONFIGS <<< "${{ matrix.vmconfigs }}"
40+
IFS=',' read -ra IMAGES <<< "${{ matrix.vmimage_name }}"
41+
for i in "${!CONFIGS[@]}"; do
42+
img="${IMAGES[$i]}"
43+
img=$(echo "$img" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
44+
config="${CONFIGS[$i]}"
45+
config=$(echo "$config" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
46+
cargo xtask image download $img
47+
img_name="qemu-${{ matrix.arch }}"
48+
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img_name"'"|' "$config"
49+
echo "Updated kernel_path in $config"
50+
done
51+
52+
- name: Run tests
53+
run: |
54+
export RUST_LOG=debug
55+
cargo xtask qemu \
56+
--build-config configs/board/qemu-${{ matrix.arch }}.toml \
57+
--qemu-config .github/workflows/qemu-${{ matrix.arch }}.toml \
58+
--vmconfigs ${{ matrix.vmconfigs }}

.github/workflows/uboot.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ fail_regex = [
77
]
88
serial = "${env:BOARD_COMM_UART_DEV}"
99
success_regex = [
10-
"Welcome to AxVisor Shell!",
11-
"All tests passed!",
10+
"Welcome to AxVisor Shell!",
11+
"All tests passed!",
1212
"Hello World!",
1313
"root@firefly:~#",
1414
"root@phytium-Ubuntu:~#",
15+
"Welcome to Phytium Buildroot",
16+
"Last login: *",
1517
]
1618

1719
[net]

Cargo.lock

Lines changed: 87 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ axstd = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.
4343
"irq",
4444
"multitask",
4545
"smp", # "page-alloc-64g",
46-
"myplat",
47-
"driver-dyn",
48-
# "alloc-buddy"
4946
]}
5047

5148
axalloc = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.4.1"}

configs/board/orangepi-5-plus.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
cargo_args = []
22
features = [
3-
# "ept-level-4",
4-
"axstd/myplat",
5-
"axstd/bus-mmio",
6-
"driver/sdmmc",
7-
"driver/rk3588-clk",
8-
"fs",
3+
# "ept-level-4",
4+
"dyn-plat",
5+
"axstd/bus-mmio",
6+
"driver/sdmmc",
7+
"driver/rk3588-clk",
8+
"fs",
99
]
1010
log = "Info"
1111
target = "aarch64-unknown-none-softfloat"
1212
to_bin = true
13-
vm_configs = []
13+
vm_configs = []

configs/board/phytiumpi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cargo_args = []
22
features = [
33
# "ept-level-4",
4-
"axstd/myplat",
4+
"dyn-plat",
55
"axstd/bus-mmio",
66
]
77
log = "Info"

configs/board/qemu-aarch64.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cargo_args = []
22
features = [
3-
# "ept-level-4",
4-
"axstd/myplat",
3+
"ept-level-4",
54
"axstd/bus-mmio",
5+
"dyn-plat",
66
]
77
log = "Info"
88
target = "aarch64-unknown-none-softfloat"

0 commit comments

Comments
 (0)