readme.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Introduction
  2. ============
  3. The qemu_aarch64_ebbr_defconfig is meant to illustrate some aspects of the Arm
  4. EBBR specification[1] and the Arm SystemReady IR[2] compliance program.
  5. It allows building an AArch64 U-Boot based firmware implementing the subset of
  6. UEFI defined by EBBR, as well as a Linux OS disk image booting with UEFI, to run
  7. on Qemu.
  8. Building
  9. ========
  10. $ make qemu_aarch64_ebbr_defconfig
  11. $ make
  12. Generated files under output/images:
  13. * flash.bin: A firmware image comprising TF-A, OP-TEE and the U-Boot bootloader.
  14. * disk.img: An OS disk image comprising the GRUB bootloader, the Linux kernel
  15. and the root filesystem.
  16. Running under Qemu
  17. ==================
  18. Run the emulation with:
  19. qemu-system-aarch64 \
  20. -M virt,secure=on,acpi=off \
  21. -bios output/images/flash.bin \
  22. -cpu cortex-a53 \
  23. -device virtio-blk-device,drive=hd0 \
  24. -device virtio-net-device,netdev=eth0 \
  25. -device virtio-rng-device,rng=rng0 \
  26. -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
  27. -m 2048 \
  28. -netdev user,id=eth0 \
  29. -nographic \
  30. -object rng-random,filename=/dev/urandom,id=rng0 \
  31. -rtc base=utc,clock=host \
  32. -smp 2 # qemu_aarch64_ebbr_defconfig
  33. The login prompt will appear in the terminal that started Qemu.
  34. Using the EBBR firmware to run another OS under Qemu
  35. ----------------------------------------------------
  36. It is possible to use the generated firmware binary to install or run another OS
  37. supporting the EBBR specification.
  38. To run another OS on emulation using a live or pre-installed image, use the same
  39. Qemu command line as for the generated OS but adapt the OS image path in the
  40. -drive stanza.
  41. The image generated by the aarch64_efi_defconfig or the Arm ACS-IR images[3] are
  42. examples of pre-installed OS images.
  43. To install another OS using an installer iso image, prepare a destination disk
  44. image first with:
  45. qemu-img create -f qcow2 disk.qcow2 10G
  46. Then run the OS installer iso image on emulation with:
  47. qemu-system-aarch64 \
  48. -M virt,secure=on,acpi=off \
  49. -bios output/images/flash.bin \
  50. -cpu cortex-a53 \
  51. -device virtio-blk-device,drive=hd1 \
  52. -device virtio-blk-device,drive=hd0 \
  53. -device virtio-net-device,netdev=eth0 \
  54. -device virtio-rng-device,rng=rng0 \
  55. -drive file=<iso>,if=none,format=raw,readonly=on,id=hd0 \
  56. -drive file=disk.qcow2,if=none,id=hd1 \
  57. -m 2048 \
  58. -netdev user,id=eth0 \
  59. -nographic \
  60. -object rng-random,filename=/dev/urandom,id=rng0 \
  61. -rtc base=utc,clock=host \
  62. -smp 2
  63. The installation medium will show up under the Linux OS installer as /dev/vda
  64. and the destination disk as /dev/vdb.
  65. To reboot into the installed OS, use the same Qemu command line as for the
  66. installation, but without the two stanzas
  67. referring to hd0.
  68. Linux distributions such as Debian, Fedora, openSUSE or Ubuntu provide an OS
  69. installer iso image.
  70. Miscellaneous
  71. =============
  72. This configuration is inspired by the qemu_aarch64_virt_defconfig, the
  73. aarch64_efi_defconfig and the Arm SystemReady IR IoT Integration, Test, and
  74. Certification Guide[4].
  75. Firmware update is currently not supported.
  76. [1]: https://github.com/ARM-software/ebbr
  77. [2]: https://developer.arm.com/Architectures/Arm%20SystemReady%20IR
  78. [3]: https://github.com/ARM-software/arm-systemready/tree/main/IR/prebuilt_images
  79. [4]: https://developer.arm.com/documentation/DUI1101/latest/