diff options
| author | Rainer Keller <rainer.keller@digia.com> | 2014-09-03 15:17:03 +0200 |
|---|---|---|
| committer | Rainer Keller <rainer.keller@digia.com> | 2014-09-09 11:13:03 +0300 |
| commit | ff3975413e518b9435ae2239d29fee0c6295c17c (patch) | |
| tree | 78aacd5f440444baa132fee536200bcb91b16fe1 /recipes | |
| parent | ded8f630fd877095aafa679c3c0120fe913483cd (diff) | |
| download | meta-boot2qt-ff3975413e518b9435ae2239d29fee0c6295c17c.tar.gz | |
Add update support to u-boot script
Change-Id: I519a91c57db891c16ccd1d8f61e622d8b16a3a2c
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Diffstat (limited to 'recipes')
| -rw-r--r-- | recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch | 81 | ||||
| -rw-r--r-- | recipes/u-boot/u-boot-script-boundary_git.bbappend | 1 |
2 files changed, 82 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch b/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch new file mode 100644 index 0000000..995e418 --- /dev/null +++ b/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | From 3d7276b2b27317c5067d2095ea5c3952d11f4390 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rainer Keller <rainer.keller@digia.com> | ||
| 3 | Date: Fri, 5 Sep 2014 14:39:50 +0200 | ||
| 4 | Subject: [PATCH] Add support for update recovery linux | ||
| 5 | |||
| 6 | --- | ||
| 7 | board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 61 +++++++++++++++++++++++ | ||
| 8 | 1 file changed, 61 insertions(+) | ||
| 9 | |||
| 10 | diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
| 11 | index 5bc6170..4116ed4 100644 | ||
| 12 | --- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
| 13 | +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
| 14 | @@ -1,3 +1,64 @@ | ||
| 15 | +# Boot2Qt update part begin | ||
| 16 | +echo "Boot to Qt" | ||
| 17 | +if test "x$boot2qt_update_state" = "x" ; then | ||
| 18 | + setenv boot2qt_update_state valid | ||
| 19 | + saveenv | ||
| 20 | +fi | ||
| 21 | + | ||
| 22 | +# This is a workaround because environment partition is read-only. | ||
| 23 | +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 | ||
| 29 | + echo "State: Valid" | ||
| 30 | + setenv boot2qt_fat_state valid | ||
| 31 | + setenv boot2qt_update_state valid | ||
| 32 | + saveenv | ||
| 33 | + fi | ||
| 34 | + if cmp.b 0x12000000 0x13000001 1 ; then | ||
| 35 | + echo "State: Update" | ||
| 36 | + setenv boot2qt_fat_state update | ||
| 37 | + fi | ||
| 38 | + if cmp.b 0x12000000 0x13000002 1 ; then | ||
| 39 | + echo "State: Testing" | ||
| 40 | + setenv boot2qt_fat_state testing | ||
| 41 | + fi | ||
| 42 | +fi | ||
| 43 | + | ||
| 44 | +if test "x$boot2qt_fat_state" = "xupdate" || test "x$boot2qt_update_state" = "xinvalid" ; then | ||
| 45 | + setenv boot2qt_update_state testing | ||
| 46 | + saveenv | ||
| 47 | + echo "Recovery linux starting..." | ||
| 48 | + setenv bootargs "console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 root=/dev/ram0" | ||
| 49 | + | ||
| 50 | + # Guess dtb name | ||
| 51 | + dtbname="imx6"; | ||
| 52 | + if itest.s x6S != "x\$cpu" ; then | ||
| 53 | + dtbname=\${dtbname}q-; | ||
| 54 | + else | ||
| 55 | + dtbname=\${dtbname}s-; | ||
| 56 | + fi | ||
| 57 | + | ||
| 58 | + if itest.s x == "x\$board" ; then | ||
| 59 | + board=sabrelite | ||
| 60 | + fi | ||
| 61 | + dtbname=\${dtbname}\${board}.dtb; | ||
| 62 | + | ||
| 63 | + fatload mmc 1:1 0x10800000 update/uImage | ||
| 64 | + fatload mmc 1:1 0x12000000 update/${dtbname} | ||
| 65 | + fatload mmc 1:1 0x13000000 update/uRamdisk | ||
| 66 | + bootm 0x10800000 0x13000000 0x12000000 | ||
| 67 | +fi | ||
| 68 | + | ||
| 69 | +if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then | ||
| 70 | + setenv boot2qt_update_state invalid | ||
| 71 | + saveenv | ||
| 72 | +fi | ||
| 73 | + | ||
| 74 | +# Boot2Qt update part end | ||
| 75 | + | ||
| 76 | # Yocto-specifics | ||
| 77 | setenv bootpart 2 | ||
| 78 | setenv bootdir / | ||
| 79 | -- | ||
| 80 | 1.8.5.5 | ||
| 81 | |||
diff --git a/recipes/u-boot/u-boot-script-boundary_git.bbappend b/recipes/u-boot/u-boot-script-boundary_git.bbappend index 083b2fd..a479c2b 100644 --- a/recipes/u-boot/u-boot-script-boundary_git.bbappend +++ b/recipes/u-boot/u-boot-script-boundary_git.bbappend | |||
| @@ -23,4 +23,5 @@ | |||
| 23 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" | 23 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" |
| 24 | SRC_URI += " \ | 24 | SRC_URI += " \ |
| 25 | file://0001-nitrogen6x-disable-console-cursor-blinking.patch \ | 25 | file://0001-nitrogen6x-disable-console-cursor-blinking.patch \ |
| 26 | file://0002-nitrogen6x-update.patch \ | ||
| 26 | " | 27 | " |
