From 04b20e00f8931a7a1231b21a2d0c38d0f050e17d Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 29 Aug 2014 12:05:30 -0500 Subject: [PATCH] backup bootloader, need to think more about this.. Signed-off-by: Robert Nelson --- mk_mmc.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 75758ac..1d305cb 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -798,11 +798,13 @@ generate_soc () { echo "dd_spl_uboot_seek=${dd_spl_uboot_seek}" >> ${wfile} echo "dd_spl_uboot_conf=${dd_spl_uboot_conf}" >> ${wfile} echo "dd_spl_uboot_bs=${dd_spl_uboot_bs}" >> ${wfile} + echo "dd_spl_uboot_backup=${dd_spl_uboot_backup}" >> ${wfile} echo "" >> ${wfile} echo "dd_uboot_count=${dd_uboot_count}" >> ${wfile} echo "dd_uboot_seek=${dd_uboot_seek}" >> ${wfile} echo "dd_uboot_conf=${dd_uboot_conf}" >> ${wfile} echo "dd_uboot_bs=${dd_uboot_bs}" >> ${wfile} + echo "dd_uboot_backup=${dd_uboot_backup}" >> ${wfile} else echo "uboot_CONFIG_CMD_BOOTZ=${uboot_CONFIG_CMD_BOOTZ}" >> ${wfile} echo "uboot_CONFIG_SUPPORT_RAW_INITRD=${uboot_CONFIG_SUPPORT_RAW_INITRD}" >> ${wfile} @@ -1045,21 +1047,24 @@ populate_boot () { mkdir -p ${TEMPDIR}/disk/backup || true mkdir -p ${TEMPDIR}/disk/boot/dtbs/current/ || true - if [ ! "${bootloader_installed}" ] ; then - if [ "${spl_name}" ] ; then - if [ -f ${TEMPDIR}/dl/${SPL} ] ; then + if [ "${spl_name}" ] ; then + if [ -f ${TEMPDIR}/dl/${SPL} ] ; then + if [ ! "${bootloader_installed}" ] ; then cp -v ${TEMPDIR}/dl/${SPL} ${TEMPDIR}/disk/${spl_name} - echo "-----------------------------" fi + cp -v ${TEMPDIR}/dl/${SPL} ${TEMPDIR}/disk/backup/${spl_name} + echo "-----------------------------" fi fi - if [ ! "${bootloader_installed}" ] ; then - if [ "${boot_name}" ] ; then - if [ -f ${TEMPDIR}/dl/${UBOOT} ] ; then + + if [ "${boot_name}" ] ; then + if [ -f ${TEMPDIR}/dl/${UBOOT} ] ; then + if [ ! "${bootloader_installed}" ] ; then cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/${boot_name} - echo "-----------------------------" fi + cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/backup/${boot_name} + echo "-----------------------------" fi fi