build-xen 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env bash
  2. # TODO get working, aarch64 Xen integration attempt.
  3. # Current state: prints to Boot-wrapper v0.2 to screen and hangs.
  4. # Bibliography:
  5. # https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/qemu-system-aarch64
  6. # https://blog.xenproject.org/2014/04/01/virtualization-on-arm-with-xen/
  7. cd submodules/xen
  8. make \
  9. -j`nproc` \
  10. dist-xen \
  11. CONFIG_DEBUG=y \
  12. CONFIG_EARLY_PRINTK=vexpress \
  13. CROSS_COMPILE=aarch64-linux-gnu- \
  14. XEN_TARGET_ARCH=arm64 \
  15. ;
  16. cd ../boot-wraper-aarch64
  17. autoreconf -i
  18. # DTB dumped from QEMU with: -machine dumpdtb=dtb.dtb
  19. ./configure \
  20. --enable-gicv3 \
  21. --enable-psci \
  22. --host=aarch64-linux-gnu \
  23. --with-cmdline="console=hvc0 root=/dev/vda rw mem=1G" \
  24. --with-dtb=dtb.dtb \
  25. --with-kernel-dir=../../out/linux/default/aarch64 \
  26. --with-xen-cmdline="dtuart=/uart@1c090000 console=dtuart no-bootscrub dom0_mem=1G loglvl=all guest_loglvl=all" \
  27. --with-xen=../xen/xen/xen \
  28. ;
  29. dtb.dtb -j`nproc`
  30. ../../out/qemu/default/aarch64-softmmu/qemu-system-aarch64 \
  31. -M virt \
  32. -M virtualization=on \
  33. -cpu cortex-a57 \
  34. -kernel xen-system.axf \
  35. -serial mon:stdio \
  36. -nographic \
  37. ;