Page 1 of 2

How to compile driver for RTL8188CUS USB wireless chipset?

Posted: Wed 13 Jul 2011, 21:20
by WiZard
I need some help compiling a usb wireless adapter driver with a RTL8188CUS chipset (uses RTL8192CU driver) . This is my setup:
- Puppy 4.12 frugal install
- 512kb save file
- /mnt/home/devx_412.sfs, confirmed loading from terminal by typing cc command
- /root/rtl8192CU, the directory containing the driver source supplied with the adapter

I opened a terminal in /root/rtl8192CU and typed make, this is the output:

make ARCH=i386 CROSS_COMPILE= -C /lib/modules/2.6.25.16/build M=/root/rtl8192CU modules
make[1]: Entering directory `/lib/modules/2.6.25.16/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.25.16/build'
make: *** [modules] Error 2

Any ideas on how to get this to compile?

Thanks
Gary

Re: Compile usb wireless driver

Posted: Wed 13 Jul 2011, 21:29
by RetroTechGuy
WiZard wrote:I need some help compiling a usb wireless adapter driver with a RTL8188CUS chipset (uses RTL8192CU driver) . This is my setup:
- Puppy 4.12 frugal install
- 512kb save file
- /mnt/home/devx_412.sfs, confirmed loading from terminal by typing cc command
- /root/rtl8192CU, the directory containing the driver source supplied with the adapter

I opened a terminal in /root/rtl8192CU and typed make, this is the output:

make ARCH=i386 CROSS_COMPILE= -C /lib/modules/2.6.25.16/build M=/root/rtl8192CU modules
make[1]: Entering directory `/lib/modules/2.6.25.16/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.25.16/build'
make: *** [modules] Error 2

Any ideas on how to get this to compile?

Thanks
Gary
I can't help you directly, but a quick search of the list shows this by "tempestuous", and maybe you can crib from the source used to build those drivers:

http://www.murga-linux.com/puppy/viewto ... 469#462469

Posted: Wed 13 Jul 2011, 22:04
by pemasu
You seem to lack kernel sources. Install kernel sources and try again.

Posted: Wed 13 Jul 2011, 22:23
by Karl Godt
You seem to lack kernel sources. Install kernel sources and try again.
Yes a devx is not enough .
It needs something like
/kernel-src-2.6.25.16-patched-puppy4.1-sfs4.sfs

I have not yet compiled a single driver using a .sfs ,
but I can imagine it may need write access inside the source .
The sfs is always read only .

For the missing rule :
It may be missing completely inside the Makefile ,
or has to be created by ./configure || imake || automake
using a Makefile.ini or Makefile.am template .

Posted: Tue 26 Jul 2011, 14:11
by WiZard
I apologize to all who responded for my delay in getting back. In the past when I posted a question in the forum I would get an email when someone responded. If that system is still in place it didn't work so I thought no one had replied. Just for reference this USB adapter is 802.11B/G/N and VERY small, less than 1/2" square, just about the same size as the USB connector it is attached to, also very inexpensive, I bought mine on Ebay for $6.50 US including shipping. It works well on Windows, but of course I want to get it to work on Puppy. I work on mostly older P3, P4 hardware so that is why I use Puppy 4.12.

So here is the status:
@RetroTechGuy - thanks for the link, I downloaded and installed one of the pets in hopes it might work, but of course it didn't since it was compiled for the newer kernel. I will post a question in that thread.

thanks
Gary

@pemasu You are of course correct, I did not have the kernal installed, thanks

@Karl Godt I put the sfs file in /mnt/home/kernel-src-2.6.25.16-patched-puppy4.1.sfs and configured the boot manager to load it. When I run make in the terminal I get the same error message. I looked inside the makefile, but don't know enough to understand where or why it is throwing the error.

Posted: Tue 26 Jul 2011, 14:39
by darkcity
you can 'watch' or 'stop watching' topic using an option under the last reply.

when posting ensure you click the 'Notify me when a reply is posted'

(can't be of any help with driver unfortunately, apart to say someone has probably already compiled it somewhere)

Posted: Wed 27 Jul 2011, 21:26
by muggins

Posted: Wed 27 Jul 2011, 22:23
by WiZard
Muggins, I installed the .pet you posted and rebooted. Started the network wizard and the wireless device is not shown so I tried to manually load the driver. No driver listed for the 8188/8192 device and doesn't really look like any new RTL drivers were added. I can use rox and see the driver file /lib/modules/2.6.25.16/kernel/drivers/net/wireless/8192cu.ko but I can't load it. Your help is appreciated.

thanks
Gary

Posted: Wed 27 Jul 2011, 23:15
by pemasu
In console: depmod -a
Then in console: modprobe 8192cu
Are you sure you dont need firmware for that driver also ?

Posted: Wed 27 Jul 2011, 23:53
by WiZard
pemasu, thanks for the instructions. The device is now showing in the network wizard and I am using it to make this post. Problem now is I get a message box telling me the selected interface 8192cu does not support WPA which will be needed on many networks.

thanks
Gary

Posted: Wed 03 Aug 2011, 16:17
by WiZard
@muggins, I'm running Puppy 4.12 full install setup to compile per the instructions at http://puppylinux.com/development/compileapps.htm
I downloaded the driver from the Realtek site, Linux driver for Kernel 2.6.38(and earlier)


Questions about your message below:
1. "after getting the kernel source to load" how do I do this?
2. "change directory to /usr/src/linux-2.6.25.16" I don't have this diirectory?

thanks
Gary

@Wizard,

I just extracted the latest driver, from the realtek site, changed to the extracted directory, then ran make.

I suspect the reason you were having problems compiling the module is that you need to first, after getting the kernel source to load, to change directory to /usr/src/linux-2.6.25.16, then run:

Code:
make clean
make proper


(Although I think that was what I needed to do with p412....it's been several years since I installed the kernel...hopefully, if I'm wrong, someone will correct.)

Posted: Fri 05 Aug 2011, 04:00
by muggins
Because you have a full install the kernel .sfs isn't loading. So you can either mount the kernel source, then copy everything across to your full install or, perhaps simpler, if you booted a CD/DVD, installed Shinobar's Sfs-Load .pet, then load both the devx & kernel source SFS files, then try compiling your module.

Also remember that Pemasu corrected me that it should be:

Code: Select all

make clean
make prepare

Posted: Thu 11 Aug 2011, 20:04
by WiZard
muggins, tried the cd boot, installed sfs_load, loaded devx & kernel source. Ran make clean and make prepare successfully, but when I run make in the driver directory I get the same error message as always.
Did you compile on a 4.12 install?

thanks
Gary

Posted: Fri 12 Aug 2011, 01:22
by muggins
Yes, I compiled it in p412. I'll have to try booting p412 into RAM, then see if I can retrace my steps to recompile it. I'll post back later.

Posted: Fri 12 Aug 2011, 22:31
by muggins
OK. I booted p412, with prefix pfix=ram, installed Shinobar's sfs_load, then used it to load both the p412 devx & kernel sources.

I didn't do anything with the kernel source files, instead I just did, in the driver's extracted directory:

Code: Select all

make
make install
and it worked.

Why it's not working for you I can only guess:

1) are md5sums of devx & kernel sfs files OK?
2) Are you using latest driver from Realtek site?
3) Or, it's that perennial puppy problem with sfs files & full installs.

Posted: Fri 12 Aug 2011, 23:24
by pemasu
Or are you using different kernel source sfs ?
For example...there is floating several kernel source sfs for Lucid Puppy and not all compiles extra third party modules...at least not easily.

Posted: Mon 05 Sep 2011, 16:03
by WiZard
Muggins & Permasu, my apologies again for getting back so slow. Again was waiting for email telling me I had new messages. Should have just looked. Muggins, followed your last instructions of booting from CD and at last it compiled and installed correctly, hooray. I was starting to think I was jinxed.

Thanks for taking the extra time to help a beginner get the compiling sequence working.

Gary

Posted: Mon 02 Jan 2012, 01:21
by dk60902
Can you tell me if this .pet is still available? I clicked on it, but was given the message that it is no longer available.

Posted: Mon 02 Jan 2012, 01:54
by WiZard
The final driver is here.

Posted: Mon 02 Jan 2012, 03:35
by tempestuous
dk60902,
Your private message to me indicated that you are running Puppy 5.2.8,
but it appears you have downloaded a driver dotpet for Puppy 4.1.x ???
Check the title of the forum thread where you obtained that dotpet.

dk60902 wrote:What is the WPA fix for this driver?
It's hard to know what you're referring to ... possibly the configuration tweak I helped muggins to add to his Realtek driver dotpet for Puppy 4.1.x - which enables the Network Wizard (in Puppy 4.1.x) to recognise the new driver ...
... but this has nothing to do with a solution for you.
Your solution is to download and install the relevant driver for your puppy version and kernel version. Start here -
"Drivers for Puppy 5.1-5.2.8 with 2.6.33.2 kernel"
http://www.murga-linux.com/puppy/viewtopic.php?t=59000