arm¶
Necessary artifacts
└── arm ├── lmp-factory-image-qemuarm.wic.gz └── u-boot-qemuarm.bin
Booting in QEMU¶
Warning
These instructions require QEMU 5.2 or later.
List available Targets and decide on which to boot:
fioctl targets list
Note
Make sure to set the FIOCTL_FACTORY environment variable:
export FIOCTL_FACTORY=<factory>
Make a directory to store the artifacts and
cd
into it.mkdir -p lmp-qemu/arm cd lmp-qemu/arm
Download the necessary artifacts for arm, replace
<target_number>
with the target you would like to boot# Download and extract the Factory image fioctl targets artifacts <target_number> qemuarm/lmp-factory-image-qemuarm.wic.gz | gunzip > lmp-factory-image-qemuarm.wic # Download ATF + OP-TEE + U-Boot binary fioctl targets artifacts <target_number> qemuarm/other/u-boot-qemuarm.bin > u-boot-qemuarm.bin
The directory tree should now look like this
lmp-qemu/ └── arm ├── lmp-factory-image-qemuarm.wic └── u-boot-qemuarm.bin
Run the QEMU script below against the artifacts inside of
lmp-qemu/
. You may want to save this asrun.sh
inside the directory for convenience
Note
The QEMU CLI passes the necessary flags and parameters to the appropriate qemu-system command, such as image, CPU, network, and other device information. For specifics, consult QEMU’s Documentation.
Booting Graphically¶
In order to boot QEMU with an OpenGL capable virtual GPU inside (required for Wayland/Weston), the following flags need to be added to the QEMU CLI:
-display gtk,gl=on -device virtio-gpu-pci
The -nographic
flag must also be removed from the QEMU CLI.
QEMU CLI¶
qemu-system-arm -machine virt,highmem=off -cpu cortex-a7 -m 1024M \
-bios u-boot-qemuarm.bin \
-serial mon:vc -serial null \
-drive id=disk0,file=lmp-factory-image-qemuarm.wic,if=none,format=raw -device virtio-blk-device,drive=disk0 \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet,hostfwd=tcp::22222-:22 \
-no-acpi -d unimp -nographic
Tip
It is possible to access QEMU via SSH by appending these parameters to the QEMU CLI command above:
-netdev user,id=net0,hostfwd=tcp::2222-:22
Then, run SSH with:
ssh -p 2222 fio@localhost