Browse Source

csky: rework qemu support

Waldemar Brodkorb 2 years ago
parent
commit
4c6c03c315

+ 0 - 5
target/config/Config.in.compiler

@@ -14,7 +14,6 @@ prompt "GCC version"
 depends on ADK_BUILD_COMPILER_GCC
 default ADK_TOOLCHAIN_GCC_ARC if ADK_TARGET_ARCH_ARC
 default ADK_TOOLCHAIN_GCC_AVR32 if ADK_TARGET_ARCH_AVR32
-default ADK_TOOLCHAIN_GCC_CSKY if ADK_TARGET_ARCH_CSKY
 default ADK_TOOLCHAIN_GCC_LM32 if ADK_TARGET_ARCH_LM32
 default ADK_TOOLCHAIN_GCC_METAG if ADK_TARGET_ARCH_METAG
 default ADK_TOOLCHAIN_GCC_NDS32 if ADK_TARGET_ARCH_NDS32
@@ -66,10 +65,6 @@ config ADK_TOOLCHAIN_GCC_AVR32
 	bool "4.4.7-avr32"
 	depends on ADK_TARGET_ARCH_AVR32
 
-config ADK_TOOLCHAIN_GCC_CSKY
-	bool "6.3.0-csky"
-	depends on ADK_TARGET_ARCH_CSKY
-
 config ADK_TOOLCHAIN_GCC_METAG
 	bool "4.2.4-metag"
 	depends on ADK_TARGET_ARCH_METAG

+ 22 - 1
target/config/Config.in.cpu

@@ -440,6 +440,14 @@ config ADK_TARGET_CPU_CSKY_CK807
 	select ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_CSKY
 
+config ADK_TARGET_CPU_CSKY_CK807F
+	bool "ck807f"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_CPU_WITH_FPU
+	depends on ADK_TARGET_ARCH_CSKY
+
 config ADK_TARGET_CPU_CSKY_CK810
 	bool "ck810"
 	select ADK_TARGET_SUPPORTS_THREADS
@@ -447,6 +455,14 @@ config ADK_TARGET_CPU_CSKY_CK810
 	select ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_CSKY
 
+config ADK_TARGET_CPU_CSKY_CK810F
+	bool "ck810f"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_CPU_WITH_FPU
+	depends on ADK_TARGET_ARCH_CSKY
+
 # epiphany
 config ADK_TARGET_CPU_EPIPHANY
 	bool "epiphany"
@@ -1869,6 +1885,10 @@ config ADK_TARGET_GCC_CPU
 	default "cortex-m3" if ADK_TARGET_CPU_ARM_CORTEX_M3
 	default "cortex-m4" if ADK_TARGET_CPU_ARM_CORTEX_M4
 	default "cortex-m7" if ADK_TARGET_CPU_ARM_CORTEX_M7
+	default "ck807" if ADK_TARGET_CPU_CSKY_CK807
+	default "ck810" if ADK_TARGET_CPU_CSKY_CK810
+	default "ck807f" if ADK_TARGET_CPU_CSKY_CK807F
+	default "ck810f" if ADK_TARGET_CPU_CSKY_CK810F
 	default "ev4" if ADK_TARGET_CPU_ALPHA_EV4
 	default "ev5" if ADK_TARGET_CPU_ALPHA_EV5
 	default "ev6" if ADK_TARGET_CPU_ALPHA_EV6
@@ -1984,9 +2004,10 @@ config ADK_TARGET_CPU_FLAGS
 	default "-mcpu=bf549m" if ADK_TARGET_CPU_BFIN_BF549M
 	default "-mcpu=bf561" if ADK_TARGET_CPU_BFIN_BF561
 	default "-mcpu=bf592" if ADK_TARGET_CPU_BFIN_BF592
-	default "-mcpu=ck610" if ADK_TARGET_CPU_CSKY_CK610
 	default "-mcpu=ck807" if ADK_TARGET_CPU_CSKY_CK807
 	default "-mcpu=ck810" if ADK_TARGET_CPU_CSKY_CK810
+	default "-mcpu=ck807f" if ADK_TARGET_CPU_CSKY_CK807F
+	default "-mcpu=ck810f" if ADK_TARGET_CPU_CSKY_CK810F
 	default "-mcpu=v10" if ADK_TARGET_CPU_CRIS_CRISV10
 	default "-mcpu=v32" if ADK_TARGET_CPU_CRIS_CRISV32
 	default "-mh" if ADK_TARGET_CPU_H8300H

