From 5a65511ac3d0c687d1f2c012087b55d2950d211c Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Tue, 25 May 2010 17:16:38 +0200
Subject: add some missing files

---
 package/adkinstall/src/adkinstall.rb4xx | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/adkinstall/src/adkinstall.rb4xx

(limited to 'package/adkinstall')

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
-- 
cgit v1.2.3