Merge branch 'chip/next' into chip/stable

This commit is contained in:
Alex Kaplan 2016-01-19 13:51:36 -08:00
commit 8fd7d8ace6
3 changed files with 26 additions and 13 deletions

View File

@ -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}"

View File

@ -103,7 +103,7 @@ SPL="$BUILDROOT_OUTPUT_DIR/images/sunxi-spl.bin"
SPL_MEM_ADDR=0x43000000
UBOOT="$BUILDROOT_OUTPUT_DIR/images/u-boot-dtb.bin"
PADDED_UBOOT="$TMPDIR/padded-uboot"
PADDED_UBOOT_SIZE=0xc0000
PADDED_UBOOT_SIZE=0x400000
UBOOT_MEM_ADDR=0x4a000000
UBI="$BUILDROOT_OUTPUT_DIR/images/rootfs.ubi"
SPARSE_UBI="${TMPDIR}/rootfs.ubi.sparse"
@ -126,17 +126,17 @@ prepare_images() {
exit 1
fi
PADDED_SPL_SIZE=$(filesize "${PADDED_SPL}")
PADDED_SPL_SIZE=$(filesize "${PADDED_SPL}")
PADDED_SPL_SIZE=$(($PADDED_SPL_SIZE / ($PAGE_SIZE + $OOB_SIZE)))
PADDED_SPL_SIZE=$(echo $PADDED_SPL_SIZE | xargs printf "0x%08x")
log "PADDED_SPL_SIZE=$PADDED_SPL_SIZE"
# Align the u-boot image on a page boundary
dd if="$UBOOT" of="$PADDED_UBOOT" bs=16k conv=sync
UBOOT_SIZE=`filesize "$PADDED_UBOOT" | xargs printf "0x%08x"`
# Align the u-boot image on block boundary
dd if="$UBOOT" of="$PADDED_UBOOT" bs=4MB conv=sync
UBOOT_SIZE=`filesize "$PADDED_UBOOT" | xargs printf "0x%08x"`
log "UBOOT_SIZE=${UBOOT_SIZE}"
log "PADDED_UBOOT_SIZE=${PADDED_UBOOT_SIZE}"
dd if=/dev/urandom of="$PADDED_UBOOT" seek=$((UBOOT_SIZE / 0x4000)) bs=16k count=$(((PADDED_UBOOT_SIZE - UBOOT_SIZE) / 0x4000))
dd if=/dev/urandom of="$PADDED_UBOOT" seek=$((UBOOT_SIZE / 0x4000)) bs=16k count=$(((PADDED_UBOOT_SIZE - UBOOT_SIZE) / 0x4000))
}
prepare_uboot_script() {

View File

@ -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 $?