summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-18 13:42:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-18 13:42:23 +0200
commit021fd36e08840ebf9981d483cc8cac3cbb6217de (patch)
treeb81353fbcb13337fe8e22bac3b7a00d05c417037 /scripts
parentb677bb107f14a301f5fe7cfb750b9e980c3fd9ab (diff)
convert mips to use new targethelp make target, useful to just show the help text after building
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-rb532.sh28
1 files changed, 8 insertions, 20 deletions
diff --git a/scripts/install-rb532.sh b/scripts/install-rb532.sh
index 2e9e45e1f..152ad8fa1 100755
--- a/scripts/install-rb532.sh
+++ b/scripts/install-rb532.sh
@@ -30,16 +30,6 @@ else
printf "$2 is not a file, Exiting\n"
exit 1
fi
- if [ -z $3 ];then
- printf "Please give the kernel as third parameter\n"
- exit 2
- fi
- if [ -f $3 ];then
- printf "Installing $3 on $1\n"
- else
- printf "$3 is not a file, Exiting\n"
- exit 1
- fi
if [ -b $1 ];then
printf "Using $1 as CF disk for installation\n"
echo "WARNING: This will destroy all data on $1 - type Yes to continue!"
@@ -81,17 +71,8 @@ parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize >/dev/null 2>&1
parted -s $1 set 1 boot on >/dev/null 2>&1
sfdisk --change-id $1 1 27 >/dev/null 2>&1
sfdisk --change-id $1 3 88 >/dev/null 2>&1
-sleep 2
+sleep 1
mkfs.ext4 -q -O ^huge_file ${1}2
-sync
-dd if=$3 of=${1}1 bs=2048 >/dev/null 2>&1
-if [ $? -eq 0 ];then
- printf "Installation of kernel successful.\n"
-else
- printf "Installation of kernel failed.\n"
-fi
-sync
-sleep 2
tune2fs -c 0 -i 0 -m 1 ${rootpart} >/dev/null 2>&1
if [ $? -eq 0 ];then
printf "Successfully disabled filesystem checks on ${rootpart}\n"
@@ -104,6 +85,13 @@ tmp=$(mktemp -d)
mount -t ext4 ${rootpart} $tmp
printf "Extracting install archive\n"
tar -C $tmp -xzpf $2
+dd if=$tmp/boot/kernel of=${1}1 bs=2048 >/dev/null 2>&1
+if [ $? -eq 0 ];then
+ printf "Installation of kernel successful.\n"
+ rm $tmp/boot/kernel
+else
+ printf "Installation of kernel failed.\n"
+fi
printf "Fixing permissions\n"
chmod 1777 $tmp/tmp
chmod 4755 $tmp/bin/busybox