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 | |
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')
6 files changed, 19 insertions, 22 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' diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr index a161d5a..8dc5405 100644 --- a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr +++ b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr @@ -14,18 +14,18 @@ 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 'tftpboot ${loadaddr} root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' +setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' -setenv update_uboot 'tftpboot ${loadaddr} apalis_t30.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}' +setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/apalis_t30.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}' -setenv update_kernel 'tftpboot ${loadaddr} uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}' +setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}' -setenv update_fdt 'tftpboot ${loadaddr} ${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}' +setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}' -setenv update_configblock 'run check_configblock; tftpboot ${loadaddr} configblock.bin && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} ${blkcnt}' +setenv update_configblock 'run check_configblock; tftpboot ${loadaddr} ${board_name}/configblock.bin && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} ${blkcnt}' -setenv update_1 'tftpboot ${loadaddr} mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1' -setenv update_2 'tftpboot ${loadaddr} boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}' +setenv update_1 'tftpboot ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1' +setenv update_2 'tftpboot ${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 #split root.ext3 into multiple 64M chunks before copying to TFTP folder as follows #split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3- diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_mmc.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_mmc.scr deleted file mode 100644 index 207c7db..0000000 --- a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_mmc.scr +++ /dev/null @@ -1,6 +0,0 @@ -#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/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr
\ No newline at end of file diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr
\ No newline at end of file diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr
\ No newline at end of file |