summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2016-09-14 16:53:57 +0300
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-09-19 14:46:40 +0000
commit5e19fd01a8021b2aef3488666c555edd63eb4582 (patch)
treea35161921fbfcdf0fa2d2b73c3bbd0ea79160709
parent97e5acb0a9a1b8c772cbf0018d46f26f61605bd1 (diff)
downloadmeta-boot2qt-5e19fd01a8021b2aef3488666c555edd63eb4582.tar.gz
toradex: use latest u-boot and flashing scripts
The script sources are from meta-toradex-demos layer, but they are patched to update only u-boot part. The u-boot from V2.6 release is the latest that toradex uses in their boards and uses the changed u-boot location. Change-Id: I86345f692961ed906af4d9f251de28eb551d9cbf Reviewed-by: Risto Avila <risto.avila@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
-rw-r--r--conf/distro/include/apalis-imx6.conf12
-rw-r--r--conf/distro/include/colibri-imx6.conf6
-rw-r--r--conf/distro/include/colibri-vf.conf7
-rw-r--r--conf/distro/include/toradex.inc11
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb33
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/0001-Update-only-u-boot.patch60
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_blk.scr45
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_eth.scr46
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/0001-Update-only-u-boot.patch52
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_blk.scr41
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_eth.scr42
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch36
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr19
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr19
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/0001-Update-only-u-boot.patch62
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_blk.scr28
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_eth.scr28
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_blk.scr11
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_eth.scr6
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_mmc.scr3
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr6
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr6
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr2
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr3
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-Update-default-args-for-apalis-imx6.patch57
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-imx6-enable-sdboot-by-default.patch36
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend26
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch86
-rw-r--r--meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend13
29 files changed, 629 insertions, 173 deletions
diff --git a/conf/distro/include/apalis-imx6.conf b/conf/distro/include/apalis-imx6.conf
index d5827db..0cef55a 100644
--- a/conf/distro/include/apalis-imx6.conf
+++ b/conf/distro/include/apalis-imx6.conf
@@ -26,21 +26,21 @@ DEPLOY_CONF_NAME = "Toradex Apalis iMX6"
26 26
27KERNEL_IMAGETYPE = "uImage" 27KERNEL_IMAGETYPE = "uImage"
28 28
29UBOOT_MACHINE = ""
30UBOOT_CONFIG ??= "com it"
31UBOOT_CONFIG[com] = "apalis_imx6_defconfig"
32UBOOT_CONFIG[it] = "apalis_imx6_it_defconfig"
33
29BOOTFS_CONTENT = "\ 34BOOTFS_CONTENT = "\
30 ${KERNEL_IMAGETYPE}:${KERNEL_IMAGETYPE} \ 35 ${KERNEL_IMAGETYPE}:${KERNEL_IMAGETYPE} \
31 ${KERNEL_IMAGETYPE}-imx6q-apalis-eval.dtb:imx6q-apalis-eval.dtb \ 36 ${KERNEL_IMAGETYPE}-imx6q-apalis-eval.dtb:imx6q-apalis-eval.dtb \
32 ${KERNEL_IMAGETYPE}-imx6q-apalis-ixora.dtb:imx6q-apalis-ixora.dtb \ 37 ${KERNEL_IMAGETYPE}-imx6q-apalis-ixora.dtb:imx6q-apalis-ixora.dtb \
33 ${KERNEL_IMAGETYPE}-imx6q-apalis_v1_0-eval.dtb:imx6q-apalis_v1_0-eval.dtb \ 38 ${KERNEL_IMAGETYPE}-imx6q-apalis_v1_0-eval.dtb:imx6q-apalis_v1_0-eval.dtb \
34 ${KERNEL_IMAGETYPE}-imx6q-apalis_v1_0-ixora.dtb:imx6q-apalis_v1_0-ixora.dtb \ 39 ${KERNEL_IMAGETYPE}-imx6q-apalis_v1_0-ixora.dtb:imx6q-apalis_v1_0-ixora.dtb \
35 u-boot-${MACHINE}.imx:u-boot.imx \
36 flash_mmc-${MACHINE}.img:flash_mmc.img \
37 flash_blk-${MACHINE}.img:flash_blk.img \
38 " 40 "
39BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy" 41BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy"
40BOOT_SCRIPTS += " \ 42BOOT_SCRIPTS += " \
41 u-boot-${MACHINE}.imx:u-boot.imx \ 43 u-boot-${MACHINE}.imx-it:${MACHINEDIR}/u-boot.imx-it \
42 flash_mmc-${MACHINE}.img:flash_mmc.img \
43 flash_blk-${MACHINE}.img:flash_blk.img \
44 " 44 "
45 45
46MACHINE_EXTRA_INSTALL = "\ 46MACHINE_EXTRA_INSTALL = "\
diff --git a/conf/distro/include/colibri-imx6.conf b/conf/distro/include/colibri-imx6.conf
index 4cde248..9349300 100644
--- a/conf/distro/include/colibri-imx6.conf
+++ b/conf/distro/include/colibri-imx6.conf
@@ -30,14 +30,8 @@ BOOTFS_CONTENT = "\
30 ${KERNEL_IMAGETYPE}:${KERNEL_IMAGETYPE} \ 30 ${KERNEL_IMAGETYPE}:${KERNEL_IMAGETYPE} \
31 ${KERNEL_IMAGETYPE}-imx6dl-colibri-eval-v3.dtb:imx6dl-colibri-eval-v3.dtb \ 31 ${KERNEL_IMAGETYPE}-imx6dl-colibri-eval-v3.dtb:imx6dl-colibri-eval-v3.dtb \
32 ${KERNEL_IMAGETYPE}-imx6dl-colibri-cam-eval-v3.dtb:imx6dl-colibri-cam-eval-v3.dtb \ 32 ${KERNEL_IMAGETYPE}-imx6dl-colibri-cam-eval-v3.dtb:imx6dl-colibri-cam-eval-v3.dtb \
33 u-boot-${MACHINE}.imx:u-boot.imx \
34 " 33 "
35BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy" 34BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy"
36BOOT_SCRIPTS += " \
37 u-boot-${MACHINE}.imx:u-boot.imx \
38 flash_mmc-${MACHINE}.img:flash_mmc.img \
39 flash_blk-${MACHINE}.img:flash_blk.img \
40 "
41 35
42MACHINE_EXTRA_INSTALL = "\ 36MACHINE_EXTRA_INSTALL = "\
43 libgal-mx6 \ 37 libgal-mx6 \
diff --git a/conf/distro/include/colibri-vf.conf b/conf/distro/include/colibri-vf.conf
index 6512f2b..7da7622 100644
--- a/conf/distro/include/colibri-vf.conf
+++ b/conf/distro/include/colibri-vf.conf
@@ -27,17 +27,12 @@ IMAGE_FSTYPES += "ext3 sdcard"
27IMAGE_ROOTFS_ALIGNMENT_colibri-vf = "1024" 27IMAGE_ROOTFS_ALIGNMENT_colibri-vf = "1024"
28 28
29BOOTFS_CONTENT = "\ 29BOOTFS_CONTENT = "\
30 u-boot-${MACHINE}.imx:u-boot.imx \
31 flash_mmc-${MACHINE}.img:flash_mmc.img \
32 flash_blk-${MACHINE}.img:flash_blk.img \
33 ${KERNEL_IMAGETYPE}-vf500-colibri-eval-v3.dtb:vf500-colibri-eval-v3.dtb \ 30 ${KERNEL_IMAGETYPE}-vf500-colibri-eval-v3.dtb:vf500-colibri-eval-v3.dtb \
34 ${KERNEL_IMAGETYPE}-vf610-colibri-eval-v3.dtb:vf610-colibri-eval-v3.dtb \ 31 ${KERNEL_IMAGETYPE}-vf610-colibri-eval-v3.dtb:vf610-colibri-eval-v3.dtb \
35 " 32 "
36BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy" 33BOOTFS_DEPENDS = "u-boot:do_deploy u-boot-script-toradex:do_deploy virtual/kernel:do_deploy"
37BOOT_SCRIPTS += " \ 34BOOT_SCRIPTS += " \
38 u-boot-${MACHINE}.imx:u-boot.imx \ 35 u-boot-nand.imx:${MACHINEDIR}/u-boot-nand.imx \
39 flash_mmc-${MACHINE}.img:flash_mmc.img \
40 flash_blk-${MACHINE}.img:flash_blk.img \
41 " 36 "
42 37
43DEFAULTTUNE = "armv7ahf-neon" 38DEFAULTTUNE = "armv7ahf-neon"
diff --git a/conf/distro/include/toradex.inc b/conf/distro/include/toradex.inc
index 7df80e1..bd8ce84 100644
--- a/conf/distro/include/toradex.inc
+++ b/conf/distro/include/toradex.inc
@@ -21,3 +21,14 @@
21 21
22BBMASK ?= " " 22BBMASK ?= " "
23BBMASK .= "|meta-toradex/recipes-mozilla|meta-toradex/recipes-browser|meta-toradex/recipes-lxde|meta-toradex/recipes-connectivity|meta-toradex/recipes-gnome|meta-toradex/recipes/trdx-config|meta-toradex/recipes-multimedia/webm|meta-toradex/recipes-qt|meta-toradex/recipes-core/psplash|meta-toradex/recipes-support/florence|meta-toradex/recipes-core/systemd|meta-toradex/recipes-efl|meta-toradex/recipes-core/dropbear|meta-toradex/recipes-support/icu|meta-toradex/recipes-support/i2c-tools|meta-toradex/recipes-benchmark|meta-toradex/recipes-core/udev|meta-toradex/recipes-support/gnutls|meta-toradex/recipes-graphics/gpu-viv-bin-mx6q|meta-toradex/recipes-multimedia/gstreamer|meta-toradex/recipes-fsl/packagegroups|recipes-core/glibc/glibc_linaro-2.20.bbappend" 23BBMASK .= "|meta-toradex/recipes-mozilla|meta-toradex/recipes-browser|meta-toradex/recipes-lxde|meta-toradex/recipes-connectivity|meta-toradex/recipes-gnome|meta-toradex/recipes/trdx-config|meta-toradex/recipes-multimedia/webm|meta-toradex/recipes-qt|meta-toradex/recipes-core/psplash|meta-toradex/recipes-support/florence|meta-toradex/recipes-core/systemd|meta-toradex/recipes-efl|meta-toradex/recipes-core/dropbear|meta-toradex/recipes-support/icu|meta-toradex/recipes-support/i2c-tools|meta-toradex/recipes-benchmark|meta-toradex/recipes-core/udev|meta-toradex/recipes-support/gnutls|meta-toradex/recipes-graphics/gpu-viv-bin-mx6q|meta-toradex/recipes-multimedia/gstreamer|meta-toradex/recipes-fsl/packagegroups|recipes-core/glibc/glibc_linaro-2.20.bbappend"
24
25PREFERRED_PROVIDER_u-boot = "u-boot-toradex"
26
27MACHINEDIR = "${@d.getVar('MACHINE', True).replace('-','_')}"
28BOOT_SCRIPTS += " \
29 fwd_blk.img:flash_blk.img \
30 fwd_eth.img:flash_eth.img \
31 fwd_mmc.img:flash_mmc.img \
32 ${MACHINE}:${MACHINEDIR} \
33 u-boot-${MACHINE}.imx:${MACHINEDIR}/u-boot.imx \
34 "
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb
index 337d57d..4d7c307 100644
--- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb
@@ -22,11 +22,15 @@
22LICENSE = "CLOSED" 22LICENSE = "CLOSED"
23DEPENDS = "u-boot-mkimage-native" 23DEPENDS = "u-boot-mkimage-native"
24 24
25PV = "v2.3" 25PV = "v2.6"
26 26
27SRC_URI = " \ 27SRC_URI = " \
28 file://flash_mmc.scr \ 28 file://fwd_mmc.scr \
29 file://fwd_blk.scr \
30 file://fwd_eth.scr \
29 file://flash_blk.scr \ 31 file://flash_blk.scr \
32 file://flash_eth.scr \
33 file://0001-Update-only-u-boot.patch \
30 " 34 "
31 35
32S = "${WORKDIR}" 36S = "${WORKDIR}"
@@ -34,27 +38,20 @@ S = "${WORKDIR}"
34inherit deploy 38inherit deploy
35 39
36do_mkimage () { 40do_mkimage () {
37 uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ 41 for scr in ${WORKDIR}/*.scr; do
38 -n "update script" -d ${WORKDIR}/flash_mmc.scr \ 42 uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
39 flash_mmc.img 43 -n "update script" -d ${scr} \
40 44 $(basename ${scr} .scr).img
41 uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ 45 done
42 -n "update script" -d ${WORKDIR}/flash_blk.scr \
43 flash_blk.img
44} 46}
45 47
46addtask mkimage after do_compile before do_install 48addtask mkimage after do_compile before do_install
47 49
48do_deploy () { 50do_deploy () {
49 install -d ${DEPLOYDIR} 51 install -d ${DEPLOYDIR}/${MACHINE}
50 install ${S}/flash_mmc.img ${DEPLOYDIR}/flash_mmc-${MACHINE}-${PV}-${PR}.img 52 install -m 0644 -t ${DEPLOYDIR} ${S}/*.img
51 install ${S}/flash_blk.img ${DEPLOYDIR}/flash_blk-${MACHINE}-${PV}-${PR}.img 53 ln -s ../flash_blk.img ${DEPLOYDIR}/${MACHINE}/
52 54 ln -s ../flash_eth.img ${DEPLOYDIR}/${MACHINE}/
53 cd ${DEPLOYDIR}
54 rm -f flash_mmc-${MACHINE}.img
55 ln -sf flash_mmc-${MACHINE}-${PV}-${PR}.img flash_mmc-${MACHINE}.img
56 rm -f flash_blk-${MACHINE}.img
57 ln -sf flash_blk-${MACHINE}-${PV}-${PR}.img flash_blk-${MACHINE}.img
58} 55}
59 56
60addtask deploy after do_install before do_build 57addtask deploy after do_install before do_build
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/0001-Update-only-u-boot.patch b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/0001-Update-only-u-boot.patch
new file mode 100644
index 0000000..5c62eb1
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/0001-Update-only-u-boot.patch
@@ -0,0 +1,60 @@
1From 262b1dcc5f886ceb1944c8db3c1072c98d45a56e Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Wed, 14 Sep 2016 10:11:32 +0300
4Subject: [PATCH] Update only u-boot
5
6---
7 flash_blk.scr | 8 ++++----
8 flash_eth.scr | 8 ++++----
9 2 files changed, 8 insertions(+), 8 deletions(-)
10
11diff --git a/flash_blk.scr b/flash_blk.scr
12index 800383c..398c4de 100644
13--- a/flash_blk.scr
14+++ b/flash_blk.scr
15@@ -30,16 +30,16 @@ setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfa
16 #do it in chunks of 64M to fit into DDR RAM of the smallest module
17 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; true'
18
19-setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
20-setenv echo_migrate-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_it\" to complete update"
21+setenv echo_migrate echo "successfully updated U-Boot"
22+setenv echo_migrate-it echo "successfully updated U-Boot"
23 setenv migrate 'run migrate_configblock; run update_latest; reset'
24 setenv migrate_it 'setenv module_type -it; run migrate'
25 setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate${module_type}'
26 setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate${module_type}'
27
28 setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
29-setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
30+setenv update_new 'updt_fuse -n && run update_uboot && reset; run update_v2.5b3'
31 setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
32 setenv update_it 'setenv module_type -it; run update'
33
34-echo 'enter "run update" or "run update_it" to update the entire module'
35+echo 'enter "run update" or "run update_it" to update the uboot'
36diff --git a/flash_eth.scr b/flash_eth.scr
37index 804c924..2f64288 100644
38--- a/flash_eth.scr
39+++ b/flash_eth.scr
40@@ -31,16 +31,16 @@ setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt
41 #split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
42 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'
43
44-setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
45-setenv echo_migrate-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_it\" to complete update"
46+setenv echo_migrate echo "successfully updated U-Boot"
47+setenv echo_migrate-it echo "successfully updated U-Boot"
48 setenv migrate 'run migrate_configblock; run update_latest; reset'
49 setenv migrate_it 'setenv module_type -it; run migrate'
50 setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate${module_type}'
51 setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate${module_type}'
52
53 setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
54-setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
55+setenv update_new 'updt_fuse -n && run update_uboot && reset; run update_v2.5b3'
56 setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
57 setenv update_it 'setenv module_type -it; run update'
58
59-echo 'enter "run update" or "run update_it" to update the entire module'
60+echo 'enter "run update" or "run update_it" to update the uboot'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_blk.scr
new file mode 100644
index 0000000..398c4de
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_blk.scr
@@ -0,0 +1,45 @@
1test -n ${interface} || setenv interface mmc
2test -n ${drive} || setenv drive 1
3
4setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
5setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
6
7setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
8setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
9setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
10setenv 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'
11
12setenv 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'
13
14setenv migrate_uboot_old 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}'
15setenv migrate_uboot 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && mmc bootbus 0 2 1 2 && mmc partconf 0 1 1 0'
16
17setenv 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}'
18
19setenv update_uboot 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && updt_fuse && mmc bootbus 0 2 0 1 && mmc partconf 0 1 1 0 && mmc rst-function 0 1'
20setenv update_uboot_it 'setenv module_type -it; run update_uboot'
21
22setenv update_kernel 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
23
24setenv update_fdt 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
25
26setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${loadaddr} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
27
28setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
29setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
30#do it in chunks of 64M to fit into DDR RAM of the smallest module
31setenv 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; true'
32
33setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
34setenv echo_migrate-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_it\" to complete update"
35setenv migrate 'run migrate_configblock; run update_latest; reset'
36setenv migrate_it 'setenv module_type -it; run migrate'
37setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate${module_type}'
38setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate${module_type}'
39
40setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
41setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
42setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
43setenv update_it 'setenv module_type -it; run update'
44
45echo 'enter "run update" or "run update_it" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_eth.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_eth.scr
new file mode 100644
index 0000000..2f64288
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/apalis-imx6/flash_eth.scr
@@ -0,0 +1,46 @@
1setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
2#workaround U-Boot counting in hex and split did in decimal
3setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow ${filenum} % 0x10; test ${filenrlow} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
4setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
5
6setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
7setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
8setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
9setenv 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'
10
11setenv 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'
12
13setenv migrate_uboot_old 'tftpboot ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}'
14setenv migrate_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && mmc bootbus 0 2 1 2 && mmc partconf 0 1 1 0'
15
16setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
17
18setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot.imx${module_type} && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 2 ${blkcnt} && updt_fuse && mmc bootbus 0 2 0 1 && mmc partconf 0 1 1 0 && mmc rst-function 0 1'
19setenv update_uboot_it 'setenv module_type -it; run update_uboot'
20
21setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
22
23setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
24
25setenv update_configblock 'run check_configblock; tftpboot ${loadaddr} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
26
27setenv update_1 'tftpboot ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
28setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
29#do it in chunks of 64M to fit into DDR RAM of the smallest module
30#split root.ext3 into multiple 64M chunks before copying to TFTP folder as follows
31#split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
32setenv 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'
33
34setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
35setenv echo_migrate-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_it\" to complete update"
36setenv migrate 'run migrate_configblock; run update_latest; reset'
37setenv migrate_it 'setenv module_type -it; run migrate'
38setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate${module_type}'
39setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate${module_type}'
40
41setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
42setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
43setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
44setenv update_it 'setenv module_type -it; run update'
45
46echo 'enter "run update" or "run update_it" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/0001-Update-only-u-boot.patch b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/0001-Update-only-u-boot.patch
new file mode 100644
index 0000000..cf01d59
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/0001-Update-only-u-boot.patch
@@ -0,0 +1,52 @@
1From 40445299edb425159c30609e1ab7172801535a43 Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Wed, 14 Sep 2016 10:17:02 +0300
4Subject: [PATCH] Update only u-boot
5
6---
7 flash_blk.scr | 6 +++---
8 flash_eth.scr | 6 +++---
9 2 files changed, 6 insertions(+), 6 deletions(-)
10
11diff --git a/flash_blk.scr b/flash_blk.scr
12index a60a7a5..23c5b72 100644
13--- a/flash_blk.scr
14+++ b/flash_blk.scr
15@@ -29,13 +29,13 @@ setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfa
16 #do it in chunks of 64M to fit into DDR RAM of the smallest module
17 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; true'
18
19-setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
20+setenv echo_migrate echo "successfully updated U-Boot"
21 setenv migrate 'run migrate_configblock; run update_latest; reset'
22 setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate'
23 setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate'
24
25 setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
26-setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
27+setenv update_new 'updt_fuse -n && run update_uboot && reset; run update_v2.5b3'
28 setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
29
30-echo 'enter "run update" to update the entire module'
31+echo 'enter "run update" to update the uboot'
32diff --git a/flash_eth.scr b/flash_eth.scr
33index a3906b2..14f4104 100644
34--- a/flash_eth.scr
35+++ b/flash_eth.scr
36@@ -30,13 +30,13 @@ setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt
37 #split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
38 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'
39
40-setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
41+setenv echo_migrate echo "successfully updated U-Boot"
42 setenv migrate 'run migrate_configblock; run update_latest; reset'
43 setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate'
44 setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate'
45
46 setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
47-setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
48+setenv update_new 'updt_fuse -n && run update_uboot && reset; run update_v2.5b3'
49 setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
50
51-echo 'enter "run update" to update the entire module'
52+echo 'enter "run update" to update the uboot'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_blk.scr
new file mode 100644
index 0000000..23c5b72
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_blk.scr
@@ -0,0 +1,41 @@
1test -n ${interface} || setenv interface mmc
2test -n ${drive} || setenv drive 1
3
4setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
5setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart ${blkstart} + ${blkcnt}'
6
7setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
8setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
9setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
10setenv 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'
11
12setenv 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'
13
14setenv migrate_uboot_old 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size'
15setenv migrate_uboot 'load ${interface} ${drive}:1 ${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'
16
17setenv 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}'
18
19setenv update_uboot 'load ${interface} ${drive}:1 ${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'
20
21setenv update_kernel 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
22
23setenv update_fdt 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
24
25setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${loadaddr} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
26
27setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
28setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
29#do it in chunks of 64M to fit into DDR RAM of the smallest module
30setenv 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; true'
31
32setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
33setenv migrate 'run migrate_configblock; run update_latest; reset'
34setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate'
35setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate'
36
37setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
38setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
39setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
40
41echo 'enter "run update" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_eth.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_eth.scr
new file mode 100644
index 0000000..14f4104
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx6/flash_eth.scr
@@ -0,0 +1,42 @@
1setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
2#workaround U-Boot counting in hex and split did in decimal
3setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow ${filenum} % 0x10; test ${filenrlow} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
4setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
5
6setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
7setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
8setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
9setenv 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'
10
11setenv 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'
12
13setenv 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'
14setenv 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'
15
16setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
17
18setenv 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'
19
20setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/uImage && fatwrite mmc 0:1 ${loadaddr} uImage ${filesize}'
21
22setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${fdt_file} && fatwrite mmc 0:1 ${loadaddr} ${fdt_file} ${filesize}'
23
24setenv update_configblock 'run check_configblock; tftpboot ${loadaddr} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
25
26setenv update_1 'tftpboot ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
27setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
28#do it in chunks of 64M to fit into DDR RAM of the smallest module
29#split root.ext3 into multiple 64M chunks before copying to TFTP folder as follows
30#split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
31setenv 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'
32
33setenv echo_migrate echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate\" to complete update"
34setenv migrate 'run migrate_configblock; run update_latest; reset'
35setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot_old && run echo_migrate'
36setenv update_v2.5b3 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_migrate'
37
38setenv update_latest 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
39setenv update_new 'updt_fuse -n && run update_latest && reset; run update_v2.5b3'
40setenv update 'mmc bootbus 0 2 0 1 && run update_new && exit; run update_v2.4b1'
41
42echo 'enter "run update" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/0001-Update-only-u-boot.patch b/meta-toradex-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-toradex-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-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_blk.scr
new file mode 100644
index 0000000..b63366a
--- /dev/null
+++ b/meta-toradex-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-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-imx7/flash_eth.scr
new file mode 100644
index 0000000..13025de
--- /dev/null
+++ b/meta-toradex-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'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/0001-Update-only-u-boot.patch b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/0001-Update-only-u-boot.patch
new file mode 100644
index 0000000..f096c2e
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/0001-Update-only-u-boot.patch
@@ -0,0 +1,62 @@
1From 2b11117dcc616843a6dce1a5e97fcecefa7e3f4b Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Wed, 14 Sep 2016 10:22:27 +0300
4Subject: [PATCH] Update only u-boot
5
6---
7 flash_blk.scr | 6 +++---
8 flash_eth.scr | 6 +++---
9 2 files changed, 6 insertions(+), 6 deletions(-)
10
11diff --git a/flash_blk.scr b/flash_blk.scr
12index 401c47a..8fa5af9 100644
13--- a/flash_blk.scr
14+++ b/flash_blk.scr
15@@ -11,7 +11,7 @@ setenv update_kernel 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/zImage
16 setenv update_fdt 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
17 setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
18
19-setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset'
20+setenv update_new 'run update_uboot; reset'
21
22 # Upgrade part 1, write new U-Boot, but with old ECC format still...
23 # Store config block temporarly in memory at kernel_addr_r.
24@@ -19,10 +19,10 @@ setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20
25 setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.'
26
27 # Upgrade part 2, use new ECC format for the whole device...
28-setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}'
29+setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && echo ${upgrade_part2_msg}'
30 setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.'
31
32 # fsl_nfc indicates old NAND format (24-bit ECC), start migration process
33 setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi'
34
35-echo 'enter "run update" to update the entire module'
36+echo 'enter "run update" to update the uboot'
37diff --git a/flash_eth.scr b/flash_eth.scr
38index 15aab1c..aa98b3a 100644
39--- a/flash_eth.scr
40+++ b/flash_eth.scr
41@@ -11,7 +11,7 @@ setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/zImage && ubi write ${l
42 setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
43 setenv update_rootfs 'tftpboot ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
44
45-setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset'
46+setenv update_new 'run update_uboot; reset'
47
48 # Upgrade part 1, write new U-Boot, but with old ECC format still...
49 # Store config block temporarly in memory at kernel_addr_r.
50@@ -19,10 +19,10 @@ setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20
51 setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.'
52
53 # Upgrade part 2, use new ECC format for the whole device...
54-setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}'
55+setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && echo ${upgrade_part2_msg}'
56 setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.'
57
58 # fsl_nfc indicates old NAND format (24-bit ECC), start migration process
59 setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi'
60
61-echo 'enter "run update" to update the entire module'
62+echo 'enter "run update" to update the uboot'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_blk.scr
new file mode 100644
index 0000000..8fa5af9
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_blk.scr
@@ -0,0 +1,28 @@
1setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000'
2setenv update_configblock 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/configblock.bin && nand write ${loadaddr} 0x800 ${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_rootfs 'ubi create rootfs 0 dynamic'
7setenv 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_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi'
8
9setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot'
10setenv update_kernel 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}'
11setenv update_fdt 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
12setenv update_rootfs 'fatload ${interface} 0:1 ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
13
14setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset'
15
16# Upgrade part 1, write new U-Boot, but with old ECC format still...
17# Store config block temporarly in memory at kernel_addr_r.
18setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"'
19setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.'
20
21# Upgrade part 2, use new ECC format for the whole device...
22setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}'
23setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.'
24
25# fsl_nfc indicates old NAND format (24-bit ECC), start migration process
26setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi'
27
28echo 'enter "run update" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_eth.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_eth.scr
new file mode 100644
index 0000000..aa98b3a
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/colibri-vf/flash_eth.scr
@@ -0,0 +1,28 @@
1setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000'
2setenv update_configblock 'tftpboot ${loadaddr} ${board_name}/configblock.bin && nand write ${loadaddr} 0x800 ${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_rootfs 'ubi create rootfs 0 dynamic'
7setenv 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_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi'
8
9setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot'
10setenv update_kernel 'tftpboot ${loadaddr} ${board_name}/zImage && ubi write ${loadaddr} kernel ${filesize}'
11setenv update_fdt 'tftpboot ${loadaddr} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${loadaddr} dtb ${filesize}'
12setenv update_rootfs 'tftpboot ${loadaddr} ${board_name}/ubifs.img && ubi write ${loadaddr} rootfs ${filesize}'
13
14setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset'
15
16# Upgrade part 1, write new U-Boot, but with old ECC format still...
17# Store config block temporarly in memory at kernel_addr_r.
18setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"'
19setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.'
20
21# Upgrade part 2, use new ECC format for the whole device...
22setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}'
23setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.'
24
25# fsl_nfc indicates old NAND format (24-bit ECC), start migration process
26setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi'
27
28echo 'enter "run update" to update the entire module'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_blk.scr
new file mode 100644
index 0000000..7af72e6
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_blk.scr
@@ -0,0 +1,11 @@
1#the update.sh script renames this. fwd_blk.scr -> ../flash_blk.img
2test -n ${interface} || setenv interface mmc
3test -n ${drive} || setenv drive 1
4test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf
5test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf
6test "${board_name}" = "colibri_imx7" && setenv drive 0
7test "${board_name}" = "colibri_t20" && setenv drive 0
8test "${board_name}" = "colibri_vf" && setenv drive 0
9
10test -n ${board_name} || echo "board_name env not set!" && exit
11fatload ${interface} ${drive}:1 ${loadaddr} ${board_name}/flash_blk.img && source ${loadaddr}
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_eth.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_eth.scr
new file mode 100644
index 0000000..d7ea35c
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_eth.scr
@@ -0,0 +1,6 @@
1#the update.sh script renames this. fwd_eth.scr -> ../flash_eth.img
2test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf
3test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf
4
5test -n ${board_name} || echo "board_name env not set!" && exit
6tftpboot ${loadaddr} "${board_name}/flash_eth.img" && source ${loadaddr}
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_mmc.scr
new file mode 100644
index 0000000..4c8f666
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/fwd_mmc.scr
@@ -0,0 +1,3 @@
1#the update.sh script renames this. fwd_mmc.scr -> ../flash_mmc.img
2#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions
3fatload mmc ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr
deleted file mode 100644
index ee87e85..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr
+++ /dev/null
@@ -1,6 +0,0 @@
1test -n ${interface} || setenv interface mmc
2test -n ${drive} || setenv drive 1
3
4setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
5setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}'
6echo 'enter "run update_uboot" to update the uboot'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr
deleted file mode 100644
index 207c7db..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr
+++ /dev/null
@@ -1,6 +0,0 @@
1#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions
2test -n ${interface} || setenv interface mmc
3test -n ${drive} || setenv drive 1
4
5fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img
6source ${loadaddr}
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr
deleted file mode 100644
index be8ec8d..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr
+++ /dev/null
@@ -1,2 +0,0 @@
1setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} u-boot.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot'
2echo 'enter "run update_uboot" to update the uboot'
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr
deleted file mode 100644
index e0770a0..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr
+++ /dev/null
@@ -1,3 +0,0 @@
1setenv interface mmc
2fatload ${interface} 0:1 ${loadaddr} flash_blk.img
3source ${loadaddr}
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-Update-default-args-for-apalis-imx6.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-Update-default-args-for-apalis-imx6.patch
deleted file mode 100644
index b7c7d63..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-Update-default-args-for-apalis-imx6.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 94531a3ecaea073316b9e4c341085ce5e277bd9f Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@digia.com>
3Date: Mon, 27 Oct 2014 14:53:25 +0200
4Subject: [PATCH] Update default args for apalis imx6
5
6Boot from sd card by default, disable kernel logs from tty1, and
7disable cursor blinking.
8---
9 include/configs/apalis_imx6.h | 15 ++++++++-------
10 1 file changed, 8 insertions(+), 7 deletions(-)
11
12diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
13index e7d0d20..a1d425d 100644
14--- a/include/configs/apalis_imx6.h
15+++ b/include/configs/apalis_imx6.h
16@@ -251,14 +251,14 @@
17 "&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
18
19 #define SD_BOOTCMD \
20- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 " \
21- "rootwait\0" \
22+ "drive=2\0" \
23 "sdboot=run setup; " \
24- "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
25+ "setenv bootargs ${defargs} ip=off root=/dev/mmcblk${drive}p2 " \
26+ "rw,noatime rootfstype=ext3 rootwait ${setupargs} " \
27 "${vidargs}; echo Booting from SD card in 8-bit slot...; " \
28- "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \
29+ "run sddtbload; load mmc ${drive}:1 ${kernel_addr_r} " \
30 "${boot_file} && bootm ${kernel_addr_r} ${dtbparam}\0" \
31- "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
32+ "sddtbload=setenv dtbparam; load mmc ${drive}:1 ${fdt_addr_r} " \
33 "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
34
35 #define USB_BOOTCMD \
36@@ -278,7 +278,8 @@
37 #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
38 #endif
39 #define CONFIG_EXTRA_ENV_SETTINGS \
40- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
41+ "bootcmd=run sdboot ; echo ; echo sdboot failed ; " \
42+ "run emmcboot ; echo ; echo emmcboot failed ; " \
43 "run nfsboot ; echo ; echo nfsboot failed ; " \
44 "usb start ;" \
45 "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
46@@ -299,7 +300,7 @@
47 "|| setenv drive 2; load ${interface} ${drive}:1 " \
48 "${kernel_addr_r} flash_blk.img\0" \
49 "setup=setenv setupargs fec_mac=${ethaddr} " \
50- "consoleblank=0 no_console_suspend=1 console=tty1 " \
51+ "consoleblank=0 no_console_suspend=1 vt.global_cursor_default=0 " \
52 "console=${console},${baudrate}n8\0 " \
53 "setupdate=run setsdupdate || run setusbupdate || run setethupdate;" \
54 " source ${kernel_addr_r}\0" \
55--
561.9.1
57
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-imx6-enable-sdboot-by-default.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-imx6-enable-sdboot-by-default.patch
deleted file mode 100644
index 0743128..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-imx6-enable-sdboot-by-default.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 10ebeba59e6fd25352aa44ecd85913126ec45afe Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@theqtcompany.com>
3Date: Wed, 24 Feb 2016 15:39:52 +0200
4Subject: [PATCH] colibri imx6: enable sdboot by default
5
6remove console from tty1
7---
8 include/configs/colibri_imx6.h | 5 +++--
9 1 file changed, 3 insertions(+), 2 deletions(-)
10
11diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
12index c545334..eb0dfa9 100644
13--- a/include/configs/colibri_imx6.h
14+++ b/include/configs/colibri_imx6.h
15@@ -242,7 +242,8 @@
16
17 #define FDT_FILE "imx6dl-colibri-eval-v3.dtb"
18 #define CONFIG_EXTRA_ENV_SETTINGS \
19- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
20+ "bootcmd=run sdboot ; echo ; echo sdboot failed ; " \
21+ "run emmcboot ; echo ; echo emmcboot failed ; " \
22 "run nfsboot ; echo ; echo nfsboot failed ; " \
23 "usb start ;" \
24 "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
25@@ -261,7 +262,7 @@
26 "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; " \
27 "load ${interface} ${drive}:1 ${kernel_addr_r} flash_blk.img\0" \
28 "setup=setenv setupargs fec_mac=${ethaddr} " \
29- "consoleblank=0 no_console_suspend=1 console=tty1 " \
30+ "consoleblank=0 no_console_suspend=1 " \
31 "console=${console},${baudrate}n8\0 " \
32 "setupdate=run setsdupdate || run setusbupdate || run setethupdate;" \
33 " source ${kernel_addr_r}\0" \
34--
351.9.1
36
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend
deleted file mode 100644
index 1165713..0000000
--- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend
+++ /dev/null
@@ -1,26 +0,0 @@
1##############################################################################
2##
3## Copyright (C) 2016 The Qt Company Ltd.
4## Contact: http://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:COMM$
9##
10## Commercial License Usage
11## Licensees holding valid commercial Qt licenses may use this file in
12## accordance with the commercial license agreement provided with the
13## Software or, alternatively, in accordance with the terms contained in
14## a written agreement between you and The Qt Company. For licensing terms
15## and conditions see http://www.qt.io/terms-conditions. For further
16## information use the contact form at http://www.qt.io/contact-us.
17##
18## $QT_END_LICENSE$
19##
20##############################################################################
21
22FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
23SRC_URI += " \
24 file://0001-Update-default-args-for-apalis-imx6.patch \
25 file://0001-colibri-imx6-enable-sdboot-by-default.patch \
26 "
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch
new file mode 100644
index 0000000..135dfd8
--- /dev/null
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-Make-sdboot-default-on-all-boards.patch
@@ -0,0 +1,86 @@
1From 4c748ee698961515c1602373f4f5d399c0a8e4a1 Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Wed, 14 Sep 2016 17:10:22 +0300
4Subject: [PATCH] Make sdboot default on all boards
5
6---
7 include/configs/apalis_imx6.h | 13 +++++++------
8 include/configs/colibri_imx6.h | 3 ++-
9 include/configs/colibri_imx7.h | 2 +-
10 include/configs/colibri_vf.h | 2 +-
11 4 files changed, 11 insertions(+), 9 deletions(-)
12
13diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
14index 3ea4a5c..53d9a0c 100644
15--- a/include/configs/apalis_imx6.h
16+++ b/include/configs/apalis_imx6.h
17@@ -252,14 +252,14 @@
18 "&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
19
20 #define SD_BOOTCMD \
21- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 " \
22- "rootwait\0" \
23+ "drive=2\0" \
24 "sdboot=run setup; " \
25- "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
26+ "setenv bootargs ${defargs} ip=off root=/dev/mmcblk${drive}p2 " \
27+ "rw,noatime rootfstype=ext3 rootwait ${setupargs} " \
28 "${vidargs}; echo Booting from SD card in 8-bit slot...; " \
29- "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \
30+ "run sddtbload; load mmc ${drive}:1 ${kernel_addr_r} " \
31 "${boot_file} && bootm ${kernel_addr_r} ${dtbparam}\0" \
32- "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
33+ "sddtbload=setenv dtbparam; load mmc ${drive}:1 ${fdt_addr_r} " \
34 "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
35
36 #define USB_BOOTCMD \
37@@ -279,7 +279,8 @@
38 #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
39 #endif
40 #define CONFIG_EXTRA_ENV_SETTINGS \
41- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
42+ "bootcmd=run sdboot ; echo ; echo sdboot failed ; " \
43+ "run emmcboot ; echo ; echo emmcboot failed ; " \
44 "run nfsboot ; echo ; echo nfsboot failed ; " \
45 "usb start ;" \
46 "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
47diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
48index adc2d1e..9fd5f4c 100644
49--- a/include/configs/colibri_imx6.h
50+++ b/include/configs/colibri_imx6.h
51@@ -245,7 +245,8 @@
52
53 #define FDT_FILE "imx6dl-colibri-eval-v3.dtb"
54 #define CONFIG_EXTRA_ENV_SETTINGS \
55- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
56+ "bootcmd=run sdboot ; echo ; echo sdboot failed ; " \
57+ "run emmcboot ; echo ; echo emmcboot failed ; " \
58 "run nfsboot ; echo ; echo nfsboot failed ; " \
59 "usb start ;" \
60 "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
61diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
62index e585c81..f6267a7 100644
63--- a/include/configs/colibri_imx7.h
64+++ b/include/configs/colibri_imx7.h
65@@ -226,7 +226,7 @@
66 "ubi read ${fdt_addr_r} dtb && " \
67 "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
68
69-#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot"
70+#define CONFIG_BOOTCOMMAND "run sdboot; run ubiboot; run nfsboot"
71
72 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
73
74diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
75index 26cf60a..33a3e3b 100644
76--- a/include/configs/colibri_vf.h
77+++ b/include/configs/colibri_vf.h
78@@ -185,7 +185,7 @@
79 "ubi read ${fdt_addr_r} dtb && " \
80 "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
81
82-#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot"
83+#define CONFIG_BOOTCOMMAND "run sdboot; run ubiboot; run nfsboot"
84
85 #define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4"
86
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend b/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend
index 4e0c623..d7be9e2 100644
--- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend
+++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend
@@ -19,7 +19,18 @@
19## 19##
20############################################################################## 20##############################################################################
21 21
22PV = "v2015.04-v2.6b2.1+git${SRCPV}"
23SRCREV_b2qt = "90a974d34aaa85d5ce69f83067928592c5389990"
24SRCBRANCH = "2015.04-toradex"
25COMPATIBLE_MACHINE = "(mx6|mx7|vf)"
26
27do_deploy_append_apalis-imx6() {
28 cd ${DEPLOYDIR}
29 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
30 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
31}
32
22FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 33FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
23SRC_URI += " \ 34SRC_URI += " \
24 file://0001-colibri-vf-remove-console-from-tty1.patch \ 35 file://0001-Make-sdboot-default-on-all-boards.patch \
25 " 36 "