From ed8ff9e5920fabe9f165740b9b57b350b2990652 Mon Sep 17 00:00:00 2001 From: sunghan Date: Mon, 28 Aug 2017 15:12:01 +0900 Subject: [PATCH] remove usages of res folder on making romfs We don't need to copy contents of romfs to res folder. Let's make a romfs image in contents folder directly. --- build/configs/sidk_s5jt200/sidk_s5jt200_download.sh | 10 +++------- tools/fs/mkromfsimg.sh | 8 ++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/build/configs/sidk_s5jt200/sidk_s5jt200_download.sh b/build/configs/sidk_s5jt200/sidk_s5jt200_download.sh index 012a17a..c29c7e2 100755 --- a/build/configs/sidk_s5jt200/sidk_s5jt200_download.sh +++ b/build/configs/sidk_s5jt200/sidk_s5jt200_download.sh @@ -29,12 +29,12 @@ BOARD_NAME=${CONFIG_ARCH_BOARD} # ENV : Set to proper path's OS_DIR_PATH=${PWD} BUILD_DIR_PATH=${OS_DIR_PATH}/../build -OUTPUT_PATH=${BUILD_DIR_PATH}/output OUTPUT_BIN_PATH=${BUILD_DIR_PATH}/output/bin BOARD_DIR_PATH=${BUILD_DIR_PATH}/configs/${BOARD_NAME} OPENOCD_DIR_PATH=${BOARD_DIR_PATH}/tools/openocd FW_DIR_PATH=${BOARD_DIR_PATH}/boot_bin -RESOURCE_DIR_PATH=${OS_DIR_PATH}/../tools/fs/contents +FSTOOLS_DIR_PATH=${OS_DIR_PATH}/../tools/fs +RESOURCE_DIR_PATH=${FSTOOLS_DIR_PATH}/contents SYSTEM_TYPE=`getconf LONG_BIT` if [ "$SYSTEM_TYPE" = "64" ]; then @@ -49,12 +49,8 @@ prepare_resource() if [ -d "${RESOURCE_DIR_PATH}" ]; then echo "Packing resources into romfs.img ..." - # create resource directory in ${output_path} - mkdir -p ${OUTPUT_PATH}/res - cp -rf ${RESOURCE_DIR_PATH}/* ${OUTPUT_PATH}/res/ - # create romfs.img - sh ${OS_DIR_PATH}/../tools/fs/mkromfsimg.sh + sh ${FSTOOLS_DIR_PATH}/mkromfsimg.sh fi } diff --git a/tools/fs/mkromfsimg.sh b/tools/fs/mkromfsimg.sh index 017078f..b491f8c 100755 --- a/tools/fs/mkromfsimg.sh +++ b/tools/fs/mkromfsimg.sh @@ -65,13 +65,13 @@ fi topdir=$PWD buildpath=${topdir}/../build -fsdir=${buildpath}/output/res/ +contentsdir=${topdir}/../tools/fs/contents romfsimg=${buildpath}/output/bin/romfs.img # Sanity checks -if [ ! -d "${fsdir}" ]; then - echo "ERROR: Directory ${fsdir} does not exist" +if [ ! -d "${contentsdir}" ]; then + echo "ERROR: Directory ${contentsdir} does not exist" exit 1 fi @@ -83,6 +83,6 @@ genromfs -h 1>/dev/null 2>&1 || { \ # Now we are ready to make the ROMFS image -genromfs -f ${romfsimg} -d ${fsdir} -V "NuttXBootVol" || { echo "genromfs failed" ; exit 1 ; } +genromfs -f ${romfsimg} -d ${contentsdir} -V "NuttXBootVol" || { echo "genromfs failed" ; exit 1 ; } # And, finally, create the header file -- 2.7.4