summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/adkinstall/src/adkinstall.rb4xx36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/adkinstall/src/adkinstall.rb4xx b/package/adkinstall/src/adkinstall.rb4xx
new file mode 100644
index 000000000..f96cc7f05
--- /dev/null
+++ b/package/adkinstall/src/adkinstall.rb4xx
@@ -0,0 +1,36 @@
+#!/bin/sh
+# installs a rootfs tar archive from OpenADK onto
+# a NAND device
+# special script for routerboard rb4xx
+
+if [ -z $1 ];then
+ printf "Please give your root tar archive as parameter\n"
+ exit 1
+fi
+
+printf "Preparing mountpoints\n"
+mount -t yaffs2 /dev/mtdblock2 /mnt
+rm -rf /mnt/* >/dev/null 2>&1
+mkdir /mnt/boot
+mount -t yaffs2 /dev/mtdblock1 /mnt/boot
+
+printf "Extracting install archive\n"
+tar -C /mnt -xzpf $1
+if [ $? -ne 0 ];then
+ printf "Extracting of install archive failed"
+ exit 1
+fi
+
+chmod 1777 /mnt/tmp
+chmod 4755 /mnt/bin/busybox
+
+sync
+umount /mnt/boot
+umount /mnt
+if [ $? -ne 0 ];then
+ printf "Unmounting filesystem failed"
+ exit 1
+else
+ printf "Successfully installed.\n"
+ exit 0
+fi