From 6d2e9103d92790de1029e07fcb93099161fd61b6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 5 Feb 2016 23:02:00 +0100 Subject: fr-v: allow to build a uClibc-ng toolchain --- target/frv/Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++++ target/frv/kernel/sim-frv | 13 +++++++++++ target/frv/systems/sim-frv | 8 +++++++ target/frv/uclibc-ng.config | 39 +++++++++++++++++++++++++-------- 4 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 target/frv/kernel/sim-frv create mode 100644 target/frv/systems/sim-frv (limited to 'target/frv') diff --git a/target/frv/Makefile b/target/frv/Makefile index 03afae8f0..4935ff2c4 100644 --- a/target/frv/Makefile +++ b/target/frv/Makefile @@ -5,3 +5,56 @@ include $(ADK_TOPDIR)/rules.mk include $(ADK_TOPDIR)/mk/kernel-build.mk include $(ADK_TOPDIR)/mk/image.mk +KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL) + +# target helper text +ifeq ($(ADK_TARGET_FS),archive) +targethelp: + @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)" +endif +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}' +ifeq ($(ADK_TARGET_SIM),y) + @echo "Run the simulator via:" + @echo '$(TARGET_CROSS)run --environment operating --model fr400 $(FW_DIR)/$(TARGET_KERNEL)' +endif +endif +ifeq ($(ADK_TARGET_FS),nfsroot) +targethelp: + @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' + @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)" +endif + +kernel-strip: + @cp $(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),archive) +imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp +endif +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 +ifeq ($(ADK_TARGET_FS),nfsroot) +imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp +endif diff --git a/target/frv/kernel/sim-frv b/target/frv/kernel/sim-frv new file mode 100644 index 000000000..c52b4cc77 --- /dev/null +++ b/target/frv/kernel/sim-frv @@ -0,0 +1,13 @@ +CONFIG_FRV=y +CONFIG_CPU_FR401=y +CONFIG_UCPAGE_OFFSET_20000000=y +CONFIG_BUG=y +CONFIG_FRV_ONCPU_SERIAL=y +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DMA=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 diff --git a/target/frv/systems/sim-frv b/target/frv/systems/sim-frv new file mode 100644 index 000000000..70fea8f5c --- /dev/null +++ b/target/frv/systems/sim-frv @@ -0,0 +1,8 @@ +config ADK_TARGET_SYSTEM_SIM_FRV + bool "GDB simulator" + select ADK_CPU_FRV + select ADK_TARGET_SIM + select ADK_TARGET_PACKAGE_TXZ + help + FRV Simulator. + diff --git a/target/frv/uclibc-ng.config b/target/frv/uclibc-ng.config index 20894cef6..13674c4a2 100644 --- a/target/frv/uclibc-ng.config +++ b/target/frv/uclibc-ng.config @@ -35,10 +35,7 @@ TARGET_frv=y TARGET_ARCH="frv" FORCE_OPTIONS_FOR_ARCH=y TARGET_SUBARCH="" -# UCLIBC_FORMAT_FDPIC_ELF is not set -UCLIBC_FORMAT_FLAT=y -# UCLIBC_FORMAT_FLAT_SEP_DATA is not set -# UCLIBC_FORMAT_SHARED_FLAT is not set +UCLIBC_FORMAT_FDPIC_ELF=y ARCH_HAS_DEPRECATED_SYSCALLS=y ARCH_BIG_ENDIAN=y @@ -63,11 +60,28 @@ HAVE_DOT_CONFIG=y # General Library Settings # DOPIC=y -ARCH_HAS_NO_SHARED=y -ARCH_HAS_NO_LDSO=y +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +LDSO_CACHE_SUPPORT=y +LDSO_PRELOAD_ENV_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +LDSO_BASE_FILENAME="ld.so" +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set +UCLIBC_STATIC_LDCONFIG=y +LDSO_RUNPATH=y +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 -HAS_NO_THREADS=y -# UCLIBC_HAS_LINUXTHREADS is not set +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +UCLIBC_HAS_LINUXTHREADS=y +UCLIBC_HAS_THREADS=y +PTHREADS_DEBUG_SUPPORT=y UCLIBC_HAS_SYSLOG=y UCLIBC_HAS_LFS=y UCLIBC_HAS_OBSTACK=y @@ -202,10 +216,13 @@ HARDWIRED_ABSPATH=y # # Security options # +# UCLIBC_BUILD_PIE is not set UCLIBC_HAS_ARC4RANDOM=y # ARC4RANDOM_USES_NODEV is not set # UCLIBC_HAS_SSP is not set -UCLIBC_BUILD_NOEXECSTACK=y +# UCLIBC_BUILD_RELRO is not set +# UCLIBC_BUILD_NOW is not set +# UCLIBC_BUILD_NOEXECSTACK is not set # # Development/debugging options @@ -213,9 +230,13 @@ UCLIBC_BUILD_NOEXECSTACK=y CROSS_COMPILER_PREFIX="" UCLIBC_EXTRA_CFLAGS="" # DODEBUG is not set +# DODEBUG_PT is not set # DOSTRIP is not set # DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set # UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set WARNINGS="-Wall" # EXTRA_WARNINGS is not set # DOMULTI is not set -- cgit v1.2.3