optional argument for generated ROMFS file path.

existing headerfile path is used when argument is missing.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2023-12-28 15:44:54 +08:00 committed by Xiang Xiao
parent ba075747be
commit 4d9f2e3692

View File

@ -36,6 +36,12 @@ fsdir=${topdir}/bin
romfsimg=romfs.img
headerfile=boot_romfsimg.h
if [ -n "$1" ]; then # output file path
_path=$(dirname "$1")
# ensure output path exists
mkdir -p $_path 2>/dev/null && headerfile=$1
fi
# Sanity checks
if [ ! -d "${fsdir}" ]; then