diff options
| author | Rainer Keller <rainer.keller@digia.com> | 2014-09-05 15:13:47 +0200 |
|---|---|---|
| committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2014-11-04 09:54:05 +0200 |
| commit | f309d05bccefc29977d474df734fecbe311f8f7b (patch) | |
| tree | 331826a59f9f810d91c85de160e118a2b9963bf0 | |
| parent | 1279b50a2c67c388617407d704b1141fa659bca9 (diff) | |
| download | meta-boot2qt-f309d05bccefc29977d474df734fecbe311f8f7b.tar.gz | |
Add b2qt-update-framework
Change-Id: Iaefed14f1d2bfecb436c2bfa68c94ffe74672128
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
3 files changed, 69 insertions, 14 deletions
diff --git a/conf/distro/include/nitrogen6x.conf b/conf/distro/include/nitrogen6x.conf index 982cf8a..56af2f7 100644 --- a/conf/distro/include/nitrogen6x.conf +++ b/conf/distro/include/nitrogen6x.conf | |||
| @@ -29,8 +29,13 @@ BOOTFS_CONTENT = "\ | |||
| 29 | ${KERNEL_IMAGETYPE}-imx6q-sabrelite.dtb:imx6q-sabrelite.dtb \ | 29 | ${KERNEL_IMAGETYPE}-imx6q-sabrelite.dtb:imx6q-sabrelite.dtb \ |
| 30 | 6x_bootscript-${MACHINE}:6x_bootscript \ | 30 | 6x_bootscript-${MACHINE}:6x_bootscript \ |
| 31 | 6x_upgrade-${MACHINE}:6x_upgrade \ | 31 | 6x_upgrade-${MACHINE}:6x_upgrade \ |
| 32 | ${KERNEL_IMAGETYPE}:update/${KERNEL_IMAGETYPE} \ | ||
| 33 | ${KERNEL_IMAGETYPE}-imx6q-${MACHINE}.dtb:update/imx6q-${MACHINE}.dtb \ | ||
| 34 | ${KERNEL_IMAGETYPE}-imx6dl-${MACHINE}.dtb:update/imx6dl-${MACHINE}.dtb \ | ||
| 35 | ${KERNEL_IMAGETYPE}-imx6q-sabrelite.dtb:update/imx6q-sabrelite.dtb \ | ||
| 36 | update/platform:update/platform \ | ||
| 32 | " | 37 | " |
| 33 | BOOTFS_DEPENDS = "u-boot:do_deploy virtual/kernel:do_deploy u-boot-script-boundary:do_deploy" | 38 | BOOTFS_DEPENDS = "u-boot:do_deploy virtual/kernel:do_deploy u-boot-script-boundary:do_deploy b2qt-update-framework:do_deploy" |
| 34 | 39 | ||
| 35 | EXTRA_IMAGEDEPENDS += "u-boot-script-boundary" | 40 | EXTRA_IMAGEDEPENDS += "u-boot-script-boundary" |
| 36 | 41 | ||
| @@ -62,4 +67,6 @@ MACHINE_EXTRA_INSTALL_SDK_HOST = "\ | |||
| 62 | wayland-nativesdk \ | 67 | wayland-nativesdk \ |
| 63 | " | 68 | " |
| 64 | 69 | ||
| 70 | B2QT_PLATFORM = "iMX6-eLinux" | ||
| 71 | |||
| 65 | ADB_PRODUCTID = "0x0d02" | 72 | ADB_PRODUCTID = "0x0d02" |
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch index 995e418..dd699d8 100644 --- a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch | |||
| @@ -11,9 +11,16 @@ diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/ | |||
| 11 | index 5bc6170..4116ed4 100644 | 11 | index 5bc6170..4116ed4 100644 |
| 12 | --- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 12 | --- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt |
| 13 | +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 13 | +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt |
| 14 | @@ -1,3 +1,64 @@ | 14 | @@ -1,3 +1,67 @@ |
| 15 | +# Boot2Qt update part begin | 15 | +# Boot2Qt update part begin |
| 16 | +echo "Boot to Qt" | 16 | +echo "Boot to Qt" |
| 17 | +mw.b 0x13000000 0x76 1 # v | ||
| 18 | +mw.b 0x13000001 0x75 1 # u | ||
| 19 | +mw.b 0x13000002 0x74 1 # t | ||
| 20 | +mw.b 0x13000003 0x69 1 # i | ||
| 21 | + | ||
| 22 | +fdtaddr=0x12000000 | ||
| 23 | + | ||
| 17 | +if test "x$boot2qt_update_state" = "x" ; then | 24 | +if test "x$boot2qt_update_state" = "x" ; then |
| 18 | + setenv boot2qt_update_state valid | 25 | + setenv boot2qt_update_state valid |
| 19 | + saveenv | 26 | + saveenv |
| @@ -21,10 +28,6 @@ index 5bc6170..4116ed4 100644 | |||
| 21 | + | 28 | + |
| 22 | +# This is a workaround because environment partition is read-only. | 29 | +# This is a workaround because environment partition is read-only. |
| 23 | +if fatload mmc 1:1 0x12000000 update/state ; then | 30 | +if fatload mmc 1:1 0x12000000 update/state ; then |
| 24 | + mw.b 0x13000000 0x76 1 # v | ||
| 25 | + mw.b 0x13000001 0x75 1 # u | ||
| 26 | + mw.b 0x13000002 0x74 1 # t | ||
| 27 | + | ||
| 28 | + if cmp.b 0x12000000 0x13000000 1 ; then | 31 | + if cmp.b 0x12000000 0x13000000 1 ; then |
| 29 | + echo "State: Valid" | 32 | + echo "State: Valid" |
| 30 | + setenv boot2qt_fat_state valid | 33 | + setenv boot2qt_fat_state valid |
| @@ -49,21 +52,21 @@ index 5bc6170..4116ed4 100644 | |||
| 49 | + | 52 | + |
| 50 | + # Guess dtb name | 53 | + # Guess dtb name |
| 51 | + dtbname="imx6"; | 54 | + dtbname="imx6"; |
| 52 | + if itest.s x6S != "x\$cpu" ; then | 55 | + if itest.s x6S != "x$cpu" ; then |
| 53 | + dtbname=\${dtbname}q-; | 56 | + dtbname=${dtbname}q-; |
| 54 | + else | 57 | + else |
| 55 | + dtbname=\${dtbname}s-; | 58 | + dtbname=${dtbname}s-; |
| 56 | + fi | 59 | + fi |
| 57 | + | 60 | + |
| 58 | + if itest.s x == "x\$board" ; then | 61 | + if itest.s x == "x$board" ; then |
| 59 | + board=sabrelite | 62 | + board=sabrelite |
| 60 | + fi | 63 | + fi |
| 61 | + dtbname=\${dtbname}\${board}.dtb; | 64 | + dtbname=${dtbname}${board}.dtb; |
| 62 | + | 65 | + |
| 63 | + fatload mmc 1:1 0x10800000 update/uImage | 66 | + fatload mmc 1:1 ${loadaddr} update/uImage |
| 64 | + fatload mmc 1:1 0x12000000 update/${dtbname} | 67 | + fatload mmc 1:1 ${fdtaddr} update/${dtbname} |
| 65 | + fatload mmc 1:1 0x13000000 update/uRamdisk | 68 | + fatload mmc 1:1 0x13000000 update/uRamdisk |
| 66 | + bootm 0x10800000 0x13000000 0x12000000 | 69 | + bootm ${loadaddr} 0x13000000 ${fdtaddr} |
| 67 | +fi | 70 | +fi |
| 68 | + | 71 | + |
| 69 | +if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then | 72 | +if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then |
diff --git a/recipes/b2qt-update-framework/b2qt-update-framework.bb b/recipes/b2qt-update-framework/b2qt-update-framework.bb new file mode 100644 index 0000000..ceae95a --- /dev/null +++ b/recipes/b2qt-update-framework/b2qt-update-framework.bb | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | ############################################################################# | ||
| 2 | ## | ||
| 3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
| 4 | ## | ||
| 5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
| 6 | ## framework. | ||
| 7 | ## | ||
| 8 | ## $QT_BEGIN_LICENSE$ | ||
| 9 | ## Commercial License Usage Only | ||
| 10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
| 11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
| 12 | ## may use this file in accordance with the terms contained in said license | ||
| 13 | ## agreement. | ||
| 14 | ## | ||
| 15 | ## For further information use the contact form at | ||
| 16 | ## http://www.qt.io/contact-us. | ||
| 17 | ## | ||
| 18 | ## | ||
| 19 | ## $QT_END_LICENSE$ | ||
| 20 | ## | ||
| 21 | ############################################################################# | ||
| 22 | |||
| 23 | DESCRIPTION = "Boot to Qt update framework" | ||
| 24 | HOMEPAGE = "http://www.qt.io" | ||
| 25 | SECTION = "devel" | ||
| 26 | LICENSE = "CLOSED" | ||
| 27 | |||
| 28 | PV = "1.0.0" | ||
| 29 | PR = "r0" | ||
| 30 | SRCREV = "${PV}" | ||
| 31 | |||
| 32 | inherit deploy | ||
| 33 | |||
| 34 | do_deploy() { | ||
| 35 | install -d ${DEPLOYDIR}/update/ | ||
| 36 | echo ${B2QT_PLATFORM} > ${DEPLOYDIR}/update/platform | ||
| 37 | } | ||
| 38 | |||
| 39 | addtask deploy after do_install before do_build | ||
| 40 | |||
| 41 | do_compile[noexec] = "1" | ||
| 42 | do_install[noexec] = "1" | ||
| 43 | do_populate_sysroot[noexec] = "1" | ||
| 44 | |||
| 45 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
