diff options
author | Max Krummenacher <max.oss.09@gmail.com> | 2015-10-20 14:56:24 +0200 |
---|---|---|
committer | Max Krummenacher <max.oss.09@gmail.com> | 2015-10-28 09:36:02 +0100 |
commit | f463f754048ebc3325025f0e1506b03cf14203a5 (patch) | |
tree | 42c42951d6534a6b38d2c5613e82e86acb7840fa /recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr | |
parent | 646a2579d33a24bae18dec79687ef2b66b39987c (diff) |
update.sh: use moduletype specific folder for output files
With update.sh one creates files on e.g. a SD-card or a tftp server
which enables updating the SW on a module from U-Boot running on
said module.
This commit adds a module type specific directory on that output media
so that update data for multiple module types can be stored on one media.
Generic U-Boot scripts in the media's root directory do select the
matching update data depending on module type.
Diffstat (limited to 'recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr')
-rw-r--r-- | recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr index 4908b49..17cb4e8 100644 --- a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr +++ b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr @@ -17,20 +17,20 @@ setenv migrate_5 'mmc dev 0 0; mmc read ${loadaddr} 36000 1; setenv conf_blk_off setenv migrate_6 'mmc dev 0 0; mmc read ${loadaddr} 37000 1; setenv conf_blk_offset 0x7ff; crc32 -v $toradex_oui_addr 3 94305232 && mmc dev 0 1 && mmc write $loadaddr $conf_blk_offset 1' setenv migrate_configblock 'setexpr toradex_oui_addr $loadaddr + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6' -setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/root.ext3 ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' -setenv update_uboot 'load ${interface} ${drive}:1 ${loadaddr} apalis_t30.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}' +setenv update_uboot 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/apalis_t30.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}' -setenv update_kernel 'load ${interface} ${drive}:1 ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}' +setenv update_kernel 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}' -setenv update_fdt 'load ${interface} ${drive}:1 ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}' +setenv update_fdt 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}' -setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} ${blkcnt}' +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${loadaddr} ${board_name}/configblock.bin && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} ${blkcnt}' -setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1' -setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 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' +setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 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' setenv echo_v2.3b2 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b2\" to complete update" setenv migrate_v2.3b2 'run migrate_configblock; run update_new' |