diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-24 19:45:09 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-24 19:45:09 +0100 |
commit | bfa2416c8786790b5901f3720fc6a6a6aab33c96 (patch) | |
tree | 6d2a71e5a4c2d571ea718549dbdf5a29da880d8c /package/adkinstall | |
parent | 8412c949934c0fc8eb1c73931b6bf60f75a1da4c (diff) | |
parent | 86d7ffda38b870dc96035feb4788ae1589aab11c (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/adkinstall')
-rw-r--r-- | package/adkinstall/src/adkinstall.foxg20 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/package/adkinstall/src/adkinstall.foxg20 b/package/adkinstall/src/adkinstall.foxg20 index fec746ef0..4b0251309 100644 --- a/package/adkinstall/src/adkinstall.foxg20 +++ b/package/adkinstall/src/adkinstall.foxg20 @@ -3,12 +3,13 @@ # special script for foxboard netus aka foxg20 if [ -z $1 ];then - printf "Please give your root tar archive as first parameter\n" + printf "Please give your root tar archive as parameter\n" exit 1 fi -if [ -z $2 ];then - printf "Please give your kernel as second parameter\n" - exit 1 + +if [ ! -f $1 ];then + printf "given root tar archive does not exist\n" + exit 1 fi printf "Creating partition scheme\n" @@ -23,13 +24,12 @@ parted -s /dev/mmcblk0 set 1 boot on sfdisk --change-id /dev/mmcblk0 3 88 >/dev/null 2>&1 sleep 2 sync -printf "Installing kernel\n" -mount -t vfat /dev/mmcblk0p1 /mnt -cp $2 /mnt/uImage -sync -umount /mnt -mke2fs /dev/mmcblk0p2 +printf "Creating ext2 filesystem\n" +mke2fs /dev/mmcblk0p2 >/dev/null 2>&1 +tune2fs -c0 -i0 /dev/mmcblk0p2 >/dev/null 2>&1 mount -t ext2 /dev/mmcblk0p2 /mnt +mkdir /mnt/boot +mount -t vfat /dev/mmcblk0p1 /mnt/boot printf "Extracting install archive\n" tar -C /mnt -xzpf $1 @@ -41,6 +41,7 @@ fi chmod 1777 /mnt/tmp chmod 4755 /mnt/bin/busybox sync +umount /mnt/boot umount /mnt if [ $? -ne 0 ];then printf "Unmounting filesystem failed" |