summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Dimitrov <dimitar@dinux.eu>2021-01-15 18:19:25 (GMT)
committerDimitar Dimitrov <dimitar@dinux.eu>2021-01-19 19:18:55 (GMT)
commitc800bc8c82710757d347d1a1b5cf3359d3f71433 (patch)
tree99f3e4c6123d6a9890be9274753f986ae51ad559
parentfcf323336eab38aa8d0fffe75c11062d3e049caa (diff)
Add PRU cross tool target
Add sample configuration for building cross toolchain for the TI PRU. PRU cores are present in many of the BeagleBone single board computers. More information about the PRU can be found in https://bbb.io/pru Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
-rw-r--r--config/arch/pru.in8
-rw-r--r--config/kernel/linux.in2
-rw-r--r--samples/pru/crosstool.config15
-rw-r--r--samples/pru/reported.by3
-rw-r--r--scripts/build/arch/pru.sh5
5 files changed, 32 insertions, 1 deletions
diff --git a/config/arch/pru.in b/config/arch/pru.in
new file mode 100644
index 0000000..f26dc7a
--- /dev/null
+++ b/config/arch/pru.in
@@ -0,0 +1,8 @@
+# PRU specific config options
+
+## no-package
+## select ARCH_SUPPORTS_8
+## select ARCH_DEFAULT_8
+##
+## help The TI PRU core, as defined by:
+## help http://bbb.io/pru
diff --git a/config/kernel/linux.in b/config/kernel/linux.in
index 2602b53..6ff8192 100644
--- a/config/kernel/linux.in
+++ b/config/kernel/linux.in
@@ -1,6 +1,6 @@
# Linux kernel options
-## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE
+## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU
## select KERNEL_SUPPORTS_SHARED_LIBS
## help Build a toolchain targeting systems running Linux as a kernel.
diff --git a/samples/pru/crosstool.config b/samples/pru/crosstool.config
new file mode 100644
index 0000000..5072dd6
--- /dev/null
+++ b/samples/pru/crosstool.config
@@ -0,0 +1,15 @@
+CT_CONFIG_VERSION="3"
+CT_ARCH_PRU=y
+CT_OMIT_TARGET_VENDOR=y
+# CT_DEMULTILIB is not set
+# CT_LIBC_NEWLIB_FVWRITE_IN_STREAMIO is not set
+# CT_LIBC_NEWLIB_UNBUF_STREAM_OPT is not set
+# CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION is not set
+# CT_LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC is not set
+# CT_LIBC_NEWLIB_MULTITHREAD is not set
+CT_LIBC_NEWLIB_EXTRA_SECTIONS=y
+# CT_LIBC_NEWLIB_WIDE_ORIENT is not set
+CT_LIBC_NEWLIB_NANO_MALLOC=y
+CT_LIBC_NEWLIB_NANO_FORMATTED_IO=y
+CT_CC_LANG_CXX=y
+CT_COMP_TOOLS_MAKE=y
diff --git a/samples/pru/reported.by b/samples/pru/reported.by
new file mode 100644
index 0000000..eafd0c4
--- /dev/null
+++ b/samples/pru/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Dimitar Dimitrov"
+reporter_url="https://github.com/dinuxbg/gnupru"
+reporter_comment="PRU cross toolchain"
diff --git a/scripts/build/arch/pru.sh b/scripts/build/arch/pru.sh
new file mode 100644
index 0000000..c4d61ce
--- /dev/null
+++ b/scripts/build/arch/pru.sh
@@ -0,0 +1,5 @@
+# Compute PRU-specific values
+
+CT_DoArchTupleValues() {
+ CT_TARGET_ARCH="${CT_ARCH}"
+}