wok-6.x annotate get-softmodem-driver/stuff/hcfpcimodem-1.19full.diff @ rev 4609

libv4l: add LD_PREPLOAD trick to /etc/profile
author Rohit Joshi <jozee@slitaz.org>
date Tue Dec 15 16:42:43 2009 +0000 (2009-12-15)
parents bc0a71a7371e
children
rev   line source
domcox@3462 1 diff -ru hcfpcimodem-1.19full/config.mak hcfpcimodem-1.19full-slitaz/config.mak
domcox@3462 2 --- hcfpcimodem-1.19full/config.mak 2009-04-29 22:04:22.000000000 +0200
domcox@3462 3 +++ hcfpcimodem-1.19full-slitaz/config.mak 2009-06-15 22:17:05.000000000 +0200
domcox@3462 4 @@ -131,4 +131,4 @@
domcox@3462 5 -e "s!@SCR_SUPPORT@!`test ! \"$(IMPORTED_SCR_SUPPORT)\" = yes; echo $$?`!g" \
domcox@3462 6 -e "s!@DMP_SUPPORT@!`test -z \"$(IMPORTED_DMP_SUPPORT)\"; echo $$?`!g" \
domcox@3462 7 < $< > $@
domcox@3462 8 - chmod --reference=$< $@
domcox@3462 9 + chmod 755 $@
domcox@3462 10 diff -ru hcfpcimodem-1.19full/makefile hcfpcimodem-1.19full-slitaz/makefile
domcox@3462 11 --- hcfpcimodem-1.19full/makefile 2009-04-29 22:04:22.000000000 +0200
domcox@3462 12 +++ hcfpcimodem-1.19full-slitaz/makefile 2009-06-15 22:17:47.000000000 +0200
domcox@3462 13 @@ -149,7 +149,7 @@
domcox@3462 14 ifeq ($(RPMOPTEVAL),yes)
domcox@3462 15 RPMTARGETCPU=$(shell rpm --eval '%_target_cpu')
domcox@3462 16 else
domcox@3462 17 -RPMTARGETCPU=$(shell uname -i)
domcox@3462 18 +RPMTARGETCPU=$(shell uname -m)
domcox@3462 19 endif
domcox@3462 20
domcox@3462 21 ifneq ($(RPMOPTDEFINE),yes)
domcox@3462 22 diff -ru hcfpcimodem-1.19full/modules/Makefile hcfpcimodem-1.19full-slitaz/modules/Makefile
domcox@3462 23 --- hcfpcimodem-1.19full/modules/Makefile 2009-04-29 22:04:22.000000000 +0200
domcox@3462 24 +++ hcfpcimodem-1.19full-slitaz/modules/Makefile 2009-06-15 22:19:01.000000000 +0200
domcox@3462 25 @@ -20,7 +20,7 @@
domcox@3462 26 include $(TOP)/config.mak
domcox@3462 27
domcox@3462 28 IMPORTED = $(TOP)/modules/imported
domcox@3462 29 -MACHINE_ARCH := $(shell if uname --hardware-platform >/dev/null 2>&1 && ! uname --hardware-platform | grep -q "unknown"; then uname --hardware-platform; else uname --machine | sed 's/^i.86$$/i386/'; fi)
domcox@3462 30 +MACHINE_ARCH := $(shell if uname -p >/dev/null 2>&1 && ! uname -p | grep -q "unknown"; then uname -p; else uname -m | sed 's/^i.86$$/i386/'; fi)
domcox@3462 31 ifneq ($(subst powerpc,ppc,$(IMPORTED_ARCH)),$(MACHINE_ARCH))
domcox@3462 32 $(warning *** WARNING: Trying to compile kernel modules on a $(MACHINE_ARCH) system while the installed $(CNXTTARGET) driver package is for $(IMPORTED_ARCH), this is likely to fail... ***)
domcox@3462 33 endif
domcox@3462 34 diff -ru hcfpcimodem-1.19full/scripts/cnxtconfig.in hcfpcimodem-1.19full-slitaz/scripts/cnxtconfig.in
domcox@3462 35 --- hcfpcimodem-1.19full/scripts/cnxtconfig.in 2009-04-29 22:04:22.000000000 +0200
domcox@3462 36 +++ hcfpcimodem-1.19full-slitaz/scripts/cnxtconfig.in 2009-06-16 09:32:18.000000000 +0200
domcox@3462 37 @@ -74,7 +74,7 @@
domcox@3462 38 answer="${region}"
domcox@3462 39 ;;
domcox@3462 40 *)
domcox@3462 41 - answer="`echo \"${answer}\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3462 42 + answer="`echo \"${answer}\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
domcox@3462 43 ;;
domcox@3462 44 esac
domcox@3462 45 fi
domcox@3462 46 @@ -109,15 +109,13 @@
domcox@3462 47 {
domcox@3462 48 # Try to guess what region we're in, using the timezone settings
domcox@3462 49
domcox@3462 50 - localtime_size="`/bin/ls -lL /etc/localtime 2>/dev/null | ${AWK} '{print $5}'`"
domcox@3462 51 -
domcox@3462 52 - if ! [ ${localtime_size} -gt 0 ]; then
domcox@3462 53 + if [ ! -e /etc/TZ ]; then
domcox@3462 54 return 1
domcox@3462 55 fi
domcox@3462 56
domcox@3462 57 - zoneinfo_dir=/usr/share/zoneinfo
domcox@3494 58 + zoneinfo_dir=/usr/share/hcfpcimodem
domcox@3462 59
domcox@3462 60 - if [ ! -d ${zoneinfo_dir} -o ! -f ${zoneinfo_dir}/zone.tab ]; then
domcox@3494 61 + if [ -f ${zoneinfo_dir}/zone.tab ]; then
domcox@3462 62 return 1
domcox@3462 63 fi
domcox@3462 64
domcox@3462 65 @@ -206,17 +204,9 @@
domcox@3462 66 iso_VN=00BC # VIETNAM
domcox@3462 67
domcox@3462 68 (
domcox@3462 69 - cd ${zoneinfo_dir} 2>/dev/null || return 1
domcox@3462 70 - find . -type f -size "${localtime_size}"c -print | sed 's@^\./@@' | \
domcox@3462 71 - while read file; do
domcox@3462 72 - cmp -s /etc/localtime $file || continue
domcox@3462 73 -# in the egrep and sed regular expressions below, it is very important to
domcox@3462 74 -# have tabs, not spaces
domcox@3462 75 - egrep " $file( .*|\$)" ${zoneinfo_dir}/zone.tab
domcox@3462 76 - done | sed -n '/^[^#]/s/ .*//p' | sort | uniq | \
domcox@3462 77 - while read code; do
domcox@3462 78 - eval "echo \${iso_${code}}"
domcox@3462 79 - done | sort | uniq
domcox@3462 80 + zone=`cat /etc/TZ`
domcox@3494 81 + code=`grep $zone ${zoneinfo_dir}/zone.tab | awk '{print $1}' | sort | uniq`
domcox@3462 82 + eval "echo \${iso_${code}}"
domcox@3462 83 return 0
domcox@3462 84 )
domcox@3462 85 }
domcox@3462 86 @@ -271,7 +261,7 @@
domcox@3462 87 # The md5sum is used for input verification.
domcox@3462 88 disptokey()
domcox@3462 89 {
domcox@3462 90 - k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9A-F\012]'`"
domcox@3462 91 + k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9][A-F][\012]'`"
domcox@3462 92 case $k in
domcox@3462 93 00000000)
domcox@3462 94 echo "$k"
domcox@3462 95 @@ -1655,7 +1645,7 @@
domcox@3462 96 update-modules
domcox@3462 97 else
domcox@3462 98 if ("$@" "${modulesconf}" | "${filter}"; cat ${f}) > ${modulesconf}.$$; then
domcox@3462 99 - if ! cmp --silent ${modulesconf}.$$ ${modulesconf}; then
domcox@3462 100 + if ! cmp -s ${modulesconf}.$$ ${modulesconf}; then
domcox@3462 101 if ! cp ${modulesconf}.$$ ${modulesconf}; then
domcox@3462 102 rm -f ${modulesconf}.$$ ${f}
domcox@3462 103 exit 1
domcox@3462 104 @@ -1681,7 +1671,7 @@
domcox@3462 105 fi
domcox@3462 106
domcox@3462 107 if ("$@" "${modprobeconf}" | "${filter}"; cat ${f}) > ${modprobeconf}.$$; then
domcox@3462 108 - if ! cmp --silent ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3462 109 + if ! cmp -s ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3462 110 if ! cp ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3462 111 rm -f ${modprobeconf}.$$ ${f}
domcox@3462 112 exit 1
domcox@3462 113 @@ -2214,6 +2204,10 @@
domcox@3462 114 elif [ -d /var/lib/LST ]; then
domcox@3462 115 OSDISTNAME=Caldera
domcox@3462 116 OSDISTIDNT=caldera
domcox@3462 117 + elif [ -f /etc/slitaz-release ]; then
domcox@3462 118 + OSDISTNAME=SliTaz
domcox@3462 119 + OSDISTIDNT=slitaz
domcox@3462 120 + OSDISTVERS="`cat /etc/slitaz-release`"
domcox@3462 121 fi
domcox@3462 122
domcox@3462 123 OSKERNNAME="`uname -s | tr '[A-Z]' '[a-z]'`"
domcox@3462 124 @@ -2268,7 +2262,7 @@
domcox@3462 125
domcox@3462 126 dump_file()
domcox@3462 127 {
domcox@3462 128 - dump_cmd cat -v $@
domcox@3462 129 + dump_cmd cat $@
domcox@3462 130 }
domcox@3462 131
domcox@3462 132 dump_diagnostics()
domcox@3462 133 @@ -2587,7 +2581,7 @@
domcox@3462 134 fi
domcox@3462 135 units="${specificunit}"
domcox@3462 136 if [ -z "${units}" ]; then
domcox@3462 137 - units=`ls --ignore=flush_nvm ${procdrvdir}`
domcox@3462 138 + units=`ls ${procdrvdir} | grep -v flush_nvm`
domcox@3462 139
domcox@3462 140 if [ -z "${units}" ]; then
domcox@3462 141 echo ""
domcox@3462 142 @@ -2884,7 +2878,7 @@
domcox@3462 143 explicitopt=true
domcox@3462 144 do_cfgregion=true
domcox@3462 145 if [ -n "$2" ]; then
domcox@3462 146 - setregion="`echo \"$2\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3462 147 + setregion="`echo \"$2\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
domcox@3462 148 fi
domcox@3462 149 shift 2
domcox@3462 150 ;;
domcox@3462 151 @@ -2954,7 +2948,7 @@
domcox@3462 152
domcox@3462 153 # Accept --region <name> as equivalent to --region=<name>
domcox@3462 154 if ${do_cfgregion} && [ $# -ge 1 -a -z "${setregion}" ]; then
domcox@3462 155 - setregion="`echo \"$1\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3462 156 + setregion="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/s'`"
domcox@3462 157 shift
domcox@3462 158 fi
domcox@3462 159
domcox@3462 160 @@ -3033,7 +3027,7 @@
domcox@3462 161
domcox@3462 162 if ${do_cfgnewinstance}; then
domcox@3462 163 if [ ! -d "${cnxtnvmdir}/dynamic/${newinstance}" ]; then
domcox@3462 164 - mkdir --mode=700 --parents "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
domcox@3462 165 + mkdir -m 700 -p "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
domcox@3462 166 # The purpose of --info here is to ensure module reload:
domcox@3462 167 (sleep 2; exec @CNXTTARGET@config --auto --region=AUTO --info) </dev/null >/dev/null 2>&1 &
domcox@3462 168 fi
domcox@3462 169