summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/adkinstall/src/adkinstall.rb53239
-rwxr-xr-xpackage/base-files/extra/sbin/adkupdate5
-rw-r--r--package/cfgfs/Makefile2
3 files changed, 30 insertions, 16 deletions
diff --git a/package/adkinstall/src/adkinstall.rb532 b/package/adkinstall/src/adkinstall.rb532
index ca2ffde0d..e71848325 100644
--- a/package/adkinstall/src/adkinstall.rb532
+++ b/package/adkinstall/src/adkinstall.rb532
@@ -14,9 +14,11 @@ if [ -z $2 ];then
printf "Please give your root tar archive as second parameter\n"
exit 1
fi
-if [ -z $3 ];then
- printf "Please give your kernel as third parameter\n"
- exit 1
+if [ $cfinstall -eq 1 ];then
+ if [ -z $3 ];then
+ printf "Please give your kernel as third parameter\n"
+ exit 1
+ fi
fi
case $1 in
nand)
@@ -26,7 +28,7 @@ case $1 in
cfinstall=1
;;
*)
- printf "Target not recognized\n"
+ printf "Target device not known.\n"
exit 1
;;
esac
@@ -53,26 +55,33 @@ if [ $cfinstall -eq 1 ];then
fi
if [ $nandinstall -eq 1 ];then
- printf "Installing kernel\n"
- mount -t yaffs2 /dev/mtdblock0 /mnt
- cp $3 /mnt/kernel
- sync
- umount /mnt
+ printf "Preparing mountpoints\n"
mount -t yaffs2 /dev/mtdblock1 /mnt
rm -rf /mnt/* >/dev/null 2>&1
+ mkdir /mnt/boot
+ mount -t yaffs2 /dev/mtdblock0 /mnt/boot
fi
printf "Extracting install archive\n"
tar -C /mnt -xzpf $2
+if [ $? -ne 0 ];then
+ printf "Extracting of install archive failed"
+ exit 1
+fi
chmod 1777 /mnt/tmp
chmod 4755 /mnt/bin/busybox
-printf "Creating device nodes\n"
-mknod -m 666 /mnt/dev/null c 1 3
-mknod -m 622 /mnt/dev/console c 5 1
-mknod -m 666 /mnt/dev/tty c 5 0
+sync
+if [ $nandinstall -eq 1 ];then
+ umount /mnt/boot
+fi
umount /mnt
-printf "Successfully installed.\n"
-exit 0
+if [ $? -ne 0 ];then
+ printf "Unmounting filesystem failed"
+ exit 1
+else
+ printf "Successfully installed.\n"
+ exit 0
+fi
diff --git a/package/base-files/extra/sbin/adkupdate b/package/base-files/extra/sbin/adkupdate
index d41e23a0f..db1dfb73a 100755
--- a/package/base-files/extra/sbin/adkupdate
+++ b/package/base-files/extra/sbin/adkupdate
@@ -12,6 +12,8 @@ else
updatecmd="gunzip -c | tar -xf -"
fi
+system=$(awk '/system type/ { print $5 }' /proc/cpuinfo 2>/dev/null)
+
check_exit() {
if [ $? -ne 0 ];then
echo "Update failed."
@@ -23,6 +25,9 @@ prepare() {
cd /
umount -f /etc
mount -o remount,rw /
+ if [ "$system" == "RB532" ];then
+ mount -t yaffs2 /dev/mtdblock0 /boot
+ fi
}
extract_from_file() {
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile
index 5650386ae..5d7fc7ae1 100644
--- a/package/cfgfs/Makefile
+++ b/package/cfgfs/Makefile
@@ -14,7 +14,7 @@ PKG_TARGET_DEPENDS:= alix wrap foxboard ag241 rb532
WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
NO_DISTFILES:= 1
-CFLINE_CFGFS:= select BUSYBOX_COMM\n\tselect BUSYBOX_MD5SUM\n\tselect BUSYBOX_XARGS\n\tselect BUSYBOX_FEATURE_SORT_BIG\n\tdepends on !ADK_TARGET_ROOTFS_NFSROOT
+CFLINE_CFGFS:= select BUSYBOX_COMM\n\tselect BUSYBOX_MD5SUM\n\tselect BUSYBOX_XARGS\n\tselect BUSYBOX_FEATURE_SORT_BIG\n\tselect BUSYBOX_DIFF\n\tdepends on !ADK_TARGET_ROOTFS_NFSROOT
include ${TOPDIR}/mk/package.mk