Merge pull request #7 from NextThingCo/by/chip/next/wait_for_linux
Fix the non-fastboot flashing early-quit scenario.
This commit is contained in:
commit
db17e4f78c
@ -131,7 +131,11 @@ prepare_uboot_script() {
|
||||
echo "echo " >>"${UBOOT_SCRIPT_SRC}"
|
||||
echo "echo *****************[ FLASHING DONE ]*****************" >>"${UBOOT_SCRIPT_SRC}"
|
||||
echo "echo " >>"${UBOOT_SCRIPT_SRC}"
|
||||
echo "while true; do; sleep 10; done;" >>"${UBOOT_SCRIPT_SRC}"
|
||||
if [[ "${METHOD}" == "fel" ]]; then
|
||||
echo "reset"
|
||||
else
|
||||
echo "while true; do; sleep 10; done;" >>"${UBOOT_SCRIPT_SRC}"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkimage -A arm -T script -C none -n "flash CHIP" -d "${UBOOT_SCRIPT_SRC}" "${UBOOT_SCRIPT}"
|
||||
@ -204,4 +208,13 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${METHOD}" == "fel" ]]; then
|
||||
if ! wait_for_linuxboot; then
|
||||
echo "ERROR: could not flash":
|
||||
rm -rf $(TMPDIR)
|
||||
exit 1
|
||||
else
|
||||
${SCRIPTDIR}/verify.sh
|
||||
fi
|
||||
fi
|
||||
rm -rf "${TMPDIR}"
|
||||
|
@ -149,11 +149,11 @@ cache_download "${FW_IMAGE_DIR}" ${BR_URL} u-boot-dtb.bin
|
||||
|
||||
BUILDROOT_OUTPUT_DIR="${FW_DIR}" ${FLASH_SCRIPT} ${FLASH_SCRIPT_OPTION} || echo "ERROR: could not flash" && exit 1
|
||||
|
||||
if ! wait_for_linuxboot; then
|
||||
echo "ERROR: could not flash"
|
||||
exit 1
|
||||
else
|
||||
${SCRIPTDIR}/verify.sh
|
||||
fi
|
||||
#if ! wait_for_linuxboot; then
|
||||
# echo "ERROR: could not flash"
|
||||
# exit 1
|
||||
#else
|
||||
# ${SCRIPTDIR}/verify.sh
|
||||
#fi
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user