summaryrefslogtreecommitdiff
path: root/target/riscv64
diff options
context:
space:
mode:
Diffstat (limited to 'target/riscv64')
-rw-r--r--target/riscv64/Makefile43
-rw-r--r--target/riscv64/kernel/qemu-riscv641
-rw-r--r--target/riscv64/systems/qemu-riscv647
3 files changed, 51 insertions, 0 deletions
diff --git a/target/riscv64/Makefile b/target/riscv64/Makefile
new file mode 100644
index 000000000..30099fb55
--- /dev/null
+++ b/target/riscv64/Makefile
@@ -0,0 +1,43 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include $(ADK_TOPDIR)/mk/kernel-build.mk
+include $(ADK_TOPDIR)/mk/image.mk
+
+KERNEL:=$(LINUX_DIR)/vmlinux
+OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+QEMU_ARGS:=-nographic
+
+# target helper text
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+endif
+
+kernel-strip:
+ $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+imageinstall: createinitramfs targethelp
+endif
diff --git a/target/riscv64/kernel/qemu-riscv64 b/target/riscv64/kernel/qemu-riscv64
new file mode 100644
index 000000000..94104e26c
--- /dev/null
+++ b/target/riscv64/kernel/qemu-riscv64
@@ -0,0 +1 @@
+CONFIG_RISCV=y
diff --git a/target/riscv64/systems/qemu-riscv64 b/target/riscv64/systems/qemu-riscv64
new file mode 100644
index 000000000..70d91645e
--- /dev/null
+++ b/target/riscv64/systems/qemu-riscv64
@@ -0,0 +1,7 @@
+config ADK_TARGET_SYSTEM_QEMU_RISCV64
+ bool "Qemu Emulator"
+ select ADK_TARGET_QEMU
+ select ADK_TARGET_CPU_RISCV64
+ help
+ Qemu Emulator for RISCV64 architecture.
+