aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGravatar Erico Nunes <nunes.erico@gmail.com>2018-09-27 00:37:18 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-26 21:11:08 +0100
commit9fb2a489598e82497f79f144b2374241e4912575 (patch)
treed80faba2ca72ad41c4500e29bb6a26c086e977b8 /board
parent273a27804a18c5e232907d5ef6bd01957cf090d7 (diff)
downloadbuildroot-9fb2a489598e82497f79f144b2374241e4912575.tar.gz
buildroot-9fb2a489598e82497f79f144b2374241e4912575.tar.bz2
configs/aarch64_efi_defconfig: new defconfig
New generic defconfig for aarch64, to run on aarch64 servers compliant with EFI firmware and ACPI. This can also be tested with qemu, and is useful so that we have an arm defconfig with grub enabled. Tested with qemu 2.11.2 and AAVMF, the aarch64 virtual machine UEFI firmware. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> [Thomas: extend readme.txt with more details] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'board')
-rw-r--r--board/aarch64-efi/genimage-efi.cfg30
-rw-r--r--board/aarch64-efi/grub.cfg6
-rwxr-xr-xboard/aarch64-efi/post-image.sh5
-rw-r--r--board/aarch64-efi/readme.txt34
4 files changed, 75 insertions, 0 deletions
diff --git a/board/aarch64-efi/genimage-efi.cfg b/board/aarch64-efi/genimage-efi.cfg
new file mode 100644
index 0000000000..f93ab9d64f
--- /dev/null
+++ b/board/aarch64-efi/genimage-efi.cfg
@@ -0,0 +1,30 @@
+image efi-part.vfat {
+ vfat {
+ file startup.nsh {
+ image = "efi-part/startup.nsh"
+ }
+ file EFI {
+ image = "efi-part/EFI"
+ }
+ file Image {
+ image = "Image"
+ }
+ }
+ size = 32M
+}
+
+image disk.img {
+
+ hdimage {
+ }
+
+ partition boot {
+ partition-type = 0xEF
+ image = "efi-part.vfat"
+ }
+
+ partition root {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ }
+}
diff --git a/board/aarch64-efi/grub.cfg b/board/aarch64-efi/grub.cfg
new file mode 100644
index 0000000000..ab88da91b9
--- /dev/null
+++ b/board/aarch64-efi/grub.cfg
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+ linux /Image root=/dev/vda2 rootwait console=ttyAMA0
+}
diff --git a/board/aarch64-efi/post-image.sh b/board/aarch64-efi/post-image.sh
new file mode 100755
index 0000000000..f0214dc866
--- /dev/null
+++ b/board/aarch64-efi/post-image.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+
+cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
diff --git a/board/aarch64-efi/readme.txt b/board/aarch64-efi/readme.txt
new file mode 100644
index 0000000000..65a6345b6c
--- /dev/null
+++ b/board/aarch64-efi/readme.txt
@@ -0,0 +1,34 @@
+
+The aarch64_efi_defconfig allows to build a minimal Linux system that
+can boot on all AArch64 servers providing an EFI firmware and ACPI.
+
+Building and booting
+====================
+
+$ make aarch64_efi_defconfig
+$ make
+
+The file output/images/disk.img is a complete disk image that can be
+booted, it includes the grub2 bootloader, Linux kernel and root
+filesystem.
+
+Testing under Qemu
+==================
+
+This image can also be tested using Qemu:
+
+qemu-system-aarch64 \
+ -M virt \
+ -cpu cortex-a57 \
+ -m 512 \
+ -nographic \
+ -bios </path/to/QEMU_EFI.fd> \
+ -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
+ -device virtio-blk-device,drive=hd0 \
+ -netdev user,id=eth0 \
+ -device virtio-net-device,netdev=eth0
+
+Note that </path/to/QEMU_EFI.fd> needs to point to a valid aarch64 UEFI
+firmware image for qemu.
+It may be provided by your distribution as a edk2-aarch64 or AAVMF
+package, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd .