From 7a68470e895786a0cccd6630149e3c48aaf96bf0 Mon Sep 17 00:00:00 2001 From: Takayoshi Koizumi Date: Mon, 13 Sep 2021 06:38:50 +0900 Subject: [PATCH] mkromfsimg: Add optional rcS file path Add an option to mkromfsimg.sh to specify the target rcS file path. --- tools/mkromfsimg.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/mkromfsimg.sh b/tools/mkromfsimg.sh index 2092488368..ccd8163979 100755 --- a/tools/mkromfsimg.sh +++ b/tools/mkromfsimg.sh @@ -33,7 +33,8 @@ headerfile=nsh_romfsimg.h nofat=$1 usefat=true topdir=$2 -usage="USAGE: $0 [-nofat] " +rcs_fname=$3 +usage="USAGE: $0 [-nofat] []" # Verify if we have the optional "-nofat" @@ -42,6 +43,7 @@ if [ "$nofat" == "-nofat" ]; then usefat=false else topdir=$1 + rcs_fname=$2 fi if [ -z "$topdir" -o ! -d "$topdir" ]; then @@ -50,6 +52,13 @@ if [ -z "$topdir" -o ! -d "$topdir" ]; then exit 1 fi +# Verify if we have the optional "rcs_fname" + +if [ ! -z "$rcs_fname" ]; then + rcstemplate=$rcs_fname + echo "Target template is $rcstemplate" +fi + # Extract all values from the .config in the $topdir that contains all of the NuttX # configuration settings. The .config file was intended to be include-able by makefiles # and source-able by scripts. Unfortunately,there are too many syntactic difference