Skip to content

Commit f9af4f7

Browse files
committed
添加客户机文件系统
1 parent ae4d790 commit f9af4f7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/qemu-aarch64.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ args = [
66
"virt,virtualization=on,gic-version=3",
77
"-smp",
88
"4",
9+
"-device",
10+
"virtio-blk-device,drive=disk0",
11+
"-drive",
12+
"id=disk0,if=none,format=raw,file=${ROOTFS_DIR}/rootfs.img",
913
"-append",
1014
"root=/dev/vda rw init=/init",
1115
"-m",
1216
"8g",
1317
]
1418
fail_regex = []
15-
success_regex = ["Hello, world!"]
19+
success_regex = []
1620
to_bin = true
1721
uefi = false

.github/workflows/test-qemu.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ jobs:
4747
img_name="qemu-${{ matrix.arch }}"
4848
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img_name"'"|' "$config"
4949
echo "Updated kernel_path in $config"
50+
51+
# Check if rootfs.img exists and export ROOTFS_DIR if it does
52+
if [ -f "/tmp/axvisor/$img/rootfs.img" ]; then
53+
ROOTFS_DIR="/tmp/axvisor/$img"
54+
echo "ROOTFS_DIR=$ROOTFS_DIR" >> $GITHUB_ENV
55+
echo "Found rootfs.img at /tmp/axvisor/$img/, exported ROOTFS_DIR=$ROOTFS_DIR"
56+
fi
5057
done
5158
5259
- name: Run tests

0 commit comments

Comments
 (0)