remove usages of res folder on making romfs
authorsunghan <sh924.chang@samsung.com>
Mon, 28 Aug 2017 06:12:01 +0000 (15:12 +0900)
committersunghan <sh924.chang@samsung.com>
Mon, 28 Aug 2017 06:12:01 +0000 (15:12 +0900)
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
tools/fs/mkromfsimg.sh

index 012a17a..c29c7e2 100755 (executable)
@@ -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
 }
 
index 017078f..b491f8c 100755 (executable)
@@ -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