1*4882a593Smuzhiyun 2*4882a593SmuzhiyunThe aarch64_efi_defconfig allows to build a minimal Linux system that 3*4882a593Smuzhiyuncan boot on all AArch64 servers providing an EFI firmware. 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThis includes all Arm EBBR[1] compliant systems, and all Arm SystemReady[2] 6*4882a593Smuzhiyuncompliant systems for example. 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunBuilding and booting 10*4882a593Smuzhiyun==================== 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun$ make aarch64_efi_defconfig 13*4882a593Smuzhiyun$ make 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe file output/images/disk.img is a complete disk image that can be 16*4882a593Smuzhiyunbooted, it includes the grub2 bootloader, Linux kernel and root 17*4882a593Smuzhiyunfilesystem. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunTesting under Qemu 20*4882a593Smuzhiyun================== 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunThis image can also be tested using Qemu: 23*4882a593Smuzhiyun 24*4882a593Smuzhiyunqemu-system-aarch64 \ 25*4882a593Smuzhiyun -M virt \ 26*4882a593Smuzhiyun -cpu cortex-a57 \ 27*4882a593Smuzhiyun -m 512 \ 28*4882a593Smuzhiyun -nographic \ 29*4882a593Smuzhiyun -bios </path/to/QEMU_EFI.fd> \ 30*4882a593Smuzhiyun -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ 31*4882a593Smuzhiyun -device virtio-blk-device,drive=hd0 \ 32*4882a593Smuzhiyun -netdev user,id=eth0 \ 33*4882a593Smuzhiyun -device virtio-net-device,netdev=eth0 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunNote that </path/to/QEMU_EFI.fd> needs to point to a valid aarch64 UEFI 36*4882a593Smuzhiyunfirmware image for qemu. 37*4882a593SmuzhiyunIt may be provided by your distribution as a edk2-aarch64 or AAVMF 38*4882a593Smuzhiyunpackage, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd . 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunU-Boot based qemu firmware 41*4882a593Smuzhiyun========================== 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunA qemu firmware with support for UEFI based on U-Boot can be built following 44*4882a593Smuzhiyunthe instructions in [3], with qemu_arm64_defconfig. 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunThis should give you a nor_flash.bin, which you can use with qemu as an 47*4882a593Smuzhiyunalternative to QEMU_EFI.fd. You will also need to change the machine 48*4882a593Smuzhiyunspecification to "-M virt,secure" on qemu command line, to enable TrustZone 49*4882a593Smuzhiyunsupport, and you will need to increase the memory with "-m 1024". 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun[1]: https://github.com/ARM-software/ebbr 52*4882a593Smuzhiyun[2]: https://developer.arm.com/architectures/system-architectures/arm-systemready 53*4882a593Smuzhiyun[3]: https://github.com/glikely/u-boot-tfa-build 54