From c121c46ae099341aec678c5a12edcce8f91a0f51 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 5 Jan 2017 11:08:17 +0100 Subject: flash scripts: fix create_bcb to work for flashing from scratch Do not save/restore config block in create_bcb since we use this command in flashing from scratch. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- .../images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr') diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr index 5a54bfa..66cd29d 100644 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr +++ b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr @@ -1,4 +1,5 @@ -setenv create_bcb 'nand read ${loadaddr} 0x800 0x800 && nand erase.part mx7-bcb && writebcb 80000 200000 && nand write ${loadaddr} 0x800 0x800' +setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000' +setenv recreate_bcb 'nand read ${loadaddr} 0x800 0x800 && run create_bcb && nand write ${loadaddr} 0x800 0x800' # Migrate to UBI volume based boot schema setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' @@ -6,7 +7,7 @@ setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static' setenv prepare_rootfs 'ubi create rootfs 0 dynamic' setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi' -setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run create_bcb && run update" && echo && echo "(note the create_bcb command in between!)"' +setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run recreate_bcb && run update" && echo && echo "(note the recreate_bcb command in between!)"' setenv update_uboot_old 'tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${loadaddr} 80000 200000 $filesize && nand erase.part u-boot-env && nand erase.part ubi && run upgrade_msg' setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${loadaddr} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${loadaddr} u-boot2 ${filesize}' setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}' @@ -21,7 +22,7 @@ echo && echo 'NOTE: The U-Boot provided with this BSP version does not support the' && echo 'early tapeout/stepping of i.MX 7 used on your module. You still can' && echo 'update the kernel/device-tree/rootfs manually using: ' && -echo '# run prepare_ubi && run update_kernel && run update_fdt && update_rootfs' && +echo '# run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs' && echo && setenv update_uboot; setenv update_uboot_old; setenv update else echo 'enter "run update" to update the entire module' -- cgit v1.2.3