echo "Usage: ${PROG_NAME} [OPTIONS...] [IP ADDRESS]"
echo
echo "Options:"
+ echo " -f deploy folder (default is ./rootfs)"
echo " -h display this help and exit"
echo " -r reboot after deploying files"
echo " -w compile with W=1"
reboot=0
warnings_opts=""
archive=0
+deploydir=${DEPLOYDIR}
-while getopts "hrwz" flag ;do
+while getopts "f:hrwz" flag ;do
case ${flag} in
h)
print_usage
exit 0
;;
+ f)
+ deploydir=${OPTARG}
+ ;;
r)
reboot=1
;;
fi
function rootfs_install() {
- rm -rf ${DEPLOYDIR}/lib
- mkdir -p ${DEPLOYDIR}
+ mkdir -p ${deploydir}
if [ x"${CONFIG_MODULES}" = x"1" ]; then
- ${KMAKE} INSTALL_MOD_PATH=${DEPLOYDIR} modules_install
+ ${KMAKE} INSTALL_MOD_PATH=${deploydir} modules_install
fi
- mkdir -p ${DEPLOYDIR}/boot
+ mkdir -p ${deploydir}/boot
- cp ${BOOT_SRC}/Image ${DEPLOYDIR}/boot/Image-latest
- cp ${DTB_SRC} ${DEPLOYDIR}/boot/latest.dtb
+ cp ${BOOT_SRC}/Image ${deploydir}/boot/Image-latest
+ cp ${DTB_SRC} ${deploydir}/boot/latest.dtb
}
function rootfs_archive() {
- pushd ${DEPLOYDIR}
+ pushd ${deploydir}
tar cf - * | xz > ../${ARCHIVE}
popd
}