source: rtems/rtems-bsps @ 5c123985

4.11
Last change on this file since 5c123985 was 5c123985, checked in by Chris Johns <chrisj@…>, on May 24, 2014 at 1:01:34 AM

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.

  • Property mode set to 100755
File size: 751 bytes
Line 
1#! /bin/sh
2
3base="c/src/lib/libbsp"
4base_e=$(echo ${base} | sed -e 's/\//\\\//g')
5
6last_arch=""
7
8cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg | sort)
9
10max_bsp_len=0
11spaces="                             "
12
13for bsp in ${cfg_list};
14do
15  bsp=$(echo ${bsp} | sed -e "s/.*\///" -e 's/\.cfg//')
16  len=${#bsp}
17  if [ $len -gt $max_bsp_len ]; then
18    max_bsp_len=$len
19  fi
20done
21
22echo "RTEMS 4.11"
23for bsp_path in ${cfg_list};
24do
25 arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//')
26 bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//')
27 path=$(echo ${bsp_path} | sed -e "s/\/make.*//")
28 if test "${last_arch}" != "${arch}"; then
29   echo "${arch}:"
30   last_arch=${arch}
31 fi
32 echo " ${bsp}${spaces:${#bsp}}${path}"
33done
34
35exit 0
Note: See TracBrowser for help on using the repository browser.