Skip to content

Commit

Permalink
tools/refresh.sh: Add option to refresh all archs or all chips
Browse files Browse the repository at this point in the history
Currently when we modify some Kconfig related to some chip or
some architecture we need to run refresh.sh to all boards that
is too slow (more than one hour to finish).

This patch modify the script to update only the boards configs
of an specific chip or only the boards of an specific architecture.

Examples:

$ ./tools/refresh.sh --silent --defaults arch renesas
  Normalize us7032evb1/ostest
  Normalize us7032evb1/nsh
  Normalize skp16c26/ostest
  Normalize rx65n-rsk2mb/netnsh
  Normalize rx65n-rsk2mb/ipv6
  Normalize rx65n-rsk2mb/nsh
  Normalize rx65n-rsk1mb/netnsh
  Normalize rx65n-rsk1mb/nsh
  Normalize rx65n-grrose/netnsh
  Normalize rx65n-grrose/ipv6
  Normalize rx65n-grrose/nsh
  Normalize rx65n/nsh

It updates the boards from all 'renesas' architecture (m9c, rx65n, sh1)

$ ./tools/refresh.sh --silent --defaults chip rx65n
  Normalize rx65n-rsk2mb/netnsh
  Normalize rx65n-rsk2mb/ipv6
  Normalize rx65n-rsk2mb/nsh
  Normalize rx65n-rsk1mb/netnsh
  Normalize rx65n-rsk1mb/nsh
  Normalize rx65n-grrose/netnsh
  Normalize rx65n-grrose/ipv6
  Normalize rx65n-grrose/nsh
  Normalize rx65n/nsh

It updates all the boards from renesas chip 'rx65n' family
  • Loading branch information
acassis committed May 12, 2023
1 parent eedca9d commit 528845a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tools/refresh.sh
Expand Up @@ -68,10 +68,12 @@ while [ ! -z "$1" ]; do
echo " --help"
echo " Show this help message and exit"
echo " <board>"
echo " The board directory under nuttx/boards"
echo " The board directory under nuttx/boards/arch/chip/"
echo " <config>"
echo " The board configuration directory under nuttx/boards/<board>/configs"
echo " Note: all configuration is refreshed if <board>:<config> equals all."
echo " The board configuration directory under nuttx/boards/arch/chip/<board>/configs"
echo " Note1: all configuration is refreshed if <board>:<config> equals all."
echo " Note2: all configuration of arch XYZ is refreshed if \"arch namearch\" is passed"
echo " Note3: all configuration of chip XYZ is refreshed if \"chip chipname\" is passed"
exit 0
;;
* )
Expand Down Expand Up @@ -107,6 +109,18 @@ fi

if [ "X${CONFIGS}" == "Xall" ]; then
CONFIGS=`find boards -name defconfig | cut -d'/' -f4,6`
else
if [[ "X${CONFIGS}" == "Xarch "* ]]; then
array=(${CONFIGS})
ARCH=${array[1]}
CONFIGS=`find boards/${ARCH} -name defconfig | cut -d'/' -f4,6`
else
if [[ "X${CONFIGS}" == "Xchip "* ]]; then
array=(${CONFIGS})
CHIP=${array[1]}
CONFIGS=`find boards/*/${CHIP} -name defconfig | cut -d'/' -f4,6`
fi
fi
fi

for CONFIG in ${CONFIGS}; do
Expand Down

0 comments on commit 528845a

Please sign in to comment.