mkromfsimg: Add optional rcS file path

Add an option to mkromfsimg.sh to specify the target rcS file path.
This commit is contained in:
Takayoshi Koizumi 2021-09-13 06:38:50 +09:00 committed by Xiang Xiao
parent dfb4b6e3d8
commit 7a68470e89

View File

@ -33,7 +33,8 @@ headerfile=nsh_romfsimg.h
nofat=$1
usefat=true
topdir=$2
usage="USAGE: $0 [-nofat] <topdir>"
rcs_fname=$3
usage="USAGE: $0 [-nofat] <topdir> [<rcsfile>]"
# 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