1 From 5007c46ae31856ddac45e0e59bb54cd37c51fe78 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 2 Jul 2008 22:40:43 +0100
4 Subject: [PATCH] add-remote-install-sdcard-script.patch
6 If you boot from SDCARD, this helper script for the build host
7 mounts SD card part 1, copies the new uImage.bin, umounts it and
8 then remounts SD card part 2 as ro, before doing a reboot all
9 in one step. Read the instructions inside the script for adding
10 your public key to the GTAxx rootfs for really really simple and
11 nice automatic update and reboot action.
13 Signed-off-by: Andy Green <andy@openmoko.com>
15 remote_install_sdcard | 20 ++++++++++++++++++++
16 1 files changed, 20 insertions(+), 0 deletions(-)
17 create mode 100755 remote_install_sdcard
19 diff --git a/remote_install_sdcard b/remote_install_sdcard
21 index 0000000..c84b6ae
23 +++ b/remote_install_sdcard
27 +# automatic kernel updater and reboot - Andy Green <andy@openmoko.com>
29 +GTA_DEVICE_IP=192.168.0.202
32 +# you should set up key-based auth on dropbear if you want
35 +# 1) mkdir /home/root/.ssh
36 +# 2) chown root:root / /home /home/root
37 +# 3) chmod 700 /home/root /home/root/.ssh
38 +# 4) copy your id_*.pub into /home/root/.ssh/authorized_keys
39 +# 5) chmod 600 /home/root/.ssh/*
41 +ssh root@$GTA_DEVICE_IP "mount /dev/mmcblk0p1 $GTA_MOUNTPOINT"
42 +scp uImage.bin root@$GTA_DEVICE_IP:$GTA_MOUNTPOINT
43 +ssh root@$GTA_DEVICE_IP "umount $GTA_MOUNTPOINT ; mount /dev/mmcblk0p2 / -oremount,ro ; reboot -if &"