On Sat, 2011-12-17 at 06:52 +0200, أحمد المحمودي (Ahmed El-Mahmoudy) wrote: > 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.
Hmm, I thought it was older than that. (At work, I look after a module that gets backported as far as 2.6.9 - but no further.) > > > > 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. Oh well, you wouldn't be the first maintainer with a crazy upstream. > > 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 Sorry, I didn't see that dependency. It should have been obvious there was still a blob somewhere. But an x86_64 module and i386 daemon should work, right? (In fact, in theory, it should be possible to use a native module and run the daemon in qemu-i386 on any other architecture. But that's a *really* marginal case.) Ben. -- Ben Hutchings Computers are not intelligent. They only think they are.
signature.asc
Description: This is a digitally signed message part

