summaryrefslogtreecommitdiffstats
path: root/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7
diff options
context:
space:
mode:
Diffstat (limited to 'meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7')
-rw-r--r--meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch36
-rw-r--r--meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr19
-rw-r--r--meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr19
3 files changed, 74 insertions, 0 deletions
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch
new file mode 100644
index 0000000..08ddd88
--- /dev/null
+++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch
@@ -0,0 +1,36 @@
1From c02da9f92f6ffaee65f428e1978bd3ff379a2612 Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Wed, 14 Sep 2016 10:19:28 +0300
4Subject: [PATCH] Update only u-boot
5
6---
7 flash_blk.scr | 4 ++--
8 flash_eth.scr | 4 ++--
9 2 files changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/flash_blk.scr b/flash_blk.scr
12index cc4cf38..b63366a 100644
13--- a/flash_blk.scr
14+++ b/flash_blk.scr
15@@ -14,6 +14,6 @@ setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.i
16
17 setenv upgrade_alpha1_msg 'Updated U-Boot, please reset the board and use "run setupdate && run update" again.'
18 setenv prepare_alpha1_uboot 'if test "${soc}" = "mx7"; then run update_uboot && echo ${upgrade_alpha1_msg} && reset; fi'
19-setenv update 'mtdparts default && run prepare_alpha1_uboot; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset'
20+setenv update 'mtdparts default && run update_uboot && reset'
21
22-echo 'enter "run update" to update the entire module'
23+echo 'enter "run update" to update the uboot'
24diff --git a/flash_eth.scr b/flash_eth.scr
25index 01be124..13025de 100644
26--- a/flash_eth.scr
27+++ b/flash_eth.scr
28@@ -14,6 +14,6 @@ setenv update_rootfs 'tftpboot ${loadaddr} ${board_name}/ubifs.img && ubi write
29
30 setenv upgrade_alpha1_msg 'Updated U-Boot, please reset the board and use "run setupdate && run update" again.'
31 setenv prepare_alpha1_uboot 'if test "${soc}" = "mx7"; then run update_uboot && echo ${upgrade_alpha1_msg} && reset; fi'
32-setenv update 'mtdparts default && run prepare_alpha1_uboot; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset'
33+setenv update 'mtdparts default && run update_uboot && reset'
34
35-echo 'enter "run update" to update the entire module'
36+echo 'enter "run update" to update the uboot'
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr
new file mode 100644
index 0000000..b63366a
--- /dev/null
+++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr
@@ -0,0 +1,19 @@
1setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000'
2setenv update_configblock 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/configblock.bin && nand write ${loadaddr} 0x800 ${filesize} && nand write ${loadaddr} 0x20800 ${filesize}'
3
4# Migrate to UBI volume based boot schema
5setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static'
6setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static'
7setenv prepare_rootfs 'ubi create rootfs 0 dynamic'
8setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi'
9
10setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${loadaddr} 80000 200000 $filesize'
11setenv update_kernel 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}'
12setenv update_fdt 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
13setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
14
15setenv upgrade_alpha1_msg 'Updated U-Boot, please reset the board and use "run setupdate && run update" again.'
16setenv prepare_alpha1_uboot 'if test "${soc}" = "mx7"; then run update_uboot && echo ${upgrade_alpha1_msg} && reset; fi'
17setenv update 'mtdparts default && run prepare_alpha1_uboot; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset'
18
19echo 'enter "run update" to update the entire module'
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr
new file mode 100644
index 0000000..13025de
--- /dev/null
+++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr
@@ -0,0 +1,19 @@
1setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000'
2setenv update_configblock 'tftpboot ${loadaddr} ${board_name}/configblock.bin && nand write ${loadaddr} 0x800 ${filesize} && nand write ${loadaddr} 0x20800 ${filesize}'
3
4# Migrate to UBI volume based boot schema
5setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static'
6setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static'
7setenv prepare_rootfs 'ubi create rootfs 0 dynamic'
8setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi'
9
10setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${loadaddr} 80000 200000 $filesize'
11setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}'
12setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
13setenv update_rootfs 'tftpboot ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
14
15setenv upgrade_alpha1_msg 'Updated U-Boot, please reset the board and use "run setupdate && run update" again.'
16setenv prepare_alpha1_uboot 'if test "${soc}" = "mx7"; then run update_uboot && echo ${upgrade_alpha1_msg} && reset; fi'
17setenv update 'mtdparts default && run prepare_alpha1_uboot; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset'
18
19echo 'enter "run update" to update the entire module'