From 5c123985a172aefa67b052606206af5afb084a43 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 24 May 2014 11:01:34 +1000 Subject: 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 file changed, 35 insertions(+) create mode 100755 rtems-bsps (limited to 'rtems-bsps') 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 -- cgit v1.2.3