Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4.2.2 Flash AGL minimal image root file system to the second partition on SD-Card or eMMC.

Ex. SD-Card (/dev/sdb)

$ cd build-virtio-aarch64/tmp/deploy/images/virtio-aarch64
$ sudo dd if=agl-image-boot-basesystem-virtio-aarch64.ext4 of=/dev/sdb2

4.2.3 Build AGL minimal image for AGL Reference Hardware.

$ source meta-agl/scripts/aglsetup.sh -m h3ulcb -b build-h3ulcb agl-demo agl-refhw-h3

In build-h3ulcb/conf/local.conf add

...

Add virtio kernel to the AGL Reference Hardware Linux rootfs:

$ cp build-virtio-aarch64/tmp/deploy/images/virtio-aarch64/Image build-h3ulcb/tmp/work/h3ulcb-agl-linux/agl-image-minimal/1.0-r0/rootfs/linux2
$ bitbake agl-image-minimal -c image_ext4 -f
$ bitbake agl-image-minimal -c image_complete

Flash root file system to the first partition on SD-Card or eMMC.
Ex. SD-Card (/dev/sdb)

...

4.2.5 Run QEMU from Linux 1 command line

Ex.

taskset f qemu-system-aarch64 \
    -machine virt \
    -cpu cortex-a57 \
    -m 2048 \
    -serial mon:stdio \
    -global virtio-mmio.force-legacy=false \
    -drive id=disk0,file=/dev/mmcblk1p2,if=none,format=raw \
    -device virtio-blk-device,drive=disk0 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-device,rng=rng0 \
    -nographic \
    -kernel /linux2 \
    -append 'root=/dev/vda rw mem=2048M' \
    -enable-kvm \
    -device virtio-mouse-device \
    -object input-linux,id=mouse1,evdev=/dev/input/by-path/platform-ee080000.usb-usb-0:1:1.0-event-mouse \
    -device virtio-net-device,netdev=net0 \
    -netdev user,id=net0,net=192.168.10.0/24

NOTE: mmcblk1p2 above is used for when root file system is flashed on SD-Card.
NOTE: To enable KVM using -enable-kvm option, use taskset command to bind a process to a given set of CPUs on the system.