summaryrefslogtreecommitdiff
path: root/rtems-bsps
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-05-24 11:01:34 +1000
committerChris Johns <chrisj@rtems.org>2014-05-24 11:04:45 +1000
commit5c123985a172aefa67b052606206af5afb084a43 (patch)
treeab7d84d54704cd223aba5028a45c0d39c64374b5 /rtems-bsps
parent6a740c2e70731522766f315739a6d2eb3f95043f (diff)
tools: Add rtems-bsp to list BSPs in the source tree.
This is a shell script that lists the BSPs in the source tree by architecture. The BSP name is given plus the relative path to BSP source files. The script uses the same hack, ie looking for *.cfg files, as the build system so it sees what the build system sees.
Diffstat (limited to 'rtems-bsps')
-rwxr-xr-xrtems-bsps35
1 files changed, 35 insertions, 0 deletions
diff --git a/rtems-bsps b/rtems-bsps
new file mode 100755
index 0000000000..210756fc75
--- /dev/null
+++ b/rtems-bsps
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+base="c/src/lib/libbsp"
+base_e=$(echo ${base} | sed -e 's/\//\\\//g')
+
+last_arch=""
+
+cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg | sort)
+
+max_bsp_len=0
+spaces=" "
+
+for bsp in ${cfg_list};
+do
+ bsp=$(echo ${bsp} | sed -e "s/.*\///" -e 's/\.cfg//')
+ len=${#bsp}
+ if [ $len -gt $max_bsp_len ]; then
+ max_bsp_len=$len
+ fi
+done
+
+echo "RTEMS 4.11"
+for bsp_path in ${cfg_list};
+do
+ arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//')
+ bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//')
+ path=$(echo ${bsp_path} | sed -e "s/\/make.*//")
+ if test "${last_arch}" != "${arch}"; then
+ echo "${arch}:"
+ last_arch=${arch}
+ fi
+ echo " ${bsp}${spaces:${#bsp}}${path}"
+done
+
+exit 0