Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions Boot-on-qemu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Compile AxVisor

* get deps
```bash
./tool/dev_env.py
cd crates/arceos && git checkout rk3588_jd4_qemu
cd crates/axvm && git checkout ivc
cd crates/axvcpu && git checkout ivc
cd crates/arm_vcpu && git checkout ivc_and_4lpt
cd crates/axaddrspace && git checkout 4_level_paging
cd crates/axhvc && git checkout ivc
```


```bash
make ARCH=aarch64 LOG=info VM_CONFIGS=configs/vms/linux-qemu-aarch64.toml:configs/vms/arceos-aarch64.toml GICV3=y NET=y SMP=2 run DISK_IMG=/home/hky/workspace/Linux/ubuntu-22.04-rootfs_ext4.img SECOND_SERIAL=y

telnet localhost 4321
```

## Test AxVisor IVC

* Compile arceos ivc tester as guest VM 2

repo: https://github.com/arceos-hypervisor/arceos/tree/ivc_tester

```bash
make ARCH=aarch64 A=examples/ivc_tester defconfig
make ARCH=aarch64 A=examples/ivc_tester build
# You can get `examples/ivc_tester/ivc_tester_aarch64-qemu-virt.bin`,
# whose path should be set to `kernel_path` field in `configs/vms/arceos-aarch64.toml`.
```

* Build and install axvisor-driver

```bash
git clone [email protected]:arceos-hypervisor/axvisor-tools.git --branch ivc
```

see its [README](https://github.com/arceos-hypervisor/axvisor-tools/blob/ivc/axvisor-driver/README.md) about how to compile it and how to subscribe messages from guest ArceOS's ivc publisher.
65 changes: 65 additions & 0 deletions Boot-on-rk3588.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Setup TFTP Server

```bash
sudo apt-get install tftpd-hpa tftp-hpa
sudo chmod 777 /srv/tftp
```

judge if TFTP works

```bash
echo "TFTP Server Test" > /srv/tftp/testfile.txt
tftp localhost
tftp> get testfile.txt
tftp> quit
cat testfile.txt
```

You should see `TFTP Server Test` on your screen.

## Compile device tree

```bash
dtc -o aio-rk3588-jd4.dtb -O dtb -I dts aio-rk3588-jd4.dts
```

## Prepare Linux kernel bianry

```bash
scp [email protected]:/home/xxx/firefly_rk3588_SDK/kernel/arch/arm64/boot/Image configs/vms/Image.bin
```

## Compile AxVisor

* get deps
```bash
./tool/dev_env.py
cd crates/arceos && git checkout rk3588_jd4
```

* compile

```bash
make ARCH=aarch64 PLATFORM=configs/platforms/aarch64-rk3588j-hv.toml defconfig
make ARCH=aarch64 PLATFORM=configs/platforms/aarch64-rk3588j-hv.toml VM_CONFIGS=configs/vms/linux-rk3588-aarch64-smp.toml LOG=debug GICV3=y upload
```

* copy to tftp dir (make xxx upload will copy the image to `/srv/tftp/axvisor` automatically)

```bash
cp axvisor_aarch64-rk3588j.img /srv/tftp/axvisor
```

## rk3588 console

上电,在 uboot 中 ctrl+C

```bash
# 这是 tftp 服务器所在的主机 ip
setenv serverip 192.168.50.97
# 这是 rk3588 所在设备的 ip (Firefly Linux 自己 DHCP 拿到的地址)
setenv ipaddr 192.168.50.8
# 使用 tftp 加载镜像到指定内存地址并 boot
setenv serverip 192.168.50.97;setenv ipaddr 192.168.50.8;tftp 0x00480000 ${serverip}:axvisor;tftp 0x10000000 ${serverip}:rk3588_dtb.bin;bootm 0x00480000 - 0x10000000;
```
tftp 0x00480000 ${serverip}:Image.bin;tftp 0x10000000 ${serverip}:rk3588_dtb.bin;bootm 0x00480000 - 0x10000000;
65 changes: 35 additions & 30 deletions Cargo.lock

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

Loading
Loading