[rtems commit] tools: Add rtems-bsp to list BSPs in the source tree.

Chris Johns chrisj at rtems.org
Sat May 24 00:56:42 UTC 2014


Module:    rtems
Branch:    master
Commit:    5c123985a172aefa67b052606206af5afb084a43
Changeset: http://git.rtems.org/rtems/commit/?id=5c123985a172aefa67b052606206af5afb084a43

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sat May 24 11:01:34 2014 +1000

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.

---

 rtems-bsps |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/rtems-bsps b/rtems-bsps
new file mode 100755
index 0000000..210756f
--- /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




More information about the vc mailing list