forked from Imagelibrary/rtems
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.
This commit is contained in:
35
rtems-bsps
Executable file
35
rtems-bsps
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user