From d899f31b7fb5c857b159b46c52ce22b3c7b701f5 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 27 May 2015 10:43:16 +0300 Subject: toradex: add support for u-boot update on colibri vf Include flash scripts to boot partition, which can update u-boot to NAND. Remove kernel and dtb files from boot partition, as they are read from second partition. u-boot env changed to boot from MMC by default and kernel messages removed from tty1. apalis flash scripts updated to latest version from toradex and to use both flash_mmc and flash_blk. Change-Id: I1a58badafa01e2023b9ae058b833eb108c097594 Reviewed-by: Eirik Aavitsland --- .../recipes/u-boot/u-boot-script-toradex/flash_mmc.scr | 2 -- .../recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr | 6 ++++++ .../recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr | 6 ++++++ .../recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr | 2 ++ .../recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) delete mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr (limited to 'meta-toradex-extras/recipes/u-boot/u-boot-script-toradex') diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr deleted file mode 100644 index 5b7dc80..0000000 --- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr +++ /dev/null @@ -1,2 +0,0 @@ -setenv update_uboot 'fatload mmc ${drive}:1 ${loadaddr} u-boot.imx && setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}' -echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr new file mode 100644 index 0000000..ee87e85 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr @@ -0,0 +1,6 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr new file mode 100644 index 0000000..207c7db --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr @@ -0,0 +1,6 @@ +#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr new file mode 100644 index 0000000..5e31380 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr @@ -0,0 +1,2 @@ +setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr new file mode 100644 index 0000000..e0770a0 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr @@ -0,0 +1,3 @@ +setenv interface mmc +fatload ${interface} 0:1 ${loadaddr} flash_blk.img +source ${loadaddr} -- cgit v1.2.3-54-g00ecf