summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2017-12-15 21:17:20 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-12-15 21:18:01 +0100
commit3cc1c7ffe340a6b715f4953b69f1395d925225ab (patch)
treec531602134ec33f76b950bac7abac9a87e50cb99 /target
parenta496034adfbaa9065f17bef3813a05c8a0b5360b (diff)
riscv: use upstream kernel
Diffstat (limited to 'target')
-rw-r--r--target/config/Config.in.kernelversion3
-rw-r--r--target/riscv32/kernel/qemu-riscv323
-rw-r--r--target/riscv64/Makefile8
-rw-r--r--target/riscv64/kernel/qemu-riscv641
4 files changed, 12 insertions, 3 deletions
diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion
index 062df0129..8e958a4c9 100644
--- a/target/config/Config.in.kernelversion
+++ b/target/config/Config.in.kernelversion
@@ -204,7 +204,6 @@ config ADK_TARGET_KERNEL_GIT_REPO
default "https://git.phytec.de/git/linux-ti.git" if ADK_TARGET_SYSTEM_PHYTEC_WEGA
default "https://github.com/m-labs/linux-milkymist.git" if ADK_TARGET_ARCH_LM32
default "https://github.com/c-sky/linux-4.9.y.git" if ADK_TARGET_ARCH_CSKY
- default "https://github.com/riscv/riscv-linux.git" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
help
GIT repository to use.
@@ -214,7 +213,6 @@ config ADK_TARGET_KERNEL_GIT_REPO_NAME
depends on ADK_TARGET_KERNEL_VERSION_GIT
default "csky" if ADK_TARGET_ARCH_CSKY
default "lm32" if ADK_TARGET_ARCH_LM32
- default "riscv" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "rpi" if ADK_TARGET_BOARD_BCM28XX
default "ad" if ADK_TARGET_SYSTEM_ADSP_BF537
default "bb" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
@@ -229,7 +227,6 @@ config ADK_TARGET_KERNEL_GIT
depends on ADK_TARGET_KERNEL_VERSION_GIT
default "6064a9bdf48cefbccc4f6472dd04251f0dec1931" if ADK_TARGET_ARCH_CSKY
default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
- default "1cd2e072bbd1a518e11b551435be0ad84a2c52af" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "cfa29b46af94d83e31aa000dbaee553f9c4d670c" if ADK_TARGET_BOARD_BCM28XX
default "f8d3b2a0fa5054aaed0f14cd457db9d8922bb167" if ADK_TARGET_SYSTEM_ADSP_BF537
default "e7c8afc1dda7b7c18596d90ad6a17ae886650b72" if ADK_TARGET_SYSTEM_KINETIS_K70
diff --git a/target/riscv32/kernel/qemu-riscv32 b/target/riscv32/kernel/qemu-riscv32
index 6c2573530..ab8ffb263 100644
--- a/target/riscv32/kernel/qemu-riscv32
+++ b/target/riscv32/kernel/qemu-riscv32
@@ -1,4 +1,7 @@
CONFIG_RISCV=y
+CONFIG_ARCH_RV32I=y
+CONFIG_CMODEL_MEDANY=y
CONFIG_CPU_RV_GENERIC=y
CONFIG_RV_SYSRISCV_ATOMIC=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
CONFIG_32BIT=y
diff --git a/target/riscv64/Makefile b/target/riscv64/Makefile
index 30099fb55..9b84ee309 100644
--- a/target/riscv64/Makefile
+++ b/target/riscv64/Makefile
@@ -14,6 +14,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-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
ifeq ($(ADK_TARGET_FS),initramfsarchive)
targethelp:
@@ -23,6 +27,10 @@ endif
ifeq ($(ADK_TARGET_FS),initramfspiggyback)
targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
endif
kernel-strip:
diff --git a/target/riscv64/kernel/qemu-riscv64 b/target/riscv64/kernel/qemu-riscv64
index 94104e26c..85e4c59d5 100644
--- a/target/riscv64/kernel/qemu-riscv64
+++ b/target/riscv64/kernel/qemu-riscv64
@@ -1 +1,2 @@
CONFIG_RISCV=y
+CONFIG_SECTION_MISMATCH_WARN_ONLY=y