Slackbuild ndiswrapper 1.56

Postate qui se avete consigli per migliorare i pacchetti disponibili in questo sito o se avete problemi con installazione, funzionamento o altro.

Moderatore: Staff

Regole del forum
1) Citare in modo preciso il nome del pacchetto.
2) Specificare se discussione/suggerimento o richiesta d'aiuto.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
Avatar utente
guybrush.d
Linux 1.x
Linux 1.x
Messaggi: 171
Iscritto il: mar 27 apr 2010, 0:04
Nome Cognome: Diego
Slackware: current
Kernel: 6.1.31
Desktop: Xfce 4.18
Località: Varie

Slackbuild ndiswrapper 1.56

Messaggio da guybrush.d »

Ciao a tutti,
Durante la guerra per la costruzione del mio mediacenter arrivato al punto della configurazione del wifi, mi
sono imbattuto in un problemino...Possiedo una schedina usb della Hamlet HNWU254G che è compatibile
con linux utilizzando ndiswrapper, così dopo aver aggiornato il kernel alla versione 2.6.37 per problemi
alla scheda grafica, ho scaricato lo slaclbuild di ndiswrapper v 1.56 e mi sono accorto che il pacchetto
non viene creato per via di errori con ioctl e loader.c, ciò è dovuto ad un bug di ndiswrapper 1.56. Questo si
risolve facimente applicando due patch per cui ho modificato lo slackbuild ed installato ndsiwrapper e tutto funziona
a meraviglia, ve lo allego nel caso qualcun altro abbia il mio stesso problema. Che bello non avere l'ubuntite! ;)

Codice: Seleziona tutto

#!/bin/sh

# Slackware build script for ndiswrapper

# Copyright 2007 Martin Lefebvre <dadexter@sekurity.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Maintained by Robby Workman <rworkman@slackbuilds.org> now

PRGNAM=ndiswrapper
VERSION=${VERSION:-1.56}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

KERNEL=${KERNEL:-$(uname -r)}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION

# ****** Scarico e applico le patch ******
echo Download ndiswrapper 1.56 Patches...
wget http://launchpadlibrarian.net/58046844/ndiswrapper-suse.patch
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch?revision=1.1

echo Applying Patches...
patch -Np0 < ./ndiswrapper-suse.patch
patch -Np0 < ./ndiswrapper-1.56-2.6.35.patch?revision=1.1

chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make KVERS=$KERNEL
make install KVERS=$KERNEL DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

find $PKG/usr/man -type f -exec gzip -9 {} \;

# Clean up a few things
rm $PKG/lib/modules/*/modules.*

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  AUTHORS ChangeLog INSTALL README \
    $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
sed "s%@VERSION@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n \
  $OUTPUT/$PRGNAM-${VERSION}_$(echo $KERNEL | tr - _)-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

Jibbo
Linux 0.x
Linux 0.x
Messaggi: 52
Iscritto il: mer 28 ott 2009, 19:16
Nome Cognome: Carlo
Slackware: current
Kernel: 2.6.37.6-smp
Desktop: KDE 4.5.5
Contatta:

Re: Slackbuild ndiswrapper 1.56

Messaggio da Jibbo »

Ciao a tutti, scusate se riesumo un post di tanti giorni fa, volevo solo dire che nello script c'è un errore, o almeno, per me non ha funzionato, ho corretto così
alla linea 37 e 38:

Codice: Seleziona tutto

patch -Np0 -i $CWD/ndiswrapper-suse.patch || exit 1
patch -Np0 -i $CWD/ndiswrapper-1.56-2.6.35.patch?revision=1.1.patch || exit 1
solo in questo modo tutto è andato per il verso giusto.
Ecco lo SlackBuild corretto finale:

Codice: Seleziona tutto

#!/bin/sh

# Slackware build script for ndiswrapper

# Copyright 2007 Martin Lefebvre <dadexter@sekurity.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Maintained by Robby Workman <rworkman@slackbuilds.org> now

PRGNAM=ndiswrapper
VERSION=${VERSION:-1.56}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

KERNEL=${KERNEL:-$(uname -r)}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION

# ****** Scarico e applico le patch ******
echo Download ndiswrapper 1.56 Patches...
wget http://launchpadlibrarian.net/58046844/ndiswrapper-suse.patch
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch?revision=1.1

echo Applying Patches...
patch -Np0 -i $CWD/ndiswrapper-suse.patch || exit 1
patch -Np0 -i $CWD/ndiswrapper-1.56-2.6.35.patch?revision=1.1.patch || exit 1

chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make KVERS=$KERNEL
make install KVERS=$KERNEL DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

find $PKG/usr/man -type f -exec gzip -9 {} \;

# Clean up a few things
rm $PKG/lib/modules/*/modules.*

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  AUTHORS ChangeLog INSTALL README \
    $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
sed "s%@VERSION@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n \
  $OUTPUT/$PRGNAM-${VERSION}_$(echo $KERNEL | tr - _)-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Per quelli che , come me,possono collegarsi solo in questo modo, allego un archivio con tutto già pronto (SlackBuild modificato e patch)

P.S
ricordo che nell'archivio manca la tarball coi sorgenti di ndsiwrapper, che vanno procurati a parte e inseriti nella stessa directory dello slackbuild con le patch.
P.P.S.
Scusate la lunghezza del post, spero sia di aiuto.
Allegati
ndiswrapper.tar.gz
Slackbuild e patch
(3.9 KiB) Scaricato 107 volte

Avatar utente
guybrush.d
Linux 1.x
Linux 1.x
Messaggi: 171
Iscritto il: mar 27 apr 2010, 0:04
Nome Cognome: Diego
Slackware: current
Kernel: 6.1.31
Desktop: Xfce 4.18
Località: Varie

Re: Slackbuild ndiswrapper 1.56

Messaggio da guybrush.d »

Ciao,
non mi sono dilungato nella spiegazione comunque davo per scontato di avere tutto l'occorrente nella stessa directory,
comunque grazie per la correzione!

Jibbo
Linux 0.x
Linux 0.x
Messaggi: 52
Iscritto il: mer 28 ott 2009, 19:16
Nome Cognome: Carlo
Slackware: current
Kernel: 2.6.37.6-smp
Desktop: KDE 4.5.5
Contatta:

Re: Slackbuild ndiswrapper 1.56

Messaggio da Jibbo »

Grazie a te per il contributo, non so se c'è l'avrei fatta senza il tuo script da qui partire, in 3 anni di slackware non avevo mai applicato patch ;)

Avatar utente
guybrush.d
Linux 1.x
Linux 1.x
Messaggi: 171
Iscritto il: mar 27 apr 2010, 0:04
Nome Cognome: Diego
Slackware: current
Kernel: 6.1.31
Desktop: Xfce 4.18
Località: Varie

Re: Slackbuild ndiswrapper 1.56

Messaggio da guybrush.d »

Ciao,
figurati è questo che amo di Linux, il modo in cui le persone possono aiutarsi l'un l'atro senza scopi di lucro, ma solo per il benessere comune (sembro star trek ;))

Rispondi