blob: f41a7960d178cc25725120cd3f2597a33a13364f (
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
|
From c596d9067aa789a62e51df89917680eabe6453e2 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@openmoko.com>
Date: Thu, 7 Aug 2008 12:20:37 +0100
Subject: [PATCH] add-build-makerecovery.patch
This patch adds a script that creates a "recovery kernel" image
from a recovery-uImage-moredrivers-... image. The use of these
recovery images is explained here:
http://wiki.openmoko.org/wiki/Freerunner_backup_kernel
Signed-off-by: Andy Green <andy@openmoko.com>
---
makerecovery | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
create mode 100755 makerecovery
diff --git a/makerecovery b/makerecovery
new file mode 100755
index 0000000..e158638
--- /dev/null
+++ b/makerecovery
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# make 6MB recovery image from two moredrivers type kernels
+# placed at start and at +4MBytes
+
+if [ -z "$1" ] ; then
+ echo "Usage: $0 uImage-moredrivers-..."
+ exit 1
+fi
+cat $1 > recovery-$1
+SIZE=`ls -l $1 | tr -s ' ' ' ' | cut -d' ' -f5`
+SPACE=$(( 4 * 1024 * 1024 - $SIZE ))
+dd if=/dev/zero of=_spacer bs=1 count=$SPACE
+cat _spacer >> recovery-$1
+rm -f _spacer
+cat $1 >> recovery-$1
+
--
1.5.6.5
|