[LUCID SRU] UBUNTU: SAUCE: Fixed makefile to correctly link rtllib objects.

manoj.iyer at canonical.com manoj.iyer at canonical.com
Mon May 10 11:45:45 UTC 2010


apw,


The only reason I even bothered to add this driver & firmware to Lucid is 
because, one of the laptops that krafty sent me to enable (Asus 1201N) has 
this device. I only wanted to support the nic on that particular laptop 
which is rev 8171 based, and not worried about anything else. I was also 
under the assumption that once I added it to ubuntu/ we wont upgrade it 
until Maverick, so I took the liberty to make some changes.

Your observations are partially correct. The driver supports multiple 
cards, even, pci cards, wifi cards etc.

I wanted to add support only for rtl8192se (and in particular rev 8171 
based cards). So, I had modified the original tree structure and Makefile 
when I added the module to ubuntu/.

If you look at first rev of the makefile when this module was added to 
ubuntu/, you will see that there are

1. makefile rules to build 8192se only. 
2. you will find that rtl8192s/ directory is under HAL/rtl8192/rtl8192s,

In our kernel tree I changed the tree structure to be ubuntu/rtl8192s, 
requiring a change in the makefile on how rtllib/ is accessed. ie, change 
../../rtllib to rtllib.

So when the upgrade was done to the latest by rtg, he maintained the tree 
structure but did not make the necessary mods to the makefile. Its my 
fault in not documenting this in BOM so that someone other than me can 
upgrade the module (I did not foresee this might happen).

How it builds now without errors even though it is unable to link to 
rtllib objects is a puzzling to me. But the driver *as is* does not work 
on the Asus 1201N laptop, but, when built with the patch I submitted, the 
module works on Asus 1201N.


Cheers
--- manjo

On Fri, 7 May 2010, Andy Whitcroft wrote:

> On Thu, May 06, 2010 at 10:08:56AM -0500, Manoj Iyer wrote:
>>
>> BUGLINK: http://launchpad.net/bugs/576140
>>
>> SRU Justification
>> =================
>> Without this fix this driver is useless, it is incorrectly built and will
>> not function as designed. It will not be able to see or connect to
>> access points.
>>
>> FIX
>> ===
>> A recent upgrade of the driver seems to have broken the master makefile,
>> the rtllib objects were not linked with the driver correctly causing the
>> driver to malfunction.
>>
>> TEST
>> ====
>> The fixed kernel was tested to work on my  Asus EEEPC 1201N. Test kernel
>> is available at:
>> http://people.ubuntu.com/~manjo/rtl8192se/
>>
>> The following changes since commit
>> 7a32a78bbcdc271e6d551b44fafd1d20d97efe00:
>>    Manoj Iyer (1):
>>          UBUNTU: SAUCE: Fixed makefile to correctly link rtllib objects.
>>
>> are available in the git repository at:
>>
>>
>> ssh://zinc.canonical.com/srv/kernel.ubuntu.com/git/manjo/ubuntu-lucid.git
>> lp576140
>>
>> From 7a32a78bbcdc271e6d551b44fafd1d20d97efe00 Mon Sep 17 00:00:00 2001
>> From: Manoj Iyer <manoj.iyer at canonical.com>
>> Date: Thu, 6 May 2010 09:43:44 -0500
>> Subject: [PATCH] UBUNTU: SAUCE: Fixed makefile to correctly link rtllib objects.
>>
>> This driver is not upstream and was obtained from the vendor.
>>
>> Signed-off-by: Manoj Iyer <manoj.iyer at canonical.com>
>> ---
>>   ubuntu/rtl8192se/Makefile |  254 ++++++++++++++++++++++----------------------
>>   1 files changed, 127 insertions(+), 127 deletions(-)
>>
>> diff --git a/ubuntu/rtl8192se/Makefile b/ubuntu/rtl8192se/Makefile
>> index 0f2c735..22f75f8 100755
>> --- a/ubuntu/rtl8192se/Makefile
>> +++ b/ubuntu/rtl8192se/Makefile
>> @@ -205,20 +205,20 @@ r8190_pci-objs := rtl_core.o 		\
>
> This driver supports a number of cards it seems, which ones are on is
> selected by NIC_SELECT which is currently as below:
>
>    NIC_SELECT = RTL8192SE
>
> The following segment you are fixing is under the selector below, and
> seems to be turned off:
>
>    ifeq ($(NIC_SELECT),RTL8190P)
>
>>   		  rtl8192e/r8192E_phy.o 		\
>>   		  rtl8192e/r8192E_firmware.o 	\
>>   		  rtl8192e/r8192E_cmdpkt.o 	\
>> -		  ../../rtllib/rtllib_rx.o                \
>> -		  ../../rtllib/rtllib_softmac.o           \
>> -		  ../../rtllib/rtllib_tx.o                \
>> -		  ../../rtllib/rtllib_wx.o                \
>> -		  ../../rtllib/rtllib_module.o            \
>> -		  ../../rtllib/rtllib_softmac_wx.o        \
>> -		  ../../rtllib/rtl819x_HTProc.o              \
>> -		  ../../rtllib/rtl819x_TSProc.o              \
>> -		  ../../rtllib/rtl819x_BAProc.o              \
>> -		  ../../rtllib/dot11d.o                      \
>> -		  ../../rtllib/rtllib_crypt.o             \
>> -		  ../../rtllib/rtllib_crypt_tkip.o        \
>> -		  ../../rtllib/rtllib_crypt_ccmp.o        \
>> -		  ../../rtllib/rtllib_crypt_wep.o
>> +		  rtllib/rtllib_rx.o                \
>> +		  rtllib/rtllib_softmac.o           \
>> +		  rtllib/rtllib_tx.o                \
>> +		  rtllib/rtllib_wx.o                \
>> +		  rtllib/rtllib_module.o            \
>> +		  rtllib/rtllib_softmac_wx.o        \
>> +		  rtllib/rtl819x_HTProc.o              \
>> +		  rtllib/rtl819x_TSProc.o              \
>> +		  rtllib/rtl819x_BAProc.o              \
>> +		  rtllib/dot11d.o                      \
>> +		  rtllib/rtllib_crypt.o             \
>> +		  rtllib/rtllib_crypt_tkip.o        \
>> +		  rtllib/rtllib_crypt_ccmp.o        \
>> +		  rtllib/rtllib_crypt_wep.o
>>
>>   obj-m := r8190_pci.o
>>   endif
>> @@ -314,20 +314,20 @@ r8192ce_pci-objs := rtl_core.o 		\
>>   		  rtl8192c/r8192C_led.o 	\
>>   		  rtl8192c/r8192C_com.o 	\
>>   		  rtl8192c/r8192C_PhyParam.o 	\
>
> Again this bit seems to be under the selector below and also disabled:
>
>    ifeq ($(NIC_SELECT),RTL8192CE)
>
>> -		  ../../rtllib/rtllib_rx.o                \
>> -		  ../../rtllib/rtllib_softmac.o           \
>> -		  ../../rtllib/rtllib_tx.o                \
>> -		  ../../rtllib/rtllib_wx.o                \
>> -		  ../../rtllib/rtllib_module.o            \
>> -		  ../../rtllib/rtllib_softmac_wx.o        \
>> -		  ../../rtllib/rtl819x_HTProc.o              \
>> -		  ../../rtllib/rtl819x_TSProc.o              \
>> -		  ../../rtllib/rtl819x_BAProc.o              \
>> -		  ../../rtllib/dot11d.o                      \
>> -		  ../../rtllib/rtllib_crypt.o             \
>> -		  ../../rtllib/rtllib_crypt_tkip.o        \
>> -		  ../../rtllib/rtllib_crypt_ccmp.o        \
>> -		  ../../rtllib/rtllib_crypt_wep.o
>> +		  rtllib/rtllib_rx.o                \
>> +		  rtllib/rtllib_softmac.o           \
>> +		  rtllib/rtllib_tx.o                \
>> +		  rtllib/rtllib_wx.o                \
>> +		  rtllib/rtllib_module.o            \
>> +		  rtllib/rtllib_softmac_wx.o        \
>> +		  rtllib/rtl819x_HTProc.o              \
>> +		  rtllib/rtl819x_TSProc.o              \
>> +		  rtllib/rtl819x_BAProc.o              \
>> +		  rtllib/dot11d.o                      \
>> +		  rtllib/rtllib_crypt.o             \
>> +		  rtllib/rtllib_crypt_tkip.o        \
>> +		  rtllib/rtllib_crypt_ccmp.o        \
>> +		  rtllib/rtllib_crypt_wep.o
>>   obj-m := r8192ce_pci.o
>>   endif
>>
>> @@ -353,20 +353,20 @@ r8192se_pci_mesh-objs := rtl_core.o 	\
>>   		  rtl8192s/r8192S_led.o 	\
>>   		  rtl8192s/r8192S_mp.o		\
>>   		  rtl8192s/r8192S_scan.o		\
>
> This bit seems to be under the following selector and disabled:
>
>    ifeq ($(NIC_SELECT),RTL8191SE_MESH)
>
>> -		  ../../rtllib/rtllib_rx.o                \
>> -		  ../../rtllib/rtllib_softmac.o           \
>> -		  ../../rtllib/rtllib_tx.o                \
>> -		  ../../rtllib/rtllib_wx.o                \
>> -		  ../../rtllib/rtllib_module.o            \
>> -		  ../../rtllib/rtllib_softmac_wx.o        \
>> -		  ../../rtllib/rtl819x_HTProc.o           \
>> -		  ../../rtllib/rtl819x_TSProc.o           \
>> -		  ../../rtllib/rtl819x_BAProc.o           \
>> -		  ../../rtllib/dot11d.o                   \
>> -		  ../../rtllib/rtllib_crypt.o             \
>> -		  ../../rtllib/rtllib_crypt_tkip.o        \
>> -		  ../../rtllib/rtllib_crypt_ccmp.o        \
>> -		  ../../rtllib/rtllib_crypt_wep.o	  \
>> +		  rtllib/rtllib_rx.o                \
>> +		  rtllib/rtllib_softmac.o           \
>> +		  rtllib/rtllib_tx.o                \
>> +		  rtllib/rtllib_wx.o                \
>> +		  rtllib/rtllib_module.o            \
>> +		  rtllib/rtllib_softmac_wx.o        \
>> +		  rtllib/rtl819x_HTProc.o           \
>> +		  rtllib/rtl819x_TSProc.o           \
>> +		  rtllib/rtl819x_BAProc.o           \
>> +		  rtllib/dot11d.o                   \
>> +		  rtllib/rtllib_crypt.o             \
>> +		  rtllib/rtllib_crypt_tkip.o        \
>> +		  rtllib/rtllib_crypt_ccmp.o        \
>> +		  rtllib/rtllib_crypt_wep.o	  \
>>   		  ../../mshclass/msh_class.o 		  \
>>   		  ../../mshclass/mesh_8192_util.o  	  \
>>   		  ../../mshclass/rtl8192_mesh.o 	  \
>> @@ -569,29 +569,29 @@ r8190_pci.o: \
>>   	rtl8192e/r8192E_cmdpkt.o\
>>   	rtl8192e/r8192E_firmware.o \
>>   	rtl8192e/r8192E_phy.o \
>
> This bit seems to be under the selector below and disabled:
>
>    ifeq ($(NIC_SELECT),RTL8190P)
>
>> -	../../rtllib/rtllib_rx.o                \
>> -	../../rtllib/rtllib_softmac.o           \
>> -	../../rtllib/rtllib_tx.o                \
>> -	../../rtllib/rtllib_wx.o                \
>> -	../../rtllib/rtllib_module.o            \
>> -	../../rtllib/rtllib_softmac_wx.o        \
>> -	../../rtllib/rtl819x_HTProc.o              \
>> -	../../rtllib/rtl819x_TSProc.o              \
>> -	../../rtllib/rtl819x_BAProc.o              \
>> -	../../rtllib/dot11d.o                      \
>> -	../../rtllib/rtllib_crypt.o             \
>> -	../../rtllib/rtllib_crypt_tkip.o        \
>> -	../../rtllib/rtllib_crypt_ccmp.o        \
>> -	../../rtllib/rtllib_crypt_wep.o	\
>> -	../../rtllib/api.o			\
>> -	../../rtllib/compress.o		\
>> -	../../rtllib/digest.o		\
>> -	../../rtllib/cipher.o		\
>> -	../../rtllib/scatterwalk.o		\
>> -	../../rtllib/arc4.o			\
>> -	../../rtllib/michael_mic.o		\
>> -	../../rtllib/aes.o			\
>> -	../../rtllib/proc.o
>> +	rtllib/rtllib_rx.o                \
>> +	rtllib/rtllib_softmac.o           \
>> +	rtllib/rtllib_tx.o                \
>> +	rtllib/rtllib_wx.o                \
>> +	rtllib/rtllib_module.o            \
>> +	rtllib/rtllib_softmac_wx.o        \
>> +	rtllib/rtl819x_HTProc.o              \
>> +	rtllib/rtl819x_TSProc.o              \
>> +	rtllib/rtl819x_BAProc.o              \
>> +	rtllib/dot11d.o                      \
>> +	rtllib/rtllib_crypt.o             \
>> +	rtllib/rtllib_crypt_tkip.o        \
>> +	rtllib/rtllib_crypt_ccmp.o        \
>> +	rtllib/rtllib_crypt_wep.o	\
>> +	rtllib/api.o			\
>> +	rtllib/compress.o		\
>> +	rtllib/digest.o		\
>> +	rtllib/cipher.o		\
>> +	rtllib/scatterwalk.o		\
>> +	rtllib/arc4.o			\
>> +	rtllib/michael_mic.o		\
>> +	rtllib/aes.o			\
>> +	rtllib/proc.o
>>
>>   	$(LD) -r $^ -o $@
>>   install:r8190_pci.o
>> @@ -620,29 +620,29 @@ r8192e_pci.o: \
>>   	rtl8192e/r8192E_cmdpkt.o\
>>   	rtl8192e/r8192E_firmware.o \
>>   	rtl8192e/r8192E_phy.o \
>
> This section seems to be under the selector below and disabled:
>
>    ifeq ($(NIC_SELECT),RTL8192E)
>
>> -	../../rtllib/rtllib_rx.o                \
>> -	../../rtllib/rtllib_softmac.o           \
>> -	../../rtllib/rtllib_tx.o                \
>> -	../../rtllib/rtllib_wx.o                \
>> -	../../rtllib/rtllib_module.o            \
>> -	../../rtllib/rtllib_softmac_wx.o        \
>> -	../../rtllib/rtl819x_HTProc.o              \
>> -	../../rtllib/rtl819x_TSProc.o              \
>> -	../../rtllib/rtl819x_BAProc.o              \
>> -	../../rtllib/dot11d.o                      \
>> -	../../rtllib/rtllib_crypt.o             \
>> -	../../rtllib/rtllib_crypt_tkip.o        \
>> -	../../rtllib/rtllib_crypt_ccmp.o        \
>> -	../../rtllib/rtllib_crypt_wep.o	\
>> -	../../rtllib/api.o			\
>> -	../../rtllib/compress.o		\
>> -	../../rtllib/digest.o		\
>> -	../../rtllib/cipher.o		\
>> -	../../rtllib/scatterwalk.o		\
>> -	../../rtllib/arc4.o			\
>> -	../../rtllib/michael_mic.o		\
>> -	../../rtllib/aes.o			\
>> -	../../rtllib/proc.o
>> +	rtllib/rtllib_rx.o                \
>> +	rtllib/rtllib_softmac.o           \
>> +	rtllib/rtllib_tx.o                \
>> +	rtllib/rtllib_wx.o                \
>> +	rtllib/rtllib_module.o            \
>> +	rtllib/rtllib_softmac_wx.o        \
>> +	rtllib/rtl819x_HTProc.o              \
>> +	rtllib/rtl819x_TSProc.o              \
>> +	rtllib/rtl819x_BAProc.o              \
>> +	rtllib/dot11d.o                      \
>> +	rtllib/rtllib_crypt.o             \
>> +	rtllib/rtllib_crypt_tkip.o        \
>> +	rtllib/rtllib_crypt_ccmp.o        \
>> +	rtllib/rtllib_crypt_wep.o	\
>> +	rtllib/api.o			\
>> +	rtllib/compress.o		\
>> +	rtllib/digest.o		\
>> +	rtllib/cipher.o		\
>> +	rtllib/scatterwalk.o		\
>> +	rtllib/arc4.o			\
>> +	rtllib/michael_mic.o		\
>> +	rtllib/aes.o			\
>> +	rtllib/proc.o
>>
>>   	$(LD) -r $^ -o $@
>>   install:
>> @@ -671,31 +671,31 @@ r8192se_pci.o: rtl_core.o \
>>   	rtl8192s/r8192S_led.o \
>>   	rtl8192s/r8192S_phy.o \
>>   	rtl8192s/r8192S_rtl6052.o \
>
> This section seems to be under the following selector and may well be
> needed:
>
>    ifeq ($(NIC_SELECT),RTL8192SE)
>
>> -	../../rtllib/rtllib_rx.o                \
>> -	../../rtllib/rtllib_softmac.o           \
>> -	../../rtllib/rtllib_tx.o                \
>> -	../../rtllib/rtllib_wx.o                \
>> -	../../rtllib/rtllib_module.o            \
>> -	../../rtllib/rtllib_softmac_wx.o        \
>> -	../../rtllib/rtl819x_HTProc.o              \
>> -	../../rtllib/rtl819x_TSProc.o              \
>> -	../../rtllib/rtl819x_BAProc.o              \
>> -	../../rtllib/dot11d.o                      \
>> -	../../rtllib/rtllib_crypt.o             \
>> -	../../rtllib/rtllib_crypt_tkip.o        \
>> -	../../rtllib/rtllib_crypt_ccmp.o        \
>> -	../../rtllib/rtllib_crypt_wep.o	\
>> -	../../rtllib/api.o			\
>> -	../../rtllib/compress.o		\
>> -	../../rtllib/digest.o		\
>> -	../../rtllib/cipher.o		\
>> -	../../rtllib/scatterwalk.o		\
>> -	../../rtllib/arc4.o			\
>> -	../../rtllib/michael_mic.o		\
>> -	../../rtllib/aes.o			\
>> -	../../rtllib/proc.o			\
>> -	../../rtllib/wapi.o			\
>> -	../../rtllib/wapi_interface.o
>> +	rtllib/rtllib_rx.o                \
>> +	rtllib/rtllib_softmac.o           \
>> +	rtllib/rtllib_tx.o                \
>> +	rtllib/rtllib_wx.o                \
>> +	rtllib/rtllib_module.o            \
>> +	rtllib/rtllib_softmac_wx.o        \
>> +	rtllib/rtl819x_HTProc.o              \
>> +	rtllib/rtl819x_TSProc.o              \
>> +	rtllib/rtl819x_BAProc.o              \
>> +	rtllib/dot11d.o                      \
>> +	rtllib/rtllib_crypt.o             \
>> +	rtllib/rtllib_crypt_tkip.o        \
>> +	rtllib/rtllib_crypt_ccmp.o        \
>> +	rtllib/rtllib_crypt_wep.o	\
>> +	rtllib/api.o			\
>> +	rtllib/compress.o		\
>> +	rtllib/digest.o		\
>> +	rtllib/cipher.o		\
>> +	rtllib/scatterwalk.o		\
>> +	rtllib/arc4.o			\
>> +	rtllib/michael_mic.o		\
>> +	rtllib/aes.o			\
>> +	rtllib/proc.o			\
>> +	rtllib/wapi.o			\
>> +	rtllib/wapi_interface.o
>>   #	rtl8192e/r8192E_cmdpkt.o
>>   #	rtl8192e/r8190P_rtl8256.o
>>   	$(LD) -r $^ -o $@
>> @@ -727,20 +727,20 @@ r8192se_pci_mesh.o: 		\
>>   	rtl8192s/r8192S_led.o 		\
>>   	rtl8192s/r8192S_phy.o 		\
>>   	rtl8192s/r8192S_rtl6052.o 	\
>
> This section is under the selector below and seems disabled:
>
>    ifeq ($(NIC_SELECT),RTL8191SE_MESH )
>
>> -	../../rtllib/rtllib_rx.o                \
>> -	../../rtllib/rtllib_softmac.o           \
>> -	../../rtllib/rtllib_tx.o                \
>> -	../../rtllib/rtllib_wx.o                \
>> -	../../rtllib/rtllib_module.o            \
>> -	../../rtllib/rtllib_softmac_wx.o        \
>> -	../../rtllib/rtl819x_HTProc.o              \
>> -	../../rtllib/rtl819x_TSProc.o              \
>> -	../../rtllib/rtl819x_BAProc.o              \
>> -	../../rtllib/dot11d.o                      \
>> -	../../rtllib/rtllib_crypt.o             \
>> -	../../rtllib/rtllib_crypt_tkip.o        \
>> -	../../rtllib/rtllib_crypt_ccmp.o        \
>> -	../../rtllib/rtllib_crypt_wep.o		\
>> +	rtllib/rtllib_rx.o                \
>> +	rtllib/rtllib_softmac.o           \
>> +	rtllib/rtllib_tx.o                \
>> +	rtllib/rtllib_wx.o                \
>> +	rtllib/rtllib_module.o            \
>> +	rtllib/rtllib_softmac_wx.o        \
>> +	rtllib/rtl819x_HTProc.o              \
>> +	rtllib/rtl819x_TSProc.o              \
>> +	rtllib/rtl819x_BAProc.o              \
>> +	rtllib/dot11d.o                      \
>> +	rtllib/rtllib_crypt.o             \
>> +	rtllib/rtllib_crypt_tkip.o        \
>> +	rtllib/rtllib_crypt_ccmp.o        \
>> +	rtllib/rtllib_crypt_wep.o		\
>>   	../../mshclass/msh_class.o 			\
>>   	../../mshclass/mesh_8192_util.o  		\
>>   	../../mshclass/rtl8192_mesh.o 			\
>
> So of the bits you want to change only one seems possible to be
> triggered.  Also if we look at the top of the Makefile then it seems
> this is supporting two different build methods.  At the top we have a
> set of per NIC stanzas surrounded by:
>
>    ifeq ($(shell uname -r|cut -d. -f1,2), 2.6)
>    ...
>    endif
>
> Within which we have a section per NIC, in the 2.6 Kbuild format, and
> for the one NIC we have enabled these filenames already seem fixed:
>
>    ifeq ($(NIC_SELECT),RTL8192SE)
>    r8192se_pci-objs := rtl_core.o          \
>                      rtl_regd.o            \
>    [...]
>                      rtllib/rtllib_rx.o                \
>
> So I do not think we are even using the stanzas you are modifying which
> appear to be for out of tree build use when running Make by hand in that
> specific directory.
>
> I would also say that the driver as it is has built correctly in the
> archive and if those .o filenames were wrong there it would error to my
> eye, and we do have positive testing results from the reporter on it.
>
> Seems unnessary to me.  Confused.
>
> -apw
>




More information about the kernel-team mailing list