diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-23 22:28:04 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-23 22:28:04 +0100 |
commit | 86d7ffda38b870dc96035feb4788ae1589aab11c (patch) | |
tree | f059bcc2b8a26525e791c12e3ea4f28d0bd77822 /package | |
parent | 488a2ab4bcb764ee9f4c50cbe31627b6e0c7d881 (diff) |
optimize foxg20 target
- make cfgfs work, a small busybox fdisk patch needed
- make adkinstall and adkupdate work
Diffstat (limited to 'package')
-rw-r--r-- | package/adkinstall/src/adkinstall.foxg20 | 18 | ||||
-rwxr-xr-x | package/base-files/src/sbin/adkupdate | 4 | ||||
-rw-r--r-- | package/busybox/patches/003-fdisk-mmc.patch | 14 | ||||
-rw-r--r-- | package/cfgfs/Makefile | 2 |
4 files changed, 23 insertions, 15 deletions
diff --git a/package/adkinstall/src/adkinstall.foxg20 b/package/adkinstall/src/adkinstall.foxg20 index 8d1e21483..4b0251309 100644 --- a/package/adkinstall/src/adkinstall.foxg20 +++ b/package/adkinstall/src/adkinstall.foxg20 @@ -3,22 +3,14 @@ # 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 -fi if [ ! -f $1 ];then printf "given root tar archive does not exist\n" exit 1 fi -if [ ! -f $2 ];then - printf "given kernel does not exist\n" - exit 1 -fi printf "Creating partition scheme\n" parted -s /dev/mmcblk0 mklabel msdos @@ -32,15 +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 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 @@ -52,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" diff --git a/package/base-files/src/sbin/adkupdate b/package/base-files/src/sbin/adkupdate index 6c2f58006..bc1082b1c 100755 --- a/package/base-files/src/sbin/adkupdate +++ b/package/base-files/src/sbin/adkupdate @@ -27,6 +27,8 @@ prepare() { mount -o remount,rw / if [ "$system" == "RB532" ];then mount -t yaffs2 /dev/mtdblock0 /boot + elif [ "$system" == "FOXG20" ];then + mount -t vfat /dev/mmcblk0p1 /boot fi } @@ -78,6 +80,8 @@ sync mount -o bind /etc /tmp/.cfgfs/root if [ "$system" == "RB532" ];then umount -f /boot +elif [ "$system" == "FOXG20" ];then + umount -f /boot fi echo "Update sucessful. You should reboot now." diff --git a/package/busybox/patches/003-fdisk-mmc.patch b/package/busybox/patches/003-fdisk-mmc.patch new file mode 100644 index 000000000..961c117b2 --- /dev/null +++ b/package/busybox/patches/003-fdisk-mmc.patch @@ -0,0 +1,14 @@ +diff -Nur busybox-1.15.2.orig/util-linux/fdisk.c busybox-1.15.2/util-linux/fdisk.c +--- busybox-1.15.2.orig/util-linux/fdisk.c 2009-10-08 03:04:40.000000000 +0200 ++++ busybox-1.15.2/util-linux/fdisk.c 2010-02-23 20:41:01.000000000 +0100 +@@ -2770,7 +2770,9 @@ + for (s = ptname; *s; s++) + continue; + if (isdigit(s[-1])) +- continue; ++ if (s[-1] != '0') ++ continue; ++ + sprintf(devname, "/dev/%s", ptname); + open_list_and_close(devname, 0); + } diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile index 95c9658b2..6d8b0554f 100644 --- a/package/cfgfs/Makefile +++ b/package/cfgfs/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_DESCR:= compressed config filesystem PKG_SECTION:= base -PKG_TARGET_DEPENDS:= alix wrap foxboard ag241 rb532 +PKG_TARGET_DEPENDS:= alix wrap foxboard ag241 rb532 foxg20 WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION} NO_DISTFILES:= 1 |