From 2e01657c7435ad629731f2be3ca842773ff3b939 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 17 Aug 2016 15:12:40 +0200 Subject: images: mv all files into recipes-image/image This requires to adjust the path to include files, e.g.: -require recipes/images/trdx-image-fstype.inc +require recipes-images/images/trdx-image-fstype.inc Signed-off-by: Max Krummenacher Acked-by: Stefan Agner --- .../colibri-imx6/colibri-imx6_bin/flash_eth.scr | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr (limited to 'recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr') diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr new file mode 100644 index 0000000..14f4104 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr @@ -0,0 +1,42 @@ +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow ${filenum} % 0x10; test ${filenrlow} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1' +setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1' +setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1' +setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; run check_1 || run check_2 || run check_3; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv migrate_configblock 'run check_configblock; mmc dev 0 0 && mmc read ${loadaddr} 0x500 1 && cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1' + +setenv migrate_uboot_old 'tftpboot ${loadaddr} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size' +setenv migrate_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && patch_ddr_size && mmc bootbus 0 2 1 2 && mmc partconf 0 1 1 0' + +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} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && patch_ddr_size && updt_fuse && mmc bootbus 0 2 0 1 && mmc partconf 0 1 1 0 && mmc rst-function 0 1' + +setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${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} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1' + +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- +setenv update_3 'setenv filesize 4000000; setenv filenum 10; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done; true' + +setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update" +setenv migrate 'run migrate_configblock; run update_latest; reset' +setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate' +setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate' + +setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3' +setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3' +setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1' + +echo 'enter "run update" to update the entire module' -- cgit v1.2.3