From: sunghan Date: Tue, 19 Sep 2017 08:16:42 +0000 (+0900) Subject: artik053: add flashing script to erase user fs X-Git-Tag: 1.1_Public_Release~173^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=100907402f4c2c7c1383d087e2bb604c9b38501b;p=rtos%2Ftinyara.git artik053: add flashing script to erase user fs Sometimes, we should erase user fs at first flashing on new board. So, ERASE_USERFS option is added. --- diff --git a/build/configs/artik053/.flashSpec.xml b/build/configs/artik053/.flashSpec.xml index 6ffdb58..c774b02 100644 --- a/build/configs/artik053/.flashSpec.xml +++ b/build/configs/artik053/.flashSpec.xml @@ -21,5 +21,6 @@ + diff --git a/build/configs/artik053/artik053_download.sh b/build/configs/artik053/artik053_download.sh index c3be9c9..fedaca7 100755 --- a/build/configs/artik053/artik053_download.sh +++ b/build/configs/artik053/artik053_download.sh @@ -102,9 +102,26 @@ main() popd ;; + ERASE_USERFS|erase_userfs) + echo "USERFS :" + + ROMFS_FLASHING_CFG=${OPENOCD_DIR_PATH}/romfs_flashing.cfg + echo "set romfs_partition_enable 0" > ${ROMFS_FLASHING_CFG} + if [ "${CONFIG_FS_ROMFS}" == "y" ]; then + echo "set romfs_partition_enable 1" > ${ROMFS_FLASHING_CFG} + fi + + pushd ${OPENOCD_DIR_PATH} + ${OPENOCD_BIN_PATH}/openocd -f artik053.cfg -c ' \ + flash_erase_part user; \ + exit' + rm ${ROMFS_FLASHING_CFG} + popd + ;; + *) echo "${arg} is not suppported in artik053" - echo "Usage : make download [ ALL ]" + echo "Usage : make download [ ALL | ERASE_USERFS ]" exit 1 ;; esac