summaryrefslogtreecommitdiff
path: root/target/aarch64
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-08-07 12:26:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-08-07 12:27:57 +0200
commit429bcaddee4ad31c5b54ec206a98c30569e64477 (patch)
treea0aa0bfcd121880aacb18de9828422e81514cd39 /target/aarch64
parentde628247466db0a15bad2cc9e002dc36798169af (diff)
add basic support for qemu-aarch64
Diffstat (limited to 'target/aarch64')
-rw-r--r--target/aarch64/Makefile19
-rw-r--r--target/aarch64/kernel/qemu-aarch644
-rw-r--r--target/aarch64/systems/qemu-aarch6411
3 files changed, 34 insertions, 0 deletions
diff --git a/target/aarch64/Makefile b/target/aarch64/Makefile
index ac6922bef..cd4fb8f9a 100644
--- a/target/aarch64/Makefile
+++ b/target/aarch64/Makefile
@@ -9,6 +9,15 @@ include $(ADK_TOPDIR)/mk/image.mk
KERNEL:=${LINUX_DIR}/arch/arm64/boot/Image
+QEMU_ARGS:=${ADK_QEMU_ARGS}
+QEMU_ARGS+=-M virt -cpu cortex-a57 -smp 1
+ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
+QEMU_ARGS+=-net nic,model=virtio -net user
+endif
+ifeq ($(ADK_TARGET_FS),archive)
+QEMU_ARGS+=-drive file=qemu-${ADK_TARGET_CPU_ARCH}.img,if=virtio,index=0
+endif
+
# target helper text
ifeq ($(ADK_TARGET_FS),archive)
targethelp:
@@ -18,6 +27,10 @@ ifeq ($(ADK_TARGET_FS),initramfs)
targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
ifeq ($(ADK_TARGET_FS),initramfsarchive)
targethelp:
@@ -31,11 +44,16 @@ ifeq ($(ADK_TARGET_SYSTEM_ARM_FM),y)
@echo 'Start emulator via:'
@echo 'Foundation_v8 --image=$(FW_DIR)/${TARGET_KERNEL}'
endif
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
endif
kernel-strip:
kernel-install: kernel-strip
+ifeq ($(ADK_TARGET_SYSTEM_ARM_FM),y)
cd $(ADK_TOPDIR) && \
make -f Makefile \
-C package/boot-wrapper-aarch64 clean
@@ -44,6 +62,7 @@ kernel-install: kernel-strip
-C package/boot-wrapper-aarch64 package
${CP} ${LINUX_DIR}/linux-system.axf \
$(FW_DIR)/$(TARGET_KERNEL)
+endif
# filesystem specific targets
ifeq ($(ADK_TARGET_FS),archive)
diff --git a/target/aarch64/kernel/qemu-aarch64 b/target/aarch64/kernel/qemu-aarch64
new file mode 100644
index 000000000..fa3f8dc13
--- /dev/null
+++ b/target/aarch64/kernel/qemu-aarch64
@@ -0,0 +1,4 @@
+CONFIG_ARM64=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
diff --git a/target/aarch64/systems/qemu-aarch64 b/target/aarch64/systems/qemu-aarch64
new file mode 100644
index 000000000..fc41d30d9
--- /dev/null
+++ b/target/aarch64/systems/qemu-aarch64
@@ -0,0 +1,11 @@
+config ADK_TARGET_SYSTEM_QEMU_AARCH64
+ bool "Qemu Emulator"
+ select ADK_aarch64
+ select ADK_qemu_aarch64
+ select ADK_little
+ select ADK_LINUX_64
+ select ADK_TARGET_QEMU
+ select ADK_TARGET_KERNEL_IMAGE
+ help
+ Qemu Emulator for AARCH64 architecture.
+