+ 1 - 2
target/config/Config.in.endian

@@ -17,8 +17,7 @@ depends on ADK_TARGET_SYSTEM_GENERIC_ARC \
 	|| ADK_TARGET_SYSTEM_GENERIC_XTENSA \
 	|| ADK_TARGET_SYSTEM_SYNOPSYS_NSIM \
 	|| ADK_TARGET_SYSTEM_QEMU_AARCH64 \
-	|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
-	|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+	|| ADK_TARGET_SYSTEM_QEMU_CSKY \
 	|| ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605 \
 	|| ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800 \
 	|| ADK_TARGET_SYSTEM_QEMU_MIPS \

+ 1 - 1
target/config/Config.in.libc

@@ -227,7 +227,7 @@ config ADK_TARGET_SUFFIX
 	default "uclibcabi32" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ABI_O32
 	default "uclibc32" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ABI_32 && ADK_LINUX_64
 	default "uclibcspe" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ARCH_PPC && ADK_TARGET_ARCH_PPC_WITH_SPE
-	default "uclibcabiv2" if ADK_TARGET_LIB_UCLIBC_NG && (ADK_TARGET_CPU_CSKY_CK807 || ADK_TARGET_CPU_CSKY_CK810)
+	default "uclibcabiv2" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ARCH_CSKY
 	default "uclibc" if ADK_TARGET_LIB_UCLIBC_NG
 	default "musleabihf" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "musleabi" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM

+ 3 - 9
target/config/Config.in.qemuopts

@@ -38,9 +38,7 @@ menu "Qemu system configuration"
 depends on ADK_TARGET_QEMU && (ADK_TARGET_SYSTEM_QEMU_X86_64 \
 				|| ADK_TARGET_SYSTEM_QEMU_RISCV32 \
 				|| ADK_TARGET_SYSTEM_QEMU_RISCV64 \
-				|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 \
-				|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
-				|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+				|| ADK_TARGET_SYSTEM_QEMU_CSKY \
 				|| ADK_TARGET_SYSTEM_QEMU_X86 \
 				|| ADK_TARGET_SYSTEM_QEMU_AARCH64 \
 				|| ADK_TARGET_SYSTEM_QEMU_SPARC64)
@@ -98,15 +96,11 @@ depends on ADK_TARGET_SYSTEM_QEMU_SPARC64 || \
 		ADK_TARGET_SYSTEM_QEMU_AARCH64 || \
 		ADK_TARGET_SYSTEM_QEMU_RISCV32 || \
 		ADK_TARGET_SYSTEM_QEMU_RISCV64 || \
-		ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 || \
-		ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 || \
-		ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 || \
+		ADK_TARGET_SYSTEM_QEMU_CSKY || \
 		ADK_TARGET_SYSTEM_QEMU_X86 || \
 		ADK_TARGET_SYSTEM_QEMU_X86_64
 default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_AARCH64
-default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_CSKY_CK610
-default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
-default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
+default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_CSKY
 default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_RISCV32
 default ADK_TARGET_QEMU_WITH_VIRTIO if ADK_TARGET_SYSTEM_QEMU_RISCV64
 

+ 3 - 5
target/csky/Makefile

@@ -7,12 +7,10 @@ include $(ADK_TOPDIR)/mk/image.mk
 
 KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
 
-QEMU_ARGS:=${ADK_QEMU_ARGS} -M virt
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_CSKY_CK807),y)
-QEMU:=qemu-system-cskyv2
-endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_CSKY_CK810),y)
 QEMU:=qemu-system-cskyv2
+ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
+QEMU_ARGS:=${ADK_QEMU_ARGS} -M virt
+QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
 endif
 
 # target helper text

+ 0 - 1
target/csky/kernel/qemu-csky-ck610 → target/csky/kernel/qemu-csky

@@ -1,5 +1,4 @@
 CONFIG_CSKY=y
-CONFIG_CPU_CK610=y
 CONFIG_CSKY_IRQ=y
 CONFIG_RAM_BASE=0x0
 CONFIG_NATIONALCHIP_IRQ=y

+ 0 - 8
target/csky/kernel/qemu-csky-ck807

@@ -1,8 +0,0 @@
-CONFIG_CSKY=y
-CONFIG_CPU_CK807=y
-CONFIG_CSKY_IRQ=y
-CONFIG_RAM_BASE=0x0
-CONFIG_NATIONALCHIP_IRQ=y
-CONFIG_NATIONALCHIP_TIMER=y
-CONFIG_CSKYMAC=y
-CONFIG_SECTION_MISMATCH_WARN_ONLY=y

+ 0 - 8
target/csky/kernel/qemu-csky-ck810

@@ -1,8 +0,0 @@
-CONFIG_CSKY=y
-CONFIG_CPU_CK810=y
-CONFIG_CSKY_IRQ=y
-CONFIG_RAM_BASE=0x0
-CONFIG_NATIONALCHIP_IRQ=y
-CONFIG_NATIONALCHIP_TIMER=y
-CONFIG_CSKYMAC=y
-CONFIG_SECTION_MISMATCH_WARN_ONLY=y

+ 7 - 0
target/csky/systems/qemu-csky

@@ -0,0 +1,7 @@
+config ADK_TARGET_SYSTEM_QEMU_CSKY
+	bool "Qemu Emulator"
+	select ADK_TARGET_QEMU
+	select ADK_TARGET_KERNEL_WITH_COMPRESSION
+	help
+	  Qemu Emulator for C-SKY architecture.
+

+ 0 - 8
target/csky/systems/qemu-csky-ck807

@@ -1,8 +0,0 @@
-config ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
-	bool "Qemu Emulator (ck807)"
-	select ADK_TARGET_QEMU
-	select ADK_TARGET_CPU_CSKY_CK807
-	select ADK_TARGET_KERNEL_WITH_COMPRESSION
-	help
-	  Qemu Emulator for C-SKY architecture (ck807).
-

+ 0 - 8
target/csky/systems/qemu-csky-ck810

@@ -1,8 +0,0 @@
-config ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
-	bool "Qemu Emulator (ck810)"
-	select ADK_TARGET_QEMU
-	select ADK_TARGET_CPU_CSKY_CK810
-	select ADK_TARGET_KERNEL_WITH_COMPRESSION
-	help
-	  Qemu Emulator for C-SKY architecture (ck810).
-

+ 0 - 4
target/linux/Config.in.kernelversion

@@ -207,7 +207,6 @@ config ADK_TARGET_LINUX_KERNEL_GIT_REPO
 	default "https://github.com/beagleboard/linux.git" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
 	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
 	default "https://github.com/riscv/riscv-linux.git" if ADK_TARGET_ARCH_RISCV64
 	default "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
@@ -217,7 +216,6 @@ config ADK_TARGET_LINUX_KERNEL_GIT_REPO
 config ADK_TARGET_LINUX_KERNEL_GIT_REPO_NAME
 	string
 	depends on ADK_TARGET_LINUX_KERNEL_VERSION_GIT
-	default "csky" if ADK_TARGET_ARCH_CSKY
 	default "lm32" if ADK_TARGET_ARCH_LM32
 	default "riscv" if ADK_TARGET_ARCH_RISCV32
 	default "riscv" if ADK_TARGET_ARCH_RISCV64
@@ -233,7 +231,6 @@ config ADK_TARGET_LINUX_KERNEL_GIT_REPO_NAME
 config ADK_TARGET_LINUX_KERNEL_GIT
 	string "git version"
 	depends on ADK_TARGET_LINUX_KERNEL_VERSION_GIT
-	default "10c530f34ed3fb9eb89ff7d7a95df62a2072b623" if ADK_TARGET_ARCH_CSKY
 	default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
 	default "a2092141807514666a273971cc8fa9e80f14439f" if ADK_TARGET_BOARD_BCM28XX
 	default "f8d3b2a0fa5054aaed0f14cd457db9d8922bb167" if ADK_TARGET_SYSTEM_ADSP_BF537
@@ -248,7 +245,6 @@ config ADK_TARGET_LINUX_KERNEL_GIT
 config ADK_TARGET_LINUX_KERNEL_GIT_VER
 	string "kernel version"
 	depends on ADK_TARGET_LINUX_KERNEL_VERSION_GIT
-	default "4.9.56" if ADK_TARGET_ARCH_CSKY
 	default "4.18.0" if ADK_TARGET_ARCH_RISCV32
 	default "4.18.0" if ADK_TARGET_ARCH_RISCV64
 	default "4.14.43" if ADK_TARGET_BOARD_BCM28XX

+ 3 - 9
target/linux/config/Config.in.ethernet

@@ -484,22 +484,16 @@ config ADK_LINUX_KERNEL_STMMAC_ETH
 	select ADK_LINUX_KERNEL_STMMAC_PLATFORM
 	select ADK_LINUX_KERNEL_DWMAC_SUNXI if ADK_TARGET_SYSTEM_BANANA_PRO \
 				      || ADK_TARGET_SYSTEM_ORANGE_PI0
-	select ADK_LINUX_KERNEL_DWMAC_GENERIC if ADK_TARGET_SYSTEM_QEMU_CSKY_CK610
-	select ADK_LINUX_KERNEL_DWMAC_GENERIC if ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
-	select ADK_LINUX_KERNEL_DWMAC_GENERIC if ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
+	select ADK_LINUX_KERNEL_DWMAC_GENERIC if ADK_TARGET_SYSTEM_QEMU_CSKY
 	select ADK_LINUX_KERNEL_DWMAC_GENERIC if ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
 	select ADK_LINUX_KERNEL_MICREL_PHY if ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
 	depends on ADK_TARGET_SYSTEM_BANANA_PRO \
 		|| ADK_TARGET_SYSTEM_ORANGE_PI0 \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+		|| ADK_TARGET_SYSTEM_QEMU_CSKY \
 		|| ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
 	default y if ADK_TARGET_SYSTEM_BANANA_PRO
 	default y if ADK_TARGET_SYSTEM_ORANGE_PI0
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK610
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
+	default y if ADK_TARGET_SYSTEM_QEMU_CSKY
 	default y if ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
 	default n
 

+ 3 - 9
target/linux/config/Config.in.serial

@@ -92,9 +92,7 @@ config ADK_LINUX_KERNEL_SERIAL_8250
 	select ADK_LINUX_KERNEL_SERIAL_8250_CONSOLE
 	select ADK_LINUX_KERNEL_SERIAL_OF_PLATFORM if ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
 						|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
-						|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 \
-						|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
-						|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+						|| ADK_TARGET_SYSTEM_QEMU_CSKY \
 						|| ADK_TARGET_SYSTEM_QEMU_XTENSA \
 						|| ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605 \
 						|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
@@ -121,9 +119,7 @@ config ADK_LINUX_KERNEL_SERIAL_8250
 		|| ADK_TARGET_SYSTEM_QEMU_MIPS \
 		|| ADK_TARGET_SYSTEM_QEMU_MIPS64 \
 		|| ADK_TARGET_SYSTEM_QEMU_ALPHA \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
-		|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+		|| ADK_TARGET_SYSTEM_QEMU_CSKY \
 		|| ADK_TARGET_SYSTEM_QEMU_HPPA \
 		|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
 		|| ADK_TARGET_SYSTEM_QEMU_OR1K \
@@ -153,9 +149,7 @@ config ADK_LINUX_KERNEL_SERIAL_8250
 	default y if ADK_TARGET_SYSTEM_QEMU_MIPS
 	default y if ADK_TARGET_SYSTEM_QEMU_MIPS64
 	default y if ADK_TARGET_SYSTEM_QEMU_ALPHA
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK610
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
-	default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
+	default y if ADK_TARGET_SYSTEM_QEMU_CSKY
 	default y if ADK_TARGET_SYSTEM_QEMU_HPPA
 	default y if ADK_TARGET_SYSTEM_QEMU_NIOS2
 	default y if ADK_TARGET_SYSTEM_QEMU_OR1K

+ 0 - 7
toolchain/gcc/Makefile.inc

@@ -33,13 +33,6 @@ PKG_SITES:=		https://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git
 PKG_RELEASE:=		1
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
 endif
-ifeq ($(ADK_TOOLCHAIN_GCC_CSKY),y)
-PKG_VERSION:=          gcc-6-branch-csky
-PKG_GIT:=              branch
-PKG_SITES:=            https://github.com/c-sky/gcc.git
-PKG_RELEASE:=          1
-DISTFILES:=            ${PKG_NAME}-${PKG_VERSION}.tar.xz
-endif
 ifeq ($(ADK_TOOLCHAIN_GCC_AVR32),y)
 PKG_VERSION:=		4.4.7
 PKG_HASH:=		76ad7c433af1c798a1e116c4dfa8f5f794f0d32bff65f88c54dcd5e5d146fc32