summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-01-08 06:48:09 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2024-01-08 06:48:09 +0100
commit449fb17cc884a21f65f24bb01d2a162c3dbcc5fc (patch)
treee41fe92707d1b438b2bbdabeea41e75a2055d41e /target
parent2d61c1d309fabe089e4c704a26a39290cf186ce6 (diff)
add support for Synopsys ARCv3
Diffstat (limited to 'target')
-rw-r--r--target/arc/Makefile20
-rw-r--r--target/arc/systems/qemu-arc2
-rw-r--r--target/arc/uclibc-ng.config25
-rw-r--r--target/config/Config.in.binutils11
-rw-r--r--target/config/Config.in.compiler5
-rw-r--r--target/config/Config.in.cpu21
-rw-r--r--target/config/Config.in.kernelfmt4
-rw-r--r--target/linux/Config.in.kernelcfg5
-rw-r--r--target/linux/Config.in.kernelversion6
9 files changed, 84 insertions, 15 deletions
diff --git a/target/arc/Makefile b/target/arc/Makefile
index 8eed37760..decdd8176 100644
--- a/target/arc/Makefile
+++ b/target/arc/Makefile
@@ -5,10 +5,12 @@ include $(ADK_TOPDIR)/rules.mk
include $(ADK_TOPDIR)/mk/kernel-build.mk
include $(ADK_TOPDIR)/mk/image.mk
+KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
ifeq ($(ADK_TARGET_KERNEL_UIMAGE),y)
KERNEL:=$(LINUX_DIR)/arch/arc/boot/uImage
-else
-KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
+endif
+ifeq ($(ADK_TARGET_KERNEL_LOADER),y)
+KERNEL:=$(LINUX_DIR)/arch/arc/boot/loader
endif
QEMU_ARGS:=-monitor none -serial stdio
@@ -16,13 +18,25 @@ QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
QEMU_ARGS+=${ADK_QEMU_ARGS}
ifeq ($(ADK_TARGET_CPU_ARC_ARC700),y)
+QEMU:=qemu-system-arc
QEMU_ARGS+=-cpu arc700
endif
ifeq ($(ADK_TARGET_CPU_ARC_ARCHS),y)
+QEMU:=qemu-system-arc
QEMU_ARGS+=-cpu archs
endif
+ifeq ($(ADK_TARGET_CPU_ARC_ARC32),y)
+QEMU:=qemu-system-arc
+QEMU_ARGS+=-cpu hs5x -M virt,ram_start=0
+endif
+
+ifeq ($(ADK_TARGET_CPU_ARC_ARC64),y)
+QEMU:=qemu-system-arc64
+QEMU_ARGS+=-cpu hs6x -M virt,ram_start=0
+endif
+
# target helper text
ifeq ($(ADK_TARGET_FS),archive)
targethelp:
@@ -43,7 +57,7 @@ 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-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo '${QEMU} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
ifeq ($(ADK_TARGET_SYSTEM_SYNOPSYS_NSIM),y)
ifeq ($(ADK_TARGET_LITTLE_ENDIAN),y)
diff --git a/target/arc/systems/qemu-arc b/target/arc/systems/qemu-arc
index 982534519..3c8445eb9 100644
--- a/target/arc/systems/qemu-arc
+++ b/target/arc/systems/qemu-arc
@@ -2,8 +2,8 @@ config ADK_TARGET_SYSTEM_QEMU_ARC
bool "Qemu Emulator"
select ADK_TARGET_QEMU
select ADK_TARGET_KERNEL_WITH_COMPRESSION
- select ADK_TARGET_CPU_ARC_ARCHS
select ADK_TARGET_LITTLE_ENDIAN
+ select ADK_TARGET_KERNEL_LOADER
help
Support for QEMU ARC Emulator.
diff --git a/target/arc/uclibc-ng.config b/target/arc/uclibc-ng.config
index b20bca4ff..273722b4e 100644
--- a/target/arc/uclibc-ng.config
+++ b/target/arc/uclibc-ng.config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# uClibc-ng 1.0.25 C Library Configuration
+# uClibc-ng 1.0.45 C Library Configuration
#
# TARGET_aarch64 is not set
# TARGET_alpha is not set
@@ -10,11 +10,13 @@ TARGET_arc=y
# TARGET_bfin is not set
# TARGET_c6x is not set
# TARGET_cris is not set
+# TARGET_csky is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_ia64 is not set
+# TARGET_kvx is not set
# TARGET_lm32 is not set
# TARGET_m68k is not set
# TARGET_metag is not set
@@ -24,11 +26,16 @@ TARGET_arc=y
# TARGET_nios2 is not set
# TARGET_or1k is not set
# TARGET_powerpc is not set
+# TARGET_riscv64 is not set
+# TARGET_riscv32 is not set
# TARGET_sh is not set
# TARGET_sparc is not set
# TARGET_sparc64 is not set
+# TARGET_tile is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
+TARGET_LDSO_NAME="ld-uClibc"
+TARGET_ARCH_BITS=32
#
# Target Architecture Features and Options
@@ -45,16 +52,15 @@ TARGET_SUBARCH=""
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
-ARCH_BIG_ENDIAN=y
-ARCH_WANTS_BIG_ENDIAN=y
-# ARCH_WANTS_LITTLE_ENDIAN is not set
+ARCH_LITTLE_ENDIAN=y
+# ARCH_WANTS_BIG_ENDIAN is not set
+ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
DO_XSI_MATH=y
-# UCLIBC_HAS_FENV is not set
UCLIBC_HAS_LONG_DOUBLE_MATH=y
KERNEL_HEADERS=""
HAVE_DOT_CONFIG=y
@@ -63,6 +69,7 @@ HAVE_DOT_CONFIG=y
# General Library Settings
#
DOPIC=y
+HAVE_LDSO=y
HAVE_SHARED=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
LDSO_LDD_SUPPORT=y
@@ -78,7 +85,6 @@ LDSO_RUNPATH_OF_EXECUTABLE=y
LDSO_SAFE_RUNPATH=y
LDSO_SEARCH_INTERP_PATH=y
LDSO_LD_LIBRARY_PATH=y
-LDSO_NO_CLEANUP=y
UCLIBC_CTOR_DTOR=y
# LDSO_GNU_HASH_SUPPORT is not set
# HAS_NO_THREADS is not set
@@ -87,6 +93,7 @@ UCLIBC_HAS_THREADS_NATIVE=y
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_TLS=y
PTHREADS_DEBUG_SUPPORT=y
+PTHREADS_STACK_DEFAULT_SIZE=2097152
UCLIBC_HAS_SYSLOG=y
UCLIBC_HAS_LFS=y
# MALLOC is not set
@@ -130,6 +137,7 @@ UCLIBC_HAS_GNU_ERROR=y
UCLIBC_BSD_SPECIFIC=y
UCLIBC_HAS_BSD_ERR=y
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
+# UCLIBC_HAS_BSD_B64_NTOP_B64_PTON is not set
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
# UCLIBC_NTP_LEGACY is not set
UCLIBC_SV4_DEPRECATED=y
@@ -152,6 +160,10 @@ UCLIBC_HAS_BSD_RES_CLOSE=y
UCLIBC_HAS_COMPAT_RES_STATE=y
# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
UCLIBC_HAS_RESOLVER_SUPPORT=y
+# UCLIBC_DNSRAND_MODE_URANDOM is not set
+# UCLIBC_DNSRAND_MODE_CLOCK is not set
+UCLIBC_DNSRAND_MODE_PRNGPLUS=y
+# UCLIBC_DNSRAND_MODE_SIMPLECOUNTER is not set
#
# String and Stdio Support
@@ -221,7 +233,6 @@ HARDWIRED_ABSPATH=y
#
# Security options
#
-# UCLIBC_HAS_ARC4RANDOM is not set
# UCLIBC_HAS_SSP is not set
# UCLIBC_BUILD_RELRO is not set
# UCLIBC_BUILD_NOW is not set
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 290de1cfd..26c0b2fd5 100644
--- a/target/config/Config.in.binutils
+++ b/target/config/Config.in.binutils
@@ -3,6 +3,7 @@
choice
prompt "Binutils version"
+default ADK_TOOLCHAIN_BINUTILS_ARC if ADK_TARGET_ARCH_ARC
default ADK_TOOLCHAIN_BINUTILS_AVR32 if ADK_TARGET_ARCH_AVR32
default ADK_TOOLCHAIN_BINUTILS_KVX if ADK_TARGET_ARCH_KVX
default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_CPU_SH_J2
@@ -36,12 +37,16 @@ config ADK_TOOLCHAIN_BINUTILS_2_38
config ADK_TOOLCHAIN_BINUTILS_2_28
bool "2.28"
-config ADK_TOOLCHAIN_BINUTILS_KVX
- bool "kvx-coolidge"
- depends on ADK_TARGET_ARCH_KVX
+config ADK_TOOLCHAIN_BINUTILS_ARC
+ bool "arc-2023.09"
+ depends on ADK_TARGET_ARCH_ARC
config ADK_TOOLCHAIN_BINUTILS_AVR32
bool "2.20.1-avr32"
depends on ADK_TARGET_ARCH_AVR32
+config ADK_TOOLCHAIN_BINUTILS_KVX
+ bool "kvx-coolidge"
+ depends on ADK_TARGET_ARCH_KVX
+
endchoice
diff --git a/target/config/Config.in.compiler b/target/config/Config.in.compiler
index 9b5745ef4..3bbdcbaf1 100644
--- a/target/config/Config.in.compiler
+++ b/target/config/Config.in.compiler
@@ -12,6 +12,7 @@ endchoice
choice
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_KVX if ADK_TARGET_ARCH_KVX
default ADK_TOOLCHAIN_GCC_LM32 if ADK_TARGET_ARCH_LM32
@@ -89,6 +90,10 @@ config ADK_TOOLCHAIN_GCC_7
depends on !ADK_TARGET_ARCH_OR1K
depends on !ADK_TARGET_ARCH_LOONGARCH
+config ADK_TOOLCHAIN_GCC_ARC
+ bool "arc-2023.09"
+ depends on ADK_TARGET_ARCH_ARC
+
config ADK_TOOLCHAIN_GCC_AVR32
bool "4.4.7-avr32"
depends on ADK_TARGET_ARCH_AVR32
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index 19fa4d948..7efb22608 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -78,7 +78,23 @@ config ADK_TARGET_CPU_ARC_ARC700
depends on ADK_TARGET_ARCH_ARC
config ADK_TARGET_CPU_ARC_ARCHS
- bool "ARC HS (ARCv2)"
+ bool "ARC HS38 (ARCv2)"
+ select ADK_TARGET_SUPPORTS_THREADS
+ select ADK_TARGET_SUPPORTS_NPTL
+ select ADK_TARGET_SUPPORTS_LT
+ select ADK_TARGET_WITH_MMU
+ depends on ADK_TARGET_ARCH_ARC
+
+config ADK_TARGET_CPU_ARC_ARC32
+ bool "ARC HS58 (ARCv3) 32 Bit"
+ select ADK_TARGET_SUPPORTS_THREADS
+ select ADK_TARGET_SUPPORTS_NPTL
+ select ADK_TARGET_SUPPORTS_LT
+ select ADK_TARGET_WITH_MMU
+ depends on ADK_TARGET_ARCH_ARC
+
+config ADK_TARGET_CPU_ARC_ARC64
+ bool "ARC HS68 (ARCv3) 64 Bit"
select ADK_TARGET_SUPPORTS_THREADS
select ADK_TARGET_SUPPORTS_NPTL
select ADK_TARGET_SUPPORTS_LT
@@ -1933,6 +1949,7 @@ config ADK_TARGET_GCC_CPU
default "68060" if ADK_TARGET_CPU_M68K_68060
default "arc700" if ADK_TARGET_CPU_ARC_ARC700
default "archs" if ADK_TARGET_CPU_ARC_ARCHS
+ default "hs5x" if ADK_TARGET_CPU_ARC_ARC32
default "arm1176jzf-s" if ADK_TARGET_CPU_ARM_ARM1176JZF_S
default "arm926ej-s" if ADK_TARGET_CPU_ARM_ARM926EJ_S
default "cortex-a5" if ADK_TARGET_CPU_ARM_CORTEX_A5
@@ -2203,6 +2220,8 @@ config ADK_TARGET_CPU_ARCH
default "alpha" if ADK_TARGET_ARCH_ALPHA
default "arm" if ADK_TARGET_ARCH_ARM && ADK_TARGET_LITTLE_ENDIAN
default "armeb" if ADK_TARGET_ARCH_ARM && ADK_TARGET_BIG_ENDIAN
+ default "arc32" if ADK_TARGET_ARCH_ARC && ADK_TARGET_CPU_ARC_ARC32
+ default "arc64" if ADK_TARGET_ARCH_ARC && ADK_TARGET_CPU_ARC_ARC64
default "arc" if ADK_TARGET_ARCH_ARC && ADK_TARGET_LITTLE_ENDIAN
default "arceb" if ADK_TARGET_ARCH_ARC && ADK_TARGET_BIG_ENDIAN
default "avr32" if ADK_TARGET_ARCH_AVR32
diff --git a/target/config/Config.in.kernelfmt b/target/config/Config.in.kernelfmt
index 1cc054c05..23d800d24 100644
--- a/target/config/Config.in.kernelfmt
+++ b/target/config/Config.in.kernelfmt
@@ -46,8 +46,12 @@ config ADK_TARGET_KERNEL_XIPIMAGE
config ADK_TARGET_KERNEL_SIMPLEIMAGE
bool
+config ADK_TARGET_KERNEL_LOADER
+ bool
+
config ADK_TARGET_KERNEL
string
+ default "loader" if ADK_TARGET_KERNEL_LOADER
default "uImage" if ADK_TARGET_KERNEL_UIMAGE
default "uImage.bin" if ADK_TARGET_KERNEL_UIMAGEBIN
default "zImage" if ADK_TARGET_KERNEL_ZIMAGE
diff --git a/target/linux/Config.in.kernelcfg b/target/linux/Config.in.kernelcfg
index 8aaeb237b..5c3a16892 100644
--- a/target/linux/Config.in.kernelcfg
+++ b/target/linux/Config.in.kernelcfg
@@ -4,6 +4,9 @@
choice
prompt "Kernel configuration" if !ADK_TARGET_CHOOSE_ARCH
depends on ADK_TARGET_OS_LINUX
+default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_CPU_ARC_ARC32
+default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_CPU_ARC_ARC64
+default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_SIPEED_MAIX_BIT
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_SIPEED_MAIX_BIT
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_PHYTEC_WEGA && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
@@ -56,6 +59,8 @@ config ADK_TARGET_LINUX_KERNEL_DEFCONFIG
default "rockpi4_defconfig" if ADK_TARGET_SYSTEM_ROCKPI4_PLUS && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default "vexpress_defconfig" if ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9
default "spitz_defconfig" if ADK_TARGET_SYSTEM_QEMU_ARM_TERRIER
+ default "haps_hs5x_defconfig" if ADK_TARGET_CPU_ARC_ARC32
+ default "haps_arc64_defconfig" if ADK_TARGET_CPU_ARC_ARC64
default ""
config ADK_TARGET_LINUX_KERNEL_CUSTOMCONFIG_PATH
diff --git a/target/linux/Config.in.kernelversion b/target/linux/Config.in.kernelversion
index 80a571f93..8c6ce5c65 100644
--- a/target/linux/Config.in.kernelversion
+++ b/target/linux/Config.in.kernelversion
@@ -9,6 +9,8 @@ default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARF
default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_KINETIS_K70
default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_ADSP_BF537
default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_SYSTEM_PHYTEC_WEGA
+default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_CPU_ARC_ARC32
+default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_CPU_ARC_ARC64
default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_KVX
default ADK_TARGET_LINUX_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_LM32
default ADK_TARGET_LINUX_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_CRIS
@@ -192,6 +194,7 @@ endchoice
config ADK_TARGET_LINUX_KERNEL_GIT_REPO
string "git repository"
depends on ADK_TARGET_LINUX_KERNEL_VERSION_GIT
+ default "https://github.com/foss-for-synopsys-dwc-arc-processors/linux.git" if ADK_TARGET_CPU_ARC_ARC32 || ADK_TARGET_CPU_ARC_ARC64
default "https://github.com/loongson/linux.git" if ADK_TARGET_LINUX_ARCH_LOONGARCH
default "https://github.com/raspberrypi/linux.git" if ADK_TARGET_BOARD_BCM28XX
default "git://git.code.sf.net/p/adi-linux/code" if ADK_TARGET_SYSTEM_ADSP_BF537
@@ -210,6 +213,7 @@ 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 "arc" if ADK_TARGET_CPU_ARC_ARC32 || ADK_TARGET_CPU_ARC_ARC64
default "loongarch" if ADK_TARGET_LINUX_ARCH_LOONGARCH
default "kvx" if ADK_TARGET_ARCH_KVX
default "lm32" if ADK_TARGET_ARCH_LM32
@@ -226,6 +230,7 @@ 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 "f6e9dab9d1dc1e8fa2acb75504bf5ff86b885b8e" if ADK_TARGET_CPU_ARC_ARC32 || ADK_TARGET_CPU_ARC_ARC64
default "b02c139d3608c8ae87f5398a3a29854f6df7a041" if ADK_TARGET_ARCH_KVX
default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
default "e01f00b8f84cb017d4e7581b8ef24e78a1ceba09" if ADK_TARGET_BOARD_BCM28XX
@@ -241,6 +246,7 @@ 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 "5.16" if ADK_TARGET_CPU_ARC_ARC32 || ADK_TARGET_CPU_ARC_ARC64
default "5.19" if ADK_TARGET_LINUX_ARCH_LOONGARCH
default "6.1.65" if ADK_TARGET_BOARD_BCM28XX
default "5.10.110" if ADK_TARGET_SYSTEM_ROCKPI4_PLUS