aboutsummaryrefslogtreecommitdiffstats
path: root/freedom-maker/bin
diff options
context:
space:
mode:
authorRuna A. Sandvik <runa.sandvik@gmail.com>2011-08-19 20:31:46 +0100
committerRuna A. Sandvik <runa.sandvik@gmail.com>2011-08-19 20:31:46 +0100
commitb1b7684e861effe1db69a9bcd253ccad21c49fb2 (patch)
treed8f96899c0e6a101bffc47ca801d03153b51134d /freedom-maker/bin
parentb67bbdcbf32737a30da937b9e995195fddf75903 (diff)
downloadtorouter-b1b7684e861effe1db69a9bcd253ccad21c49fb2.tar.gz
torouter-b1b7684e861effe1db69a9bcd253ccad21c49fb2.zip
we want to fork the freedom-maker script for the torouter
Diffstat (limited to 'freedom-maker/bin')
-rw-r--r--freedom-maker/bin/copy2dream.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/freedom-maker/bin/copy2dream.sh b/freedom-maker/bin/copy2dream.sh
new file mode 100644
index 0000000..cc800e9
--- /dev/null
+++ b/freedom-maker/bin/copy2dream.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# this script assumes the current root filesystem is the source, and the
+# internal microSD on a DreamPlug is the target .. copy the kernel uImage to
+# the FAT partition on sda1, and the root contents to the ext3 on sda2
+#
+mount /dev/sda1 /media
+mv /media/uImage /media/uImage.old
+cp /boot/uImage /media/uImage
+umount /media
+
+mke2fs -j /dev/sda2
+mount /dev/sda2 /media
+(cd / ; tar cf - `/bin/ls | grep -v proc | grep -v sys | grep -v media | grep -v dev`) | \
+ (cd /media ; tar xvf -)
+
+mkdir /media/proc /media/sys /media/media
+
+echo "Creating basic device nodes"
+mkdir /media/dev
+mknod /media/dev/console c 5 1
+mknod /media/dev/random c 1 8
+mknod /media/dev/urandom c 1 9
+mknod /media/dev/null c 1 3
+mknod /media/dev/ptmx c 5 2
+
+umount /dev/sda2
+
+echo "interrupt the next boot and change the root path to /dev/sda2"
+