LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2009, 03:25 PM   #1
brainvision
Member
 
Registered: Mar 2009
Location: Bologna (BO)
Distribution: slackware-current
Posts: 50

Rep: Reputation: 1
Question Sitecom WL-182 300N (Ralink RT2870 chipset). Driver compiling..


Hello everybody here at LinuxQuestions..

First of all I hope this is the best place to post this thread.. I've searched the forum for similar post but they all regarded others distros.. and they were all about one year old.
If I've made an error, excuse me for this..

So, yesterday I bought a usb wireless adaptor: a Sitecom WL-182 300N (the powerful, as I understand). After searching the sitecom.com site I understand tha make it working on my slackware 12.2 wouldn't be so easy as I hoped..
I open a console and after su, I give lsusb and seen that the chipset for my sitecom is Ralink RT2870. Then, searching on google I've soon found this link, http://www.ralinktech.com/ralink/Hom...ort/Linux.html (found even on this forum).
Now, the problem is: how to compile this driver for my slackware 12.2? I have a 2.6.27.10 series kernel.
The real problem is that I'm able to make this because I find the Readme file not understandable..

Thank you very much for your patience.. I hope that someone could really help me.. Thank you again!, and see you soon (I hope)!
 
Old 03-09-2009, 03:30 AM   #2
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Rep: Reputation: 73
Assuming that it's not now supported already by the 12.2 kernel (which I don't think it is) and bearing in mind my experience was with 12.1...

1 Download and tar xvf the source tar ball: 2008_0918_RT2860_Linux_STA_v1.8.0.0.tar.bz2
2 cd 2008_0918_RT2860_Linux_STA_v1.8.0.0
3 make
4 if all goes well then either make install or cp os/linux/rt2860sta.ko /lib/modules/YOURKERNELVERSION/kernel/drivers/net/wireless/rt2860sta.ko
5 modprobe rt2860sta

and then set it up for your SSID etc. - see this thread.

Alternatively, you can try using this slackbuild I created by modifying one for a previous ralink driver - see http://www.slackbuilds.org for more on slackbuilds:

Code:
#!/bin/sh

# Slackware build script for rt2680

# Copyright 2006  Martin Lefebvre <dadexter@gmail.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.
#

# Modified by the SlackBuilds.org Project.
# Adapted from rt2500 to rt2860 by mcnalu 15nov08

set -e
#use PREFIX to avoid funny date prefix
PREFIX=2008_0918
PRGNAM=RT2860
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
#FULLVERSION=$(tar -tzf rt2500-cvs-daily.tar.gz |head -1|cut -d- -f3|tr -d \/)
VERSION=Linux_STA_v1.8.0.0
_KERNELVER=${_KERNELVER:-$(uname -r)}
#_KERNMINOR=$(echo ${_KERNELVER} | awk -F "." '{ print $2 }')

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi


rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PREFIX}_${PRGNAM}_${VERSION}
echo $CWD/${PREFIX}_${PRGNAM}_${VERSION}
tar -xjvf $CWD/${PREFIX}_${PRGNAM}_${VERSION}.tar.bz2
cd ${PREFIX}_${PRGNAM}_${VERSION}/
chown -R root:root .
chmod -R a-s,u+w,go+r-w .

#delete silly cp to /tftpboot lines
mv Makefile Makefile_orig
sed '/tftpboot/ d' Makefile_orig > Makefile

CFLAGS=${SLKCFLAGS} make || exit 1

install -D -m 0644 os/linux/rt2860sta.ko $PKG/lib/modules/$_KERNELVER/kernel/drivers/net/wireless/rt2860sta.ko
    
#( cd $PKG
#  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#)
        
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
for i in README_STA RT2860STA.dat iwpriv_usage.txt ; do
  cat $i > $PKG/usr/doc/$PRGNAM-$VERSION/$i ;
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
        
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}_$(echo $_KERNELVER | tr - _)-${ARCH}-${BUILD}${TAG}.tgz
 
Old 03-09-2009, 11:24 AM   #3
brainvision
Member
 
Registered: Mar 2009
Location: Bologna (BO)
Distribution: slackware-current
Posts: 50

Original Poster
Rep: Reputation: 1
Unhappy

Code:
root in console..:/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0# makemake -C tools
make[1]: Entering directory `/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0/tools'
/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0/tools/bin2h
cp -f os/linux/Makefile.6 /home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile
make  -C  /lib/modules/2.6.27.10-13/build SUBDIRS=/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux modules
make: *** /lib/modules/2.6.27.10-13/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2
root in console..:/home/brainvision/varia/2008_0925_RT2870_Linux_STA_v1.4.0.0#
First of all, thank you very much for your reply and your help..
As you can see on the above reported code, there were errors very soon when I give the make into the driver directory.. but really I'm not able to understand what kind of error it is!
It say: /lib/modules/2.6.10-13/build: No such file or directory.. And this strange, because I've got this directory! For a normal user it is not readable!
To be more clear, http://img522.imageshack.us/img522/9863/libmodules.jpg

But the thing much more strange is that when I open my thunar file manager as root and try to open the directory "build", it disappear! I've to open it again, and this time I right click on it to see the property and.. it disappear again! And so on!!
I really can't understand this problem..! And hope that someone else is able to help me.. I'm very sad to can't use this wireless adapter (I've searched for a so powerful hardware for a lot of time)!

Thank you very much, see you soon, boys!
 
Old 03-09-2009, 03:23 PM   #4
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,171
Blog Entries: 5

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Hello,

To get a "better picture" of your kernel modules directory's permissions, run this command (preferably as root):

Code:
ls -l /lib/modules/2.6.27.10-13/
 
Old 03-09-2009, 04:01 PM   #5
brainvision
Member
 
Registered: Mar 2009
Location: Bologna (BO)
Distribution: slackware-current
Posts: 50

Original Poster
Rep: Reputation: 1
Question

Quote:
Originally Posted by gegechris99 View Post
Hello,

To get a "better picture" of your kernel modules directory's permissions, run this command (preferably as root):

Code:
ls -l /lib/modules/2.6.27.10-13/
Yes, man, I understand what you mean..! Even if I knew this console command I haven't thought at it to solve this situation.. This is the experience, man!, what I haven't yet..
But, anyway..
And much of all giving at the console this command I've discovered the reason why the link "build" seemed to be foolish at all! It point at a directory like that: /usr/src/linux-2.6.27.10. And so, what I surprise to see that I don't have this directory!! It's a real and big big lack on my system, don't you think?
Maybe I've to reinstall some base packages like this one of the source kernel.. It's a problem that I must solve now and very soon!

What do you think about that? I always fear that I can't explain myself in english.. Hope this is not so true as I imagine..

Thank you all for your help, I'm still not able to use my usb wireless adapter, but for now I'm collecting information about reasons why this happen..
Goodbye, see you soon (as always)!
 
Old 03-10-2009, 04:28 AM   #6
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,171
Blog Entries: 5

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Hello Brainvision,

Your english is understandable

Slackware 12.2 ships with kernel 2.6.27.7 so I assume that you compiled your own kernel 2.6.27.10. So it's a bit surprising that directory /usr/src/linux-2.6.27.10 does not exist because you need the kernel source files to compile it.

Please check where you put your kernel 2.6.27.10 source file and change the link "/lib/modules/2.6.27.10-13/build" accordingly. For example, if you put the kernel source in your user tmp directory, run the following commands as root:

Code:
rm /lib/modules/2.6.27.10-13/build
ln -s /home/brainvision/tmp/src/linux-2.6.27.10 /lib/modules/2.6.27.10-13/build
 
Old 03-12-2009, 05:24 AM   #7
brainvision
Member
 
Registered: Mar 2009
Location: Bologna (BO)
Distribution: slackware-current
Posts: 50

Original Poster
Rep: Reputation: 1
Thumbs down That's the problem..!

Hello everybody!

Thank you very much for your help and for your interest on my problem! I appreciated it a lot! And excuse me if I'm replying a bit too late, but I wanted to be sure of what to say..

Now I'm able to say where is the problem on my slackware 12.2 system.. I've asked everybody how have used this notebook in the last 2 weeks (3 persons) and I've looked on the last printed and logged messages by the machine.. And I've seen all the last command given by console (bash_history file). So I've discovered that one person (that I absolutely trusted) typed and gave this command as root (!!!!):
Code:
rm -R /usr/
.. He wanted to remove a directory on the desktop with similar name, but typing quickly he committed this terrible error!!

Then I make a little search with a script created to search for files that had to be in the directory /usr/ by the information given by the /var/log/packages..
So I discovered that 110 ca. packages had lost files on this directory (/usr).. Now I'm taking this packages one buy one to copy all of them in one directory and then give the command
Code:
updatepkg *
to reinstall all the files eliminated..

I hope that I have been quite clear to be understood.. And I would like to know what do you think about that.. and if I'm doing the right thing to do.. (I have thought to reinstall everything.. but..)
Now I hope in 2 days to complete this task.. Then I'll try to compile the driver (because now it's clear that the problem was that the kernel sources that had to be in /usr/src/ lacks and the error born just here!) and I'll let you know after this work..

Just a question, for now, if you can reply, please.. How to give an UP to this thread, if I need to do it?

Thank you all for your time.. see you soon!, and have a nice day!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Linksys WUSB600N (Ralink rt2870 chipset) support. brenlae Linux - Newbie 3 04-12-2009 04:36 PM
D-Link DWA-140 802.11n USB (with Ralink RT2870 chispet) driver probs andywest Linux - Hardware 2 06-12-2008 12:40 PM
What distro will work with Sitecom 300N USB adapter? tavm Linux - Wireless Networking 2 06-04-2008 04:59 PM
RedHat Linux-8 driver for ralink rt2661 chipset MWB Linux - Networking 2 12-24-2006 01:19 PM
rt2570usb (ralink chipset) driver with debian (kernel 2.6.11) Kronoz Debian 2 10-02-2005 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration