blob: dd699d8a9bc73b45044a2ac9d97473569422c505 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
From 3d7276b2b27317c5067d2095ea5c3952d11f4390 Mon Sep 17 00:00:00 2001
From: Rainer Keller <rainer.keller@digia.com>
Date: Fri, 5 Sep 2014 14:39:50 +0200
Subject: [PATCH] Add support for update recovery linux
---
board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 61 +++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt
index 5bc6170..4116ed4 100644
--- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt
+++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt
@@ -1,3 +1,67 @@
+# Boot2Qt update part begin
+echo "Boot to Qt"
+mw.b 0x13000000 0x76 1 # v
+mw.b 0x13000001 0x75 1 # u
+mw.b 0x13000002 0x74 1 # t
+mw.b 0x13000003 0x69 1 # i
+
+fdtaddr=0x12000000
+
+if test "x$boot2qt_update_state" = "x" ; then
+ setenv boot2qt_update_state valid
+ saveenv
+fi
+
+# This is a workaround because environment partition is read-only.
+if fatload mmc 1:1 0x12000000 update/state ; then
+ if cmp.b 0x12000000 0x13000000 1 ; then
+ echo "State: Valid"
+ setenv boot2qt_fat_state valid
+ setenv boot2qt_update_state valid
+ saveenv
+ fi
+ if cmp.b 0x12000000 0x13000001 1 ; then
+ echo "State: Update"
+ setenv boot2qt_fat_state update
+ fi
+ if cmp.b 0x12000000 0x13000002 1 ; then
+ echo "State: Testing"
+ setenv boot2qt_fat_state testing
+ fi
+fi
+
+if test "x$boot2qt_fat_state" = "xupdate" || test "x$boot2qt_update_state" = "xinvalid" ; then
+ setenv boot2qt_update_state testing
+ saveenv
+ echo "Recovery linux starting..."
+ setenv bootargs "console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 root=/dev/ram0"
+
+ # Guess dtb name
+ dtbname="imx6";
+ if itest.s x6S != "x$cpu" ; then
+ dtbname=${dtbname}q-;
+ else
+ dtbname=${dtbname}s-;
+ fi
+
+ if itest.s x == "x$board" ; then
+ board=sabrelite
+ fi
+ dtbname=${dtbname}${board}.dtb;
+
+ fatload mmc 1:1 ${loadaddr} update/uImage
+ fatload mmc 1:1 ${fdtaddr} update/${dtbname}
+ fatload mmc 1:1 0x13000000 update/uRamdisk
+ bootm ${loadaddr} 0x13000000 ${fdtaddr}
+fi
+
+if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then
+ setenv boot2qt_update_state invalid
+ saveenv
+fi
+
+# Boot2Qt update part end
+
# Yocto-specifics
setenv bootpart 2
setenv bootdir /
--
1.8.5.5
|