diff options
-rw-r--r-- | target/aarch64/Makefile | 19 | ||||
-rw-r--r-- | target/aarch64/kernel/qemu-aarch64 | 4 | ||||
-rw-r--r-- | target/aarch64/systems/qemu-aarch64 | 11 | ||||
-rw-r--r-- | target/config/Config.in.kernel | 1 | ||||
-rw-r--r-- | target/config/Config.in.qemuopts | 2 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 2 |
6 files changed, 38 insertions, 1 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. + diff --git a/target/config/Config.in.kernel b/target/config/Config.in.kernel index 77a5a0b3d..17864db8e 100644 --- a/target/config/Config.in.kernel +++ b/target/config/Config.in.kernel @@ -34,6 +34,7 @@ config ADK_TARGET_KERNEL_MINICONFIG default "arm-fm" if ADK_TARGET_SYSTEM_ARM_FM default "qemu-microblaze-s3adsp1800" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800 default "qemu-microblaze-ml605" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 + default "qemu-aarch64" if ADK_TARGET_SYSTEM_QEMU_AARCH64 default "qemu-arm-versatilepb" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB default "qemu-arm-vexpress-a9" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9 default "qemu-arm-spitz" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ diff --git a/target/config/Config.in.qemuopts b/target/config/Config.in.qemuopts index f3f30bbb2..0ca3ec842 100644 --- a/target/config/Config.in.qemuopts +++ b/target/config/Config.in.qemuopts @@ -81,9 +81,11 @@ endchoice choice prompt "Qemu Emulation using VirtIO drivers" depends on ADK_TARGET_SYSTEM_QEMU_SPARC64 || \ + ADK_TARGET_SYSTEM_QEMU_AARCH64 || \ ADK_TARGET_SYSTEM_QEMU_X86 || \ ADK_TARGET_SYSTEM_QEMU_X86_64 default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_SPARC64 +default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_AARCH64 config ADK_TARGET_QEMU_WITHOUT_VIRTIO boolean "disabled" diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index cdf9221fa..598f67b7d 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -44,7 +44,7 @@ else GCC_CONFOPTS+= --disable-tls --disable-threads --disable-libatomic endif -ifneq ($(ADK_LINUX_ALPHA)$(ADK_LINUX_XTENSA)$(ADK_LINUX_M68K),y) +ifneq ($(ADK_LINUX_AARCH64)$(ADK_LINUX_ALPHA)$(ADK_LINUX_XTENSA)$(ADK_LINUX_M68K),y) GCC_FINAL_CONFOPTS+= --enable-cxx-flags='$(TARGET_CXXFLAGS)' endif |