On Wed, Dec 14, 2011 at 03:10:09PM +0000, Ben Hutchings wrote: > On Wed, 2011-12-14 at 14:34 +0200, أحمد المحمودي (Ahmed > El-Mahmoudy) wrote: > > On Wed, Dec 14, 2011 at 04:31:24AM +0000, Ben Hutchings wrote: > > > Sorry, no it isn't. You have to test for CONFIG_X86_32 inside of > > > Kbuild, and you can't use uname for this anywhere. > > > > Can you further explain this please ? > > 1. You run 'make' in the drivers directory. > 2. This invokes the kernel build system (Kbuild). > 3. Kbuild includes the Makefile from the drivers directory again. > > Steps 1 and 3 can be distinguished by whether KERNELRELEASE is defined. > At step 3, CONFIG_X86_32 is defined or not, as appropriate. At step 1, > you can't tell. Testing uname is no good because that tells you about > the host kernel and not the target kernel. > > Well, you could include $(KERNEL_DIR)/.config at step 1.
Ok, the reason I did the patch this way is that CONFIG_X86_32 was only defined on kernel >= 2.6.14, so I needed a way to detect the target kernel for kernel < 2.6.14, that is in order to create a patch suitable for upstream. > > > Really, the Makefile needs a thorough cleanup. > > > > Actually, I don't want to remove the 2.4.x kernel support. > > Whyever not? Well, I'm not sure if upstream will accept a patch that removes 2.4.x kernel support, and if upstream doesn't accept it, I'm not willing to maintain such a patch. > Well the USB driver ought to work on any architecture, right? Maybe. But as far as I know, the sl-modem-daemon package (which is what will make use of the driver) would only work on x86 archs because of the binary blob: modem/dsplibs.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7
signature.asc
Description: Digital signature