Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: SamK on September 09, 2010, 03:28:26 AM

Title: Questions about Network Adaptor Support
Post by: SamK on September 09, 2010, 03:28:26 AM
TC is becoming well known as natively supporting a wide range of network adaptors. This type of out-of-the-box functionality is one of the strengths of TC as it is very user friendly.

How is it decided which adaptors/chipsets are supported?  Is it by request or some other mechanism?

I have a USB adaptor based on rtl8192  which is working well using ndiswrapper and the WinXP driver. Is this in line for native support?
   
Title: Re: Questions about Network Adaptor Support
Post by: curaga on September 09, 2010, 03:50:59 AM
Everything stable in the kernel is supported.
Title: Re: Questions about Network Adaptor Support
Post by: SamK on September 09, 2010, 04:14:39 AM
Everything stable in the kernel is supported.
Please will you clarify this a little as I am unclear what you mean?

Is the rtl8192 currently regarded as unstable?  Is there a central reference available of stable rtl devices?
 
Title: Re: Questions about Network Adaptor Support
Post by: curaga on September 09, 2010, 04:28:28 AM
http://kernel.xc.net/index.cgi?version=2.6.33&arch=x86

Everything under the staging menu is considered unstable. The three 8192 (su,e,u) drivers are there, I'm afraid.

edit: This seems to be still the case in 2.6.35.
Title: Re: Questions about Network Adaptor Support
Post by: SamK on September 09, 2010, 04:40:39 AM
http://kernel.xc.net/index.cgi?version=2.6.33&arch=x86

Everything under the staging menu is considered unstable. The three 8192 (su,e,u) drivers are there, I'm afraid.

edit: This seems to be still the case in 2.6.35.
Thanks for that - this is a completely new area for me - no experience of it at all.

I realize that you cannot supply a definitive answer to this, however, it it usual that the drivers from this list (in this case 3 x 8192) in due course become stable?  If so, when the TC kernel is updated is an announcement made of the added drivers?
 
Title: Re: Questions about Network Adaptor Support
Post by: curaga on September 09, 2010, 07:58:19 AM
When they are stable enough, they will be moved out of the staging area.

TC kernel updates are usually only once per major version.
Title: Re: Questions about Network Adaptor Support
Post by: tinypoodle on September 09, 2010, 08:57:49 AM
This would rather be for the request thread, but an idea would be that someone could build all staging wireless drivers, for a wireless-staging-*.tcz.
From what it appears, wireless drivers from the staging tree are relatively widely used by end users.
Title: Re: Questions about Network Adaptor Support
Post by: curaga on September 09, 2010, 09:00:17 AM
They also tend to drop connections, oops, crash, and otherwise be much worse than even ndiswrapper :P
Title: Re: Questions about Network Adaptor Support
Post by: tinypoodle on September 09, 2010, 10:08:36 AM
Yes, it is a choice of the lesser of evils, but I would always prefer to at least give a native driver under development a try, before having to resort to ndiswrapper.

OTOH i have experienced dropping of connections even with a driver which is in stable kernel branch, but not since very long (rt2500usb)
Title: Re: Questions about Network Adaptor Support
Post by: SamK on September 12, 2010, 04:40:00 AM
Is there a command in TC3 that will list the kernel supported drivers/chipsets?  If so it will be useful as a reference when considering a purchase.
 
Title: Re: Questions about Network Adaptor Support
Post by: curaga on September 12, 2010, 04:58:53 AM
Drivers (wired): ls /lib/modules/*/kernel/drivers/net -R
Drivers (wireless): the .list file of the wireless-2.6xx extension

Pci ids recognized by each driver can be seen in /lib/modules/*/modules.usbmap and modules.pcimap.
For wireless ids to appear there the extension has to be loaded.
Title: Re: Questions about Network Adaptor Support
Post by: SamK on September 12, 2010, 05:17:23 AM
Thanks.
Title: Re: Questions about Network Adaptor Support
Post by: SamK on September 19, 2010, 05:54:47 AM
Reporting success.

After a few days break, I decided to return to attempting to compile the driver for this device and have finally achieved it.  What follows is partly a memory jogger for me and partly an assist for other TC users.

From the Realtek web site I downloaded the most recent sources I could find:
RTL8192SU_usb_linux_v2.6.0006.20100625.zip.
From the zip file it seems this provides a driver that is suitable for:
rtl8712, rtl8188, rtl8191, and rtl8192SU devices.

Following a suggestion on #tinycorelinux (thanks jls_legalize) the driver compiled and produced 8712u.ko, which I then compressed to 8712u.ko.gz and turned into an extension:
rtl8712u-2.6.33.3-tinycore.tcz
This places the module in the same path as those in wireless-2.6.33.3-tinycore.tcz and is listed in OnBoot.

The result seems to work well.  No dropped connections no crashes.  Connection to a router using a 40Mhz frequency, N standard data rate, WPA2 security and 100% signal strength, all give dependable consistent results.
 
Title: Re: Questions about Network Adaptor Support
Post by: JackBug on January 15, 2011, 01:49:26 AM
SamK,
 
 EXACTLY what steps did you take to compile the driver?

When I try to "make", I get the error  /lib/modules/2.6.33.3-tinycore/build - no such file or directory

I cannot find any build file or directory under /lib/modules/2.6.33.3-tinycore or any where on the system

ANY help appreciated.

Regards.
Title: Re: Questions about Network Adaptor Support
Post by: Juanito on January 15, 2011, 05:18:47 AM
When I try to "make", I get the error  /lib/modules/2.6.33.3-tinycore/build - no such file or directory

I'd guess this would be taken care of by loading the linux-headers-2.6.33.3-tinycore extension.

If not, you'll need to unpack the kernel source somewhere and make a symlink /lib/modules/2.6.33.3-tinycore/build that points to it.
Title: Re: Questions about Network Adaptor Support
Post by: SamK on January 15, 2011, 05:24:17 AM
When I try to "make", I get the error  /lib/modules/2.6.33.3-tinycore/build - no such file or directory

I'd guess this would be taken care of by loading the linux-headers-2.6.33.3-tinycore extension.
...
Yes, that extension was loaded when building and a symlink was not used.
   
Title: Re: Questions about Network Adaptor Support
Post by: JackBug on January 15, 2011, 10:15:21 PM
OK, I've installed the linux-headers-2.6.33.3-tinycore extension and been able to successfully create a driver, 8712u.ko

Now, how do I install it and make it permanent after a reboot?

Regards.

PS.  Thank you for your help so far, SamK and Juanito.
I'm new to Tinycore and there is a lot to learn compared to the bigger Linux packages.
Title: Re: Questions about Network Adaptor Support
Post by: Juanito on January 15, 2011, 10:38:41 PM
Probably the best thing to do is to make an extension out of the driver.

If you have a look at the file listing for wireless-2.6.33.3-tinycore, you can see where to put your driver and the wiki section on making extensions should help in making the extension.

Note you can also gzip the module to save some space
Title: Re: Questions about Network Adaptor Support
Post by: SamK on January 16, 2011, 03:51:14 AM
OK, I've installed the linux-headers-2.6.33.3-tinycore extension and been able to successfully create a driver, 8712u.ko

Now, how do I install it and make it permanent after a reboot?

Regards.

PS.  Thank you for your help so far, SamK and Juanito.
I'm new to Tinycore and there is a lot to learn compared to the bigger Linux packages.


Probably the best thing to do is to make an extension out of the driver.

If you have a look at the file listing for wireless-2.6.33.3-tinycore, you can see where to put your driver and the wiki section on making extensions should help in making the extension.

Note you can also gzip the module to save some space
It is a concise description of what I did.

In a slightly more detailed form for a new user...

Reduce the Size of the Module
gzip -f rtl8712u.ko

Create a Private Extension
Install squashfs-tools-4.x.tcz from the repo  

Staying close to the description in the wiki...
Create /tmp/package/usr/local/lib/modules/2.6.33.3-tinycore/kernel/drivers/net/wireless/rtl8712u.ko.gz

Produce the extension
cd /tmp
mksquashfs  package   rtl8712u-2.6.33.3-tinycore.tcz

Optional Steps
Create a list of the files in the .tcz
cd /tmp/package
find usr -not -type d > rtl8712u-2.6.33.3-tinycore.tcz.list

Manually create a list of dependencies
Create a text file rtl8712u-2.6.33.3-tinycore.tcz.dep
Edit it to list the dependencies (none required)

Manually create an information file
Create a text file rtl8712u-2.6.33.3-tinycore.tcz.info
Edit it following the format of an existing info file in the repo

Start Extension at Boot-up  
Place rtl8712u-2.6.33.3-tinycore.tcz in /tce/optional

Add it to the list of apps started a boot-up using AppsAudit
AppsAudit->OnBoot->Maintenance
In the left-hand panel select rtl8712u-2.6.33.3-tinycore.tcz

Save the change
OnBoot->Exit OnBoot
  
Title: Re: Questions about Network Adaptor Support
Post by: Juanito on January 16, 2011, 05:00:18 AM
Produce the extension
cd /tmp
mksquashfs package rtl8712u-2.6.33.3-tinycore.tcz

..should maybe be:
Code: [Select]
# mksquashfs package/ rtl8712u-2.6.33.3-tinycore.tcz
Nevertheless, very good description of what to do  :)
Title: Re: Questions about Network Adaptor Support
Post by: SamK on January 16, 2011, 08:14:23 AM
Produce the extension
cd /tmp
mksquashfs package rtl8712u-2.6.33.3-tinycore.tcz

..should maybe be:
Code: [Select]
# mksquashfs package/ rtl8712u-2.6.33.3-tinycore.tcz
Nevertheless, very good description of what to do  :)
I defer to greater knowledge and experience.  The command is taken directly from the wiki, which is my primary source of information on this.  It does seem to work.
Title: Re: Questions about Network Adaptor Support
Post by: JackBug on January 17, 2011, 03:37:34 AM
Thanks Juanito and SamK. I am now up and running with the new driver.

I did do as Juanito suggested to make an extension by following the wiki, but was at a loss as how to load it at boot time.
SamK's step by step guide confirmed what I was doing was along the right path and his instruction to copy to /tce/options and use AppsAudit to load it boot time made it all a success.

Thanks again fellows.

Regards.   
Title: Re: Questions about Network Adaptor Support
Post by: coreplayer2 on June 23, 2011, 07:18:27 PM
I must be really green because this explanation went clean over my head!!

Quote
Staying close to the description in the wiki...
Create /tmp/package/usr/local/lib/modules/2.6.33.3-tinycore/kernel/drivers/net/wireless/rtl8712u.ko.gz

possibly = make all the above directories one at a time then place the driver in the last one??


otherwise the remaining steps are easy to follow thanks :)
Title: Re: Questions about Network Adaptor Support
Post by: Rich on June 23, 2011, 07:33:51 PM
Hi coreplayer2

If you use  mkdir -p  you can do it all in one step.

Code: [Select]
mkdir -p /tmp/package/usr/local/lib/modules/2.6.33.3-tinycore/kernel/drivers/net/wireless
Title: Re: Questions about Network Adaptor Support
Post by: coreplayer2 on June 23, 2011, 07:38:10 PM
wow I didn't know that!!  :)

thanks

pity I just made them all one at a time phew am worn out now!


I'm assuming this path is the intended destination for the driver making it a simple copy of the file to this location in the file system during loading?
Title: Re: Questions about Network Adaptor Support
Post by: maro on June 23, 2011, 09:47:13 PM
I'm assuming this path is the intended destination for the driver making it a simple copy of the file to this location in the file system during loading?

Well, the "intended" (final) directory (i.e. after the installation of the extensions) is '/usr/local/lib/modules/2.6.33.3-tinycore/kernel/drivers/net/wireless'. Due to the 'cd /tmp' and 'mksquashfs package ...' commands this directory will then be created in the root of the SquashFS (AKA: "squashfs-root") as '/usr/local/lib/...'.

If that is what you assumed then the answer is: YES!!
Title: Re: Questions about Network Adaptor Support
Post by: coreplayer2 on June 23, 2011, 09:57:20 PM
Thanks to SamK, Rich and maro for the learning :)