generic: groundwork for RISC-V
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 30 Jul 2018 14:00:54 +0000 (16:00 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Thu, 4 Oct 2018 15:21:32 +0000 (17:21 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
include/kernel.mk
include/target.mk
scripts/config.sub
target/Config.in

index 97bcfe3f0b7d47b771f09e20ff35af55ea1cbbe0..c6050051b74d7cbda6227e6758f6f003c9d3d26a 100644 (file)
@@ -87,6 +87,8 @@ else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
   LINUX_KARCH := mips
 else ifneq (,$(findstring $(ARCH) , powerpc64 ))
   LINUX_KARCH := powerpc
+else ifneq (,$(findstring $(ARCH) , riscv64 ))
+  LINUX_KARCH := riscv
 else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
   LINUX_KARCH := sh
 else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
index 88beae5001db0175ab0891094de5c8c17412a441..88c1bdc6ed7a702630ff83deab5504a8868b647a 100644 (file)
@@ -230,6 +230,10 @@ ifeq ($(DUMP),1)
     CPU_CFLAGS_arc700 = -mcpu=arc700
     CPU_CFLAGS_archs = -mcpu=archs
   endif
+  ifeq ($(ARCH),riscv64)
+    CPU_TYPE ?= riscv64
+    CPU_CFLAGS_riscv64:=-mabi=lp64d -march=rv64imafdc
+  endif
   ifneq ($(CPU_TYPE),)
     ifndef CPU_CFLAGS_$(CPU_TYPE)
       $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
index f018151c64b5baeb9e05eff62250b58571891f83..c28af27851f39dab9b04fdaf0eecfd6759ce9cb5 100755 (executable)
@@ -430,7 +430,7 @@ case $basic_machine in
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | riscv32-* | riscv64-* \
+       | riscv32-* | riscv64-* | riscv-* \
        | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
index 3cf4231f2aad3e9bdcee9d715e5366d697b3b490..b3d7a5fb68cd853e3b3ac78906b0ed2aba4eb808 100644 (file)
@@ -167,6 +167,10 @@ config powerpc64
        select ARCH_64BIT
        bool
 
+config riscv64
+       select ARCH_64BIT
+       bool
+
 config sh3
        bool
 
@@ -206,6 +210,7 @@ config ARCH
        default "mips64el"  if mips64el
        default "powerpc"   if powerpc
        default "powerpc64" if powerpc64
+       default "riscv64"   if riscv64
        default "sh3"       if sh3
        default "sh3eb"     if sh3eb
        default "sh4"       if sh4