You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/04/14 06:44:54 UTC
(nuttx) branch master updated: tools/configure.sh: support listing configs for board
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3451330000 tools/configure.sh: support listing configs for board
3451330000 is described below
commit 3451330000e8beb7d09f3c0f62065596e4af5eb6
Author: Yanfeng Liu <yf...@qq.com>
AuthorDate: Sun Apr 14 10:07:08 2024 +0800
tools/configure.sh: support listing configs for board
This patch supports listing configs for a given board like
- `tools/configure.sh -L sama5`
- `tools/configure.sh -L rv-virt`
- `tools/configure.sh -L virt`
Signed-off-by: Yanfeng Liu <yf...@qq.com>
---
tools/configure.sh | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tools/configure.sh b/tools/configure.sh
index b5aba45ec6..b057baa955 100755
--- a/tools/configure.sh
+++ b/tools/configure.sh
@@ -24,7 +24,7 @@ TOPDIR="${WD}/.."
MAKECMD="make"
USAGE="
-USAGE: ${0} [-E] [-e] [-l|m|c|g|n|B] [L] [-a <app-dir>] <board-selection> [make-opts]
+USAGE: ${0} [-E] [-e] [-l|m|c|g|n|B] [-L [boardname]] [-a <app-dir>] <board-selection> [make-opts]
Where:
-E enforces distclean if already configured.
@@ -70,7 +70,13 @@ unset distclean
function dumpcfgs
{
- configlist=`find ${TOPDIR}/boards -name defconfig`
+ if [ -n "$1" ]; then
+ local boards=$(find ${TOPDIR}/boards -mindepth 3 -maxdepth 3 -type d -name "*$1*")
+ [ -z "$boards" ] && { echo board "$1" not found; return ;}
+ configlist=$(find $boards -name defconfig -type f)
+ else
+ configlist=$(find ${TOPDIR}/boards -name defconfig -type f)
+ fi
for defconfig in ${configlist}; do
config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g"`
boardname=`echo ${config} | cut -d'/' -f3`
@@ -109,7 +115,8 @@ while [ ! -z "$1" ]; do
exit 0
;;
-L )
- dumpcfgs
+ shift
+ dumpcfgs $1
exit 0
;;
*)