diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2016-03-07 14:45:52 -0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-03-14 14:26:27 +0100 |
commit | 2b24ffee6deee0dd78604e8496e7154294d4f74a (patch) | |
tree | d48cf81be5ced9fd55948fc85e18e1e48cedfd19 /recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr | |
parent | 29bc1cf404d21bce8b0e76d9bf6061e07b5533c9 (diff) |
update.sh: write kernel and device tree into static UBI volumes
Write kernel and device tree into seperate UBI Volumes. This
allows to use a lot less UBI/UBIFS support in U-Boot, which
should lower the risk of hitting bugs in this area. Boot times
are also slightly faster (measurements showed an improvement of
~150ms).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr')
-rw-r--r-- | recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr b/recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr index 5c27563..a8166e2 100644 --- a/recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr +++ b/recipes/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr @@ -1,11 +1,17 @@ setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000' setenv update_configblock 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/configblock.bin && nand write ${loadaddr} 0x800 ${filesize}' -setenv prepare_rootfs 'ubi part ubi && ubi check rootfs || ubi create rootfs' +# Migrate to UBI volume based boot schema +setenv prepare_kernel_dtb 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 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_dtb && run prepare_rootfs; fi; else run prepare_kernel_dtb && run prepare_rootfs; fi' + setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot' -setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.img && run prepare_rootfs && ubi write ${loadaddr} rootfs ${filesize}' +setenv update_kernel 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}' +setenv update_dtb 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}' +setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}' -setenv update_new 'run update_uboot; run update_rootfs; reset' +setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_dtb && run update_rootfs; reset' # Upgrade part 1, write new U-Boot, but with old ECC format still... # Store config block temporarly in memory at kernel_addr_r. |