Radix cross Linux Toolchains

Toolchains for all supported by Radix cross Linux devices

42 Commits   1 Branch   8 Tags
Index: build-system/config.mk
===================================================================
--- build-system/config.mk	(revision 9)
+++ build-system/config.mk	(revision 10)
@@ -261,6 +261,15 @@
 ###                |---Toolchain-spec-handy-ruler----------------|
 RK339X_GLIBC_SPEC = Rockchip RK339x GNU Libc toolchain
 
+# Rockchip RK358X-GLIBC
+TOOLCHAIN_RK358X_GLIBC = rk358x-glibc
+
+RK358X_GLIBC_ARCH = aarch64-rk358x-linux-gnu
+RK358X_GLIBC_DIR  = aarch64-RK358X-linux-glibc
+RK358X_GLIBC_PATH = $(TOOLCHAINS_BASE_PATH)/$(RK358X_GLIBC_DIR)
+###                |---Toolchain-spec-handy-ruler----------------|
+RK358X_GLIBC_SPEC = Rockchip RK358x GNU Libc toolchain
+
 # Rockchip A33XX-GLIBC
 TOOLCHAIN_A33XX_GLIBC = a33xx-glibc
 
Index: build-system/targets-config.mk.template
===================================================================
--- build-system/targets-config.mk.template	(revision 9)
+++ build-system/targets-config.mk.template	(revision 10)
@@ -85,6 +85,9 @@
 # rk339x-glibc:
 BUILD_RK339X_GLIBC = true
 
+# rk358x-glibc:
+BUILD_RK358X_GLIBC = true
+
 # a33xx-glibc:
 BUILD_A33XX_GLIBC = true
 
Index: core/binutils/2.40/Makefile
===================================================================
--- core/binutils/2.40/Makefile	(revision 9)
+++ core/binutils/2.40/Makefile	(revision 10)
@@ -28,6 +28,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -341,6 +342,23 @@
 extra_configure_switches += --with-sysroot=$(sysroot_dir)
 endif
 
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC)),)
+extra_configure_switches  = '--with-pkgversion=Radix $(TOOLCHAINS_VERSION)'
+extra_configure_switches += '--with-bugurl=https://radix.pro'
+# experimental gold linker( DEFAULT_LD=ld.bfd ):
+extra_configure_switches += --enable-gold=yes
+extra_configure_switches += --enable-ld=default
+extra_configure_switches += --enable-werror=no
+# standard options:
+extra_configure_switches += --disable-multilib
+extra_configure_switches += --with-cpu=cortex-a75
+extra_configure_switches += --with-arch=armv8-a
+extra_configure_switches += --with-fpu=neon-fp-armv8
+extra_configure_switches += --with-abi=lp64
+extra_configure_switches += --disable-compressed-debug-sections
+extra_configure_switches += --with-sysroot=$(sysroot_dir)
+endif
+
 ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_A33XX_GLIBC)),)
 extra_configure_switches  = '--with-pkgversion=Radix $(TOOLCHAINS_VERSION)'
 extra_configure_switches += '--with-bugurl=https://radix.pro'
Index: core/gcc/12.2.0/Makefile
===================================================================
--- core/gcc/12.2.0/Makefile	(revision 9)
+++ core/gcc/12.2.0/Makefile	(revision 10)
@@ -28,6 +28,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -116,6 +117,7 @@
                              $(TOOLCHAIN_A311X_GLIBC)  \
                              $(TOOLCHAIN_RK33XX_GLIBC) \
                              $(TOOLCHAIN_RK339X_GLIBC) \
+                             $(TOOLCHAIN_RK358X_GLIBC) \
                              $(TOOLCHAIN_M1000_GLIBC)),)
 PATCHES = PATCHES.aarch64
 else
@@ -1114,6 +1116,72 @@
 extra_configure_switches += --disable-libssp
 extra_configure_switches += --enable-shared
 extra_configure_switches += --enable-plugin
+extra_configure_switches += --enable-lto
+extra_configure_switches += --enable-nls
+extra_configure_switches += --with-included-gettext
+endif
+endif
+
+
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC)),)
+extra_configure_switches  = '--with-pkgversion=Radix $(TOOLCHAINS_VERSION)'
+extra_configure_switches += '--with-bugurl=https://radix.pro'
+extra_configure_switches += --libdir=$(TOOLCHAIN_PATH)/lib$(LIBSUFFIX)
+extra_configure_switches += --disable-multiarch
+extra_configure_switches += --disable-multilib
+extra_configure_switches += --with-arch=armv8-a
+extra_configure_switches += --with-cpu=cortex-a75.cortex-a55
+extra_configure_switches += --with-abi=lp64
+# add
+extra_configure_switches += --enable-gold
+extra_configure_switches += --enable-c99
+extra_configure_switches += --enable-long-long
+extra_configure_switches += --disable-isl-version-check
+ifeq ($(FLAVOUR),static)
+extra_configure_switches += --disable-libatomic
+extra_configure_switches += --disable-libgomp
+extra_configure_switches += --disable-libitm
+extra_configure_switches += --disable-libmudflap
+extra_configure_switches += --disable-libquadmath
+extra_configure_switches += --disable-libsanitizer
+extra_configure_switches += --disable-libssp
+extra_configure_switches += --disable-libstdc++-v3
+extra_configure_switches += --disable-threads
+extra_configure_switches += --enable-languages=c
+extra_configure_switches += --disable-shared
+extra_configure_switches += --disable-nls
+# without-headers replacement, to make libgcc independed from glibc:
+extra_configure_switches += --with-newlib
+endif
+ifeq ($(FLAVOUR),second)
+extra_configure_switches += --with-sysroot=$(sysroot_dir)
+extra_configure_switches += --disable-libatomic
+extra_configure_switches += --disable-libgomp
+extra_configure_switches += --disable-libitm
+extra_configure_switches += --disable-libmudflap
+extra_configure_switches += --disable-libquadmath
+extra_configure_switches += --disable-libsanitizer
+extra_configure_switches += --disable-libssp
+extra_configure_switches += --disable-libstdc++-v3
+extra_configure_switches += --enable-languages=c
+extra_configure_switches += --disable-nls
+endif
+ifeq ($(FLAVOUR),full)
+extra_configure_switches += --with-sysroot=$(sysroot_dir)
+extra_configure_switches += --enable-languages=c,c++,d,objc,obj-c++,fortran,go,lto,ada
+extra_configure_switches += --enable-libstdcxx-dual-abi
+extra_configure_switches += --with-default-libstdcxx-abi=new
+extra_configure_switches += --disable-libstdcxx-pch
+extra_configure_switches += --disable-libunwind-exceptions
+extra_configure_switches += --with-linker-hash-style=gnu
+extra_configure_switches += --enable-gnu-unique-object
+extra_configure_switches += --enable-clocale=gnu
+extra_configure_switches += --enable-__cxa_atexit
+extra_configure_switches += --enable-threads=posix
+extra_configure_switches += --enable-default-ssp
+extra_configure_switches += --disable-libssp
+extra_configure_switches += --enable-shared
+extra_configure_switches += --enable-plugin
 extra_configure_switches += --enable-lto
 extra_configure_switches += --enable-nls
 extra_configure_switches += --with-included-gettext
Index: core/gdb/12.1/Makefile
===================================================================
--- core/gdb/12.1/Makefile	(revision 9)
+++ core/gdb/12.1/Makefile	(revision 10)
@@ -27,6 +27,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -309,6 +310,15 @@
 extra_configure_switches += --with-build-sysroot=$(sysroot_dir)
 endif
 
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC)),)
+extra_configure_switches  = --disable-multilib
+extra_configure_switches += --with-arch=armv8-a
+extra_configure_switches += --with-cpu=cortex-a75
+extra_configure_switches += --with-fpu=neon-fp-armv8
+extra_configure_switches += --with-abi=lp64
+extra_configure_switches += --with-build-sysroot=$(sysroot_dir)
+endif
+
 ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_A33XX_GLIBC)),)
 extra_configure_switches  = --disable-multilib
 extra_configure_switches += --with-arch=armv8-a
Index: core/glibc/2.36/Makefile
===================================================================
--- core/glibc/2.36/Makefile	(revision 9)
+++ core/glibc/2.36/Makefile	(revision 10)
@@ -18,6 +18,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -75,6 +76,7 @@
 ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RK328X_GLIBC) \
                              $(TOOLCHAIN_RK33XX_GLIBC) \
                              $(TOOLCHAIN_RK339X_GLIBC) \
+                             $(TOOLCHAIN_RK358X_GLIBC) \
                              $(TOOLCHAIN_A33XX_GLIBC)),)
 REQUIRES  = core/linux/6.0.7
 endif
@@ -243,6 +245,10 @@
 environment += CFLAGS="-g -O3 -march=armv8-a -mcpu=cortex-a72.cortex-a53 -mabi=lp64"
 endif
 
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC))
+environment += CFLAGS="-g -O3 -march=armv8-a -mcpu=cortex-a75.cortex-a55 -mabi=lp64"
+endif
+
 ifeq ($(TOOLCHAIN),$(TOOLCHAIN_A33XX_GLIBC))
 environment += CFLAGS="-g -O3 -march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard"
 endif
@@ -304,6 +310,7 @@
                              $(TOOLCHAIN_A311X_GLIBC)  \
                              $(TOOLCHAIN_RK33XX_GLIBC) \
                              $(TOOLCHAIN_RK339X_GLIBC) \
+                             $(TOOLCHAIN_RK358X_GLIBC) \
                              $(TOOLCHAIN_M1000_GLIBC)),)
 LIB_NAMES_SUFFIX = lp64
 endif
@@ -602,6 +609,27 @@
 endif
 endif
 
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC))
+extra_configure_switches   = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches  += --with-headers=$(sysroot_dir)/usr/include
+ifeq ($(FLAVOUR),headers)
+extra_configure_switches  += --with-binutils=$(TOOLCHAIN_PATH)/bin
+extra_configure_switches  += --enable-kernel=3.14.29
+extra_configure_switches  += --disable-profile
+extra_configure_switches  += --enable-bind-now
+extra_configure_switches  += --without-gd
+extra_configure_switches  += --without-cvs
+endif
+ifeq ($(FLAVOUR),full)
+extra_configure_switches  += --with-binutils=$(TOOLCHAIN_PATH)/bin
+extra_configure_switches  += --enable-kernel=3.14.29
+extra_configure_switches  += --disable-profile
+extra_configure_switches  += --enable-bind-now
+extra_configure_switches  += --without-gd
+extra_configure_switches  += --without-cvs
+endif
+endif
+
 ifeq ($(TOOLCHAIN),$(TOOLCHAIN_A33XX_GLIBC))
 extra_configure_switches   = --libdir=/usr/lib$(LIBSUFFIX)
 extra_configure_switches  += --with-headers=$(sysroot_dir)/usr/include
Index: core/linux/5.19.14/Makefile
===================================================================
--- core/linux/5.19.14/Makefile	(revision 9)
+++ core/linux/5.19.14/Makefile	(revision 10)
@@ -17,6 +17,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -65,7 +66,7 @@
 ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_H5_GLIBC) \
                              $(TOOLCHAIN_S9XX_GLIBC) $(TOOLCHAIN_A311X_GLIBC) \
                              $(TOOLCHAIN_RK33XX_GLIBC) $(TOOLCHAIN_RK339X_GLIBC) \
-                             $(TOOLCHAIN_M1000_GLIBC)),)
+                             $(TOOLCHAIN_RK358X_GLIBC) $(TOOLCHAIN_M1000_GLIBC)),)
 arch = arm64
 endif
 
Index: core/linux/6.0.7/Makefile
===================================================================
--- core/linux/6.0.7/Makefile	(revision 9)
+++ core/linux/6.0.7/Makefile	(revision 10)
@@ -17,6 +17,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -65,7 +66,7 @@
 ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_H5_GLIBC) \
                              $(TOOLCHAIN_S9XX_GLIBC) $(TOOLCHAIN_A311X_GLIBC) \
                              $(TOOLCHAIN_RK33XX_GLIBC) $(TOOLCHAIN_RK339X_GLIBC) \
-                             $(TOOLCHAIN_M1000_GLIBC)),)
+                             $(TOOLCHAIN_RK358X_GLIBC) $(TOOLCHAIN_M1000_GLIBC)),)
 arch = arm64
 endif
 
Index: products/Makefile
===================================================================
--- products/Makefile	(revision 9)
+++ products/Makefile	(revision 10)
@@ -28,6 +28,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)
@@ -132,6 +133,9 @@
 ifeq ($(TOOLCHAIN),$(TOOLCHAIN_RK339X_GLIBC))
 REQUIRES  = products/RK339X-glibc/1.9.2
 endif
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_RK358X_GLIBC))
+REQUIRES  = products/RK358X-glibc/1.9.2
+endif
 ifeq ($(TOOLCHAIN),$(TOOLCHAIN_A33XX_GLIBC))
 REQUIRES  = products/A33XX-glibc/1.9.2
 endif
Index: products/RK358X-glibc/1.9.2/Makefile
===================================================================
--- products/RK358X-glibc/1.9.2/Makefile	(nonexistent)
+++ products/RK358X-glibc/1.9.2/Makefile	(revision 10)
@@ -0,0 +1,35 @@
+
+
+COMPONENT_TARGETS = $(TOOLCHAIN_RK358X_GLIBC)
+
+export TOOLCHAIN_VERSION = 1.9.2
+
+include ../../../build-system/config.mk
+
+REQUIRES  = core/gcc/12.2.0^full
+REQUIRES += tools/patchelf/0.18.0
+REQUIRES += core/gdb/12.1
+
+# ======= __END_OF_REQUIRES__ =======
+
+tarball_name    = $(TOOLCHAIN_DIR)-$(TOOLCHAIN_VERSION).tar.xz
+tarball         = $(TARGET_BUILD_DIR)/$(tarball_name)
+
+tarball_target  = $(TARGET_BUILD_DIR)/.tarball-created
+
+BUILD_TARGETS   = $(tarball_target)
+
+PRODUCT_TARGETS = $(tarball)
+
+include ../../../build-system/core.mk
+
+
+$(tarball): $(tarball_target)
+
+$(tarball_target):
+	@echo ""
+	@echo "Creating $(tarball_name) tarball..."
+	@cd $(TOOLCHAINS_BASE_PATH) ; \
+	  tar -cf - $(TOOLCHAIN_DIR)/$(TOOLCHAIN_VERSION) | xz --threads=0 > $(tarball_name)
+	@mv $(TOOLCHAINS_BASE_PATH)/$(tarball_name) $(TARGET_BUILD_DIR)
+	@touch $@
Index: products/RK358X-glibc/1.9.2/RK358X-TEST/.config
===================================================================
--- products/RK358X-glibc/1.9.2/RK358X-TEST/.config	(nonexistent)
+++ products/RK358X-glibc/1.9.2/RK358X-TEST/.config	(revision 10)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+#################################################################
+#
+# default common variables:
+#
+if test -z "$HOST"; then
+  export HOST=x86_64-pc-linux-gnu
+fi
+
+if test -z "$TARGET"; then
+  export TARGET=aarch64-rk358x-linux-gnu
+fi
+
+if test -z "$TOOLCHAIN_PATH"; then
+  export TOOLCHAIN_PATH=/opt/toolchains/aarch64-RK358X-linux-glibc/1.9.2
+fi
+
+#
+# END of default common variables.
+#
+#################################################################
Index: products/RK358X-glibc/1.9.2/RK358X-TEST/build.sh
===================================================================
--- products/RK358X-glibc/1.9.2/RK358X-TEST/build.sh	(nonexistent)
+++ products/RK358X-glibc/1.9.2/RK358X-TEST/build.sh	(revision 10)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+. ./.config
+
+export PATH=$TOOLCHAIN_PATH/bin:$PATH
+
+ARCH_FLAGS=" -march=armv8-a -mcpu=cortex-a75.cortex-a55 -mabi=lp64"
+
+$TARGET-gcc -g -O3 -gdwarf-2 -fomit-frame-pointer $ARCH_FLAGS -I$TOOLCHAIN_PATH/$TARGET/include -c -o main.o main.c
+$TARGET-gcc $ARCH_FLAGS $FPU_FLAGS -o main main.o
+
+$TARGET-objdump -x main > main.map
+
+$TARGET-strip main -o main.elf
+
+$TARGET-objcopy -O srec main.elf main.srec
+$TARGET-objcopy -O ihex main.elf main.hex
+$TARGET-objdump -S -d main.o > main.asm
+$TARGET-objdump -S -d main > full.program.asm

Property changes on: products/RK358X-glibc/1.9.2/RK358X-TEST/build.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: products/RK358X-glibc/1.9.2/RK358X-TEST/clean.sh
===================================================================
--- products/RK358X-glibc/1.9.2/RK358X-TEST/clean.sh	(nonexistent)
+++ products/RK358X-glibc/1.9.2/RK358X-TEST/clean.sh	(revision 10)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+rm -f full.program.asm
+rm -f main
+rm -f main.asm
+rm -f main.elf
+rm -f main.hex
+rm -f main.map
+rm -f main.o
+rm -f main.srec

Property changes on: products/RK358X-glibc/1.9.2/RK358X-TEST/clean.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: products/RK358X-glibc/1.9.2/RK358X-TEST/main.c
===================================================================
--- products/RK358X-glibc/1.9.2/RK358X-TEST/main.c	(nonexistent)
+++ products/RK358X-glibc/1.9.2/RK358X-TEST/main.c	(revision 10)
@@ -0,0 +1,17 @@
+
+#include <stdlib.h>
+#include <inttypes.h>
+
+int main()
+{
+   float d, f = 3.1415;
+
+   uint32_t a = 7, b = 3, c, r;
+
+   c = a / b;
+   r = a % b;
+
+   d = f * 2.1;
+
+   return( 0 );
+}
Index: tools/patchelf/0.18.0/Makefile
===================================================================
--- tools/patchelf/0.18.0/Makefile	(revision 9)
+++ tools/patchelf/0.18.0/Makefile	(revision 10)
@@ -18,6 +18,7 @@
 COMPONENT_TARGETS += $(TOOLCHAIN_A311X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK33XX_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_RK339X_GLIBC)
+COMPONENT_TARGETS += $(TOOLCHAIN_RK358X_GLIBC)
 COMPONENT_TARGETS += $(TOOLCHAIN_A33XX_GLIBC)
 
 COMPONENT_TARGETS += $(TOOLCHAIN_POWER8_GLIBC)