diff options
Diffstat (limited to 'recipes-images/images/files/apalis-tk1/update')
10 files changed, 84 insertions, 0 deletions
diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct Binary files differnew file mode 100644 index 0000000..556a40e --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg new file mode 100644 index 0000000..b9d203c --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2016 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00400001; +Bctcopy = 1; +Bctfile = PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr new file mode 100644 index 0000000..76868d5 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr @@ -0,0 +1,29 @@ +test -n ${drive} || setenv drive 1 +test -n ${fdt_module} || setenv fdt_module apalis +test -n ${interface} || setenv interface mmc + +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 filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr new file mode 100644 index 0000000..2793bac --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr @@ -0,0 +1,27 @@ +test -n ${fdt_module} || setenv fdt_module apalis + +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 filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr
\ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr
\ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr
\ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh
\ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh b/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh new file mode 120000 index 0000000..f7eeef9 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh @@ -0,0 +1 @@ +../../library/genext4fs.sh
\ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/update.sh b/recipes-images/images/files/apalis-tk1/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh
\ No newline at end of file |