1 From c596d9067aa789a62e51df89917680eabe6453e2 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Thu, 7 Aug 2008 12:20:37 +0100
4 Subject: [PATCH] add-build-makerecovery.patch
6 This patch adds a script that creates a "recovery kernel" image
7 from a recovery-uImage-moredrivers-... image. The use of these
8 recovery images is explained here:
10 http://wiki.openmoko.org/wiki/Freerunner_backup_kernel
12 Signed-off-by: Andy Green <andy@openmoko.com>
14 makerecovery | 17 +++++++++++++++++
15 1 files changed, 17 insertions(+), 0 deletions(-)
16 create mode 100755 makerecovery
18 diff --git a/makerecovery b/makerecovery
20 index 0000000..e158638
26 +# make 6MB recovery image from two moredrivers type kernels
27 +# placed at start and at +4MBytes
29 +if [ -z "$1" ] ; then
30 + echo "Usage: $0 uImage-moredrivers-..."
34 +SIZE=`ls -l $1 | tr -s ' ' ' ' | cut -d' ' -f5`
35 +SPACE=$(( 4 * 1024 * 1024 - $SIZE ))
36 +dd if=/dev/zero of=_spacer bs=1 count=$SPACE
37 +cat _spacer >> recovery-$1
39 +cat $1 >> recovery-$1