summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-05-01 14:41:49 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-05-12 10:06:07 +0200
commitc52baf91b73348fe5d761b2e3cb64cf352c3a961 (patch)
tree8fcd028faf5f31416b611c30798b06258e49fd52 /recipes
parentaad919e1271e8242af70034fe602608058655576 (diff)
Apalis/Colibri iMX6: extend U-Boot scripts
- rename flash_mmc script to flash_blk and adapt that it can also be used from a USB drive. - Add flash_mmc “proxy” script for the upgrade case
Diffstat (limited to 'recipes')
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.imgbin0 -> 1978 bytes
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr19
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.imgbin1838 -> 1838 bytes
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.imgbin1859 -> 326 bytes
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.scr20
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.imgbin0 -> 1732 bytes
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr17
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.imgbin1614 -> 1614 bytes
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.imgbin1622 -> 163 bytes
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.scr18
10 files changed, 46 insertions, 28 deletions
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.img b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.img
new file mode 100644
index 0000000..d2f5ce4
--- /dev/null
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.img
Binary files differ
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr
new file mode 100644
index 0000000..7d431aa
--- /dev/null
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr
@@ -0,0 +1,19 @@
+test -n ${interface} || setenv interface mmc
+test -n ${drive} || setenv drive 1
+
+setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
+setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
+
+setenv cp_file_chunk 'fatload ${interface} ${drive}:1 ${loadaddr} root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
+setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}'
+setenv update_uboot_it 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot-it.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}'
+setenv update_kernel 'fatload ${interface} ${drive}:1 ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
+setenv update_fdt 'fatload ${interface} ${drive}:1 ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
+setenv update_configblock 'fatload ${interface} ${drive}:1 ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x500 ${blkcnt}'
+setenv update 'run update_1; run update_uboot; run update_2; run update_3; reset'
+setenv update_it 'run update_1; run update_uboot_it; run update_2; run update_3; reset'
+setenv update_1 'fatload ${interface} ${drive}:1 ${loadaddr} mbr.bin && mmc dev 0 && mmc write ${loadaddr} 0x0 0x1'
+setenv update_2 'fatload ${interface} ${drive}:1 ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
+#do it in chunks of 256M to fit into DDR RAM of the smallest module
+setenv update_3 'setenv filesize 10000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "10000000"; do run cp_file_chunk; run set_nextpos; done'
+echo 'enter "run update" or "run update_it" to update the entire module'
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.img b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.img
index 50818f9..9cfac8f 100644
--- a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.img
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.img
Binary files differ
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.img b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.img
index d78d920..305ee8b 100644
--- a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.img
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.img
Binary files differ
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.scr b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.scr
index e144905..207c7db 100644
--- a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.scr
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_mmc.scr
@@ -1,16 +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
-setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
-setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv cp_file_chunk 'fatload mmc ${drive}:1 ${loadaddr} root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
-setenv update_uboot 'fatload mmc ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}'
-setenv update_uboot_it 'fatload mmc ${drive}:1 ${loadaddr} u-boot-it.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}'
-setenv update_kernel 'fatload mmc ${drive}:1 ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
-setenv update_fdt 'fatload mmc ${drive}:1 ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
-setenv update_configblock 'fatload mmc ${drive}:1 ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x500 ${blkcnt}'
-setenv update 'run update_1; run update_uboot; run update_2; run update_3; reset'
-setenv update_it 'run update_1; run update_uboot_it; run update_2; run update_3; reset'
-setenv update_1 'fatload mmc ${drive}:1 ${loadaddr} mbr.bin && mmc dev 0 && mmc write ${loadaddr} 0x0 0x1'
-setenv update_2 'fatload mmc ${drive}:1 ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
-#do it in chunks of 256M to fit into DDR RAM of the smallest module
-setenv update_3 'setenv filesize 10000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "10000000"; do run cp_file_chunk; run set_nextpos; done'
-echo 'enter "run update" or "run update_it" to update the entire module'
+
+fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img
+source ${loadaddr}
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.img b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.img
new file mode 100644
index 0000000..7e2cde2
--- /dev/null
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.img
Binary files differ
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr
new file mode 100644
index 0000000..a3713a6
--- /dev/null
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr
@@ -0,0 +1,17 @@
+test -n ${interface} || setenv interface mmc
+test -n ${drive} || setenv drive 1
+
+setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
+setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
+
+setenv cp_file_chunk 'fatload ${interface} ${drive}:1 ${loadaddr} root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
+setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size'
+setenv update_kernel 'fatload ${interface} ${drive}:1 ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
+setenv update_fdt 'fatload ${interface} ${drive}:1 ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
+setenv update_configblock 'fatload ${interface} ${drive}:1 ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x500 ${blkcnt}'
+setenv update 'run update_1; run update_uboot; run update_2; run update_3; reset'
+setenv update_1 'fatload ${interface} ${drive}:1 ${loadaddr} mbr.bin && mmc dev 0 && mmc write ${loadaddr} 0x0 0x1'
+setenv update_2 'fatload ${interface} ${drive}:1 ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
+#do it in chunks of 64M to fit into DDR RAM of the smallest module
+setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done'
+echo 'enter "run update" to update the entire module'
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.img b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.img
index 2a2719f..1c59d15 100644
--- a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.img
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.img
Binary files differ
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.img b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.img
index c11c023..5be627e 100644
--- a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.img
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.img
Binary files differ
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.scr b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.scr
index 81e0d2b..207c7db 100644
--- a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.scr
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_mmc.scr
@@ -1,14 +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
-setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
-setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv cp_file_chunk 'fatload mmc ${drive}:1 ${loadaddr} root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
-setenv update_uboot 'fatload mmc ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size'
-setenv update_kernel 'fatload mmc ${drive}:1 ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
-setenv update_fdt 'fatload mmc ${drive}:1 ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
-setenv update_configblock 'fatload mmc ${drive}:1 ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x500 ${blkcnt}'
-setenv update 'run update_1; run update_uboot; run update_2; run update_3; reset'
-setenv update_1 'fatload mmc ${drive}:1 ${loadaddr} mbr.bin && mmc dev 0 && mmc write ${loadaddr} 0x0 0x1'
-setenv update_2 'fatload mmc ${drive}:1 ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
-#do it in chunks of 64M to fit into DDR RAM of the smallest module
-setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done'
-echo 'enter "run update" to update the entire module'
+
+fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img
+source ${loadaddr}