...
Flash TRS images on Rockpi4b platform
We need to copy TRS wic image trs-image-trs-qemuarm64.wic
on AVA with Ubuntu system, then we can execuate below shell script to flash TRS images onto a USB disk with command ./flash_ewaol_image.sh /dev/nvmeXnY
(you might need to change the nvme block device name nvmeXnY
based on your local environment).
Below is the source code for flash_ewaol_image.sh
. Note, the script executes commands e2fsck
and resize2fs
to enlarge the partition size, when you use older version’s binary for e2fsck
and resize2fs
, it will fail and report errors. In this case, you need to download e2fsprogs
package (version 1.47.0 is verified) and build these two binaries.
Code Block |
---|
sudo dd if=deploy-trs-qemuarm64/trs-image-trs-qemuarm64.rootfs-20231030085931.wic of=/dev/<usb dev> bs=8M conv=fdatasync,notrunc |
...
By following up the steps described in Xen: porting Android Cuttlefish on Xen Virtual Machine, we can get the Android Cuttlefish images, then we need to copy the U-boot binary and Cuttlefish images into to /home/leoy of USB-disk on PC. You Then you can increase the 2nd partition of USB-disk and create /home/leoy to hold android images as page Xen: maintenance Xen and QEMU repos for TRS https://linaro.atlassian.net/wiki/spaces/AUT/pages/28960981135/Xen+maintenance+Xen+and+QEMU+repos+for+TRS#Flash-TRS-images-on-AVA-platform . Or create the 3rd partition and copy the android images into it, you need to mount it to /home/leoy Then we can use on rockpi4b in runtime in this way.
With below Xen configuration file to saved on rockpi4b, you can launch Xen virtual machine with command xl -vvv create aaos_vm.cfg -c
:
Code Block |
---|
# Copyright (c) 2022, Arm Limited. # # SPDX-License-Identifier: MIT name = "aaos-vm" memory = 2048 vcpus = 4 extra = " earlyprintk=xenboot console=hvc0 rw androidboot.console=hvc0 androidboot.serialconsole=1" root = "/dev/xvda2" kernel = "/home/leoy/u-boot.bin" disk = ['format=qcow2, vdev=xvda, access=rw, target=/home/leoy/android-cf-mainline/cf/cuttlefish/instances/cvd-1/overlay.img', 'format=raw, vdev=xvdb, access =rw, target=/home/leoy/android-cf-mainline/cf/cuttlefish/instances/cvd-1/persistent_composite.img', 'format=raw, vdev=xvdc, access=rw, target=/home/leoy/andr oid-cf-mainline/cf/cuttlefish/instances/cvd-1/sdcard.img'] vif = ['mac=00:16:3E:74:34:32', 'mac=00:16:3e:5f:48:e4', 'mac=00:16:3E:74:34:32,script=vif-bridge,bridge=xenbr0'] virtio = ['transport=pci, backend_type=qemu, bdf=00:00.0'] |
Issues on rockpi4b
The USB disk read speed in U-boot is very slow. It takes about 2 or 3 minutes to load Linux and ramfs binary.
The CPU/memory performance in Dom0 and DomU is only about 1/3 of native Linux. It takes about 1 hour to run into Android UI.