lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <8d6898730905210747j4365e971vd16493c4bb9be167@mail.gmail.com>
Date:	Thu, 21 May 2009 20:17:04 +0530
From:	Nobin Mathew <nobin.mathew@...il.com>
To:	linux-kernel@...r.kernel.org,
	Kernel Newbies <kernelnewbies@...linux.org>
Subject: Fwd: problem with external module Makefile linux kernel 2.6

Hi,


I am having a strange problem with external module Makefile, with
wildcard and patsubst it is giving issue. but without those it is
working fine.



See the logs for further info. I serached in google, any idea why this
happens. if this is a known issue (or wrong coding) send me a link
expalining why this is happening.



I can see wildcard and patsubst used in core KBUILD Makefiles



[root@...L5U3-DL580G4 new]# ls

Makefile  sdirac1.c  sdirac1.h  sdirac2.c  sdirac2.h  sdirac3.c  sdirac3.h

[root@...L5U3-DL580G4 new]# cat Makefile

obj-m := dirac.o

dirac-objs = $(patsubst %.c,%.ko,$(wildcard , *.c))

#dirac-objs = sdirac1.o sdirac2.o sdirac3.o



KDIR := /lib/modules/$(shell uname -r)/build





all:

        echo $(dirac-objs)

        make -C $(KDIR) M=`pwd` modules

[root@...L5U3-DL580G4 new]# make

echo sdirac1.ko sdirac2.ko sdirac3.ko

sdirac1.ko sdirac2.ko sdirac3.ko

make -C /lib/modules/2.6.18-128.el5PAE/build M=`pwd` modules

make[1]: Entering directory `/usr/src/kernels/2.6.18-128.el5-PAE-i686'

make[2]: *** No rule to make target `/root/Desktop/new/dirac.c',
needed by `/root/Desktop/new/dirac.o'.  Stop.

make[1]: *** [_module_/root/Desktop/new] Error 2

make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.el5-PAE-i686'

make: *** [all] Error 2

[root@...L5U3-DL580G4 new]# vim Makefile

####I changed the Makefile Here ######

[root@...L5U3-DL580G4 new]# cat Makefile

obj-m := dirac.o

#dirac-objs = $(patsubst %.c,%.ko,$(wildcard , *.c))

dirac-objs = sdirac1.o sdirac2.o sdirac3.o



KDIR := /lib/modules/$(shell uname -r)/build





all:

        echo $(dirac-objs)

        make -C $(KDIR) M=`pwd` modules

[root@...L5U3-DL580G4 new]# make

echo sdirac1.o sdirac2.o sdirac3.o

sdirac1.o sdirac2.o sdirac3.o

make -C /lib/modules/2.6.18-128.el5PAE/build M=`pwd` modules

make[1]: Entering directory `/usr/src/kernels/2.6.18-128.el5-PAE-i686'

  CC [M]  /root/Desktop/new/sdirac1.o

  CC [M]  /root/Desktop/new/sdirac2.o

  CC [M]  /root/Desktop/new/sdirac3.o

  LD [M]  /root/Desktop/new/dirac.o

  Building modules, stage 2.

  MODPOST

  CC      /root/Desktop/new/dirac.mod.o

  LD [M]  /root/Desktop/new/dirac.ko

make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.el5-PAE-i686'

[root@...L5U3-DL580G4 new]# ls

dirac.ko     dirac.mod.o  Makefile        Module.symvers  sdirac1.h
sdirac2.c  sdirac2.o  sdirac3.h

dirac.mod.c  dirac.o      Module.markers  sdirac1.c       sdirac1.o
sdirac2.h  sdirac3.c  sdirac3.o

[root@...L5U3-DL580G4 new]#



Thanks

Nobin Mathew.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