diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-07 20:12:57 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-07 20:12:57 +0100 |
commit | 2bbfadac526c7880720e518e0fdd84ac0ca601bd (patch) | |
tree | 5d7ca7982b47e2fe7ea4ef6ed5f461f3ffce83d7 /package/cfgfs | |
parent | 6daa792eab1488d013fefc5eb7e4d01f40f38687 (diff) | |
parent | 2e44499238125dbecbbf17222496ebba315cc90c (diff) |
resolve conflicts
Diffstat (limited to 'package/cfgfs')
-rw-r--r-- | package/cfgfs/Makefile | 7 | ||||
-rw-r--r-- | package/cfgfs/src/fwcf.sh | 25 |
2 files changed, 21 insertions, 11 deletions
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile index 926473eb6..33d4ee228 100644 --- a/package/cfgfs/Makefile +++ b/package/cfgfs/Makefile @@ -4,16 +4,17 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cfgfs -PKG_VERSION:= 1.0.6 -PKG_RELEASE:= 5 +PKG_VERSION:= 1.0.7 +PKG_RELEASE:= 1 PKG_DESCR:= compressed config filesystem PKG_SECTION:= base + 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\n\tdepends on !ADK_TARGET_ROOTFS_YAFFS +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 include ${TOPDIR}/mk/package.mk diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh index 84eef3780..e921dfbdf 100644 --- a/package/cfgfs/src/fwcf.sh +++ b/package/cfgfs/src/fwcf.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (c) 2006, 2007 # Thorsten Glaser <tg@mirbsd.de> -# Copyright (c) 2009 +# Copyright (c) 2009, 2010 # Waldemar Brodkorb <wbx@openadk.org> # # Provided that these terms and disclaimer and all copyright notices @@ -21,7 +21,7 @@ # Possible return values: # 0 - everything ok # 1 - syntax error -# 1 - no 'cfgfs' mtd/cf partition found +# 1 - no 'cfgfs' mtd/cf/nand partition found # 1 - cfgfs erase: failed # 1 - cfgfs setup: already run # 3 - cfgfs setup: mount --bind problems @@ -42,7 +42,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin wd=$(pwd) cd / -what='Configuration Filesystem Utility (cfgfs), Version 1.06' +what='Configuration Filesystem Utility (cfgfs), Version 1.07' who=$(id -u) if [ $who -ne 0 ]; then @@ -113,8 +113,17 @@ EOF exit 1 ;; esac -# find backend device, first try to find partition with ID 88 mtd=0 + +if [ -x /sbin/nand ];then + mtdtool=/sbin/nand +fi + +if [ -x /sbin/mtd ];then + mtdtool=/sbin/mtd +fi + +# find backend device, first try to find partition with ID 88 part=$(fdisk -l|awk '$5 == 88 { print $1 }') if [ -z $part ]; then # otherwise search for MTD device with name cfgfs @@ -130,7 +139,7 @@ fi if test $1 = erase; then dd if="$part" 2>&1 | md5sum 2>&1 >/dev/urandom if [ $mtd -eq 1 ]; then - cfgfs.helper -Me | mtd -F write - cfgfs + cfgfs.helper -Me | eval $mtdtool -F write - cfgfs else cfgfs.helper -Me | cat > $part fi @@ -161,7 +170,7 @@ if test $1 = setup; then x=$(dd if="$part" bs=4 count=1 2>/dev/null) [[ "$x" = "FWCF" ]] || \ if [ $mtd -eq 1 ]; then - cfgfs.helper -Me | mtd -F write - cfgfs + cfgfs.helper -Me | eval $mtdtool -F write - cfgfs else cfgfs.helper -Me | cat > $part fi @@ -258,7 +267,7 @@ if test $1 = commit; then done rv=0 if [ $mtd -eq 1 ]; then - if ! ( cfgfs.helper -M /tmp/.cfgfs/temp | mtd -F write - cfgfs ); then + if ! ( cfgfs.helper -M /tmp/.cfgfs/temp | eval $mtdtool -F write - cfgfs ); then echo 'cfgfs: error: cannot write to $part!' rv=6 fi @@ -387,7 +396,7 @@ if test $1 = restore; then exit 12 fi if [ $mtd -eq 1 ]; then - if ! ( cfgfs.helper -MD dump | mtd -F write - cfgfs ); then + if ! ( cfgfs.helper -MD dump | eval $mtdtool -F write - cfgfs ); then echo 'cfgfs: error: cannot write to $part!' exit 6 fi |