linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* modules out of tree issue
@ 2015-04-16  9:41 Hänel-Baas, Alexander
  2015-04-16 11:25 ` Lucas De Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-16  9:41 UTC (permalink / raw)
  To: linux-modules

Hi,

I cross compile my own kernelmodule out of tree.
Now I changed the kernel to 3.18.1 and when I compile my own module I get the error:
-ld: no input files

The first call is the ld and not the compiler. This is the problem.

With kernel 3.14 and older always compiled good.

Is there any changes in the kernel makefile to build the kernel out of tree?
Any ideas?

I'm not sure is this the right group, sorry.

With best regards,
Alexander H�nel-Baas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: modules out of tree issue
  2015-04-16  9:41 modules out of tree issue Hänel-Baas, Alexander
@ 2015-04-16 11:25 ` Lucas De Marchi
  2015-04-16 12:27   ` AW: " Hänel-Baas, Alexander
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas De Marchi @ 2015-04-16 11:25 UTC (permalink / raw)
  To: Hänel-Baas, Alexander; +Cc: linux-modules, lkml

Hi,

On Thu, Apr 16, 2015 at 6:41 AM, H=C3=A4nel-Baas, Alexander
<alexander.haenel-baas@sieb-meyer.de> wrote:
> Hi,
>
> I cross compile my own kernelmodule out of tree.
> Now I changed the kernel to 3.18.1 and when I compile my own module I get=
 the error:
> -ld: no input files

could you share your makefile? otherwise it's difficult to say what's happe=
ning.


> The first call is the ld and not the compiler. This is the problem.
>
> With kernel 3.14 and older always compiled good.
>
> Is there any changes in the kernel makefile to build the kernel out of tr=
ee?

Not that I'm aware of.  I compile out-of-tree modules just fine. See
https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/tree/testsuite/modul=
e-playground/Makefile
for an example.


> Any ideas?
>
> I'm not sure is this the right group, sorry.

You probably should CC lkml as well. Doing it now.


--=20
Lucas De Marchi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: modules out of tree issue
  2015-04-16 11:25 ` Lucas De Marchi
@ 2015-04-16 12:27   ` Hänel-Baas, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-16 12:27 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-modules

SGkgTHVjYXMsDQoNCnRoYW5rIHlvdSBmb3IgeW91ciBhbnN3ZXIuDQoNCmhlcmUgbXkgbWFrZSBm
aWxlOg0KKG9yZSBpcyBhbiBhdHRhY2htZW50IGJldHRlciBoZXJlPykNCg0KI015IGVudmlyb25t
ZW50IHZhcmlhYmxlcyANCkczX0tFUk5FTF9OQU1FPTMuMTQuMTcgIzwtLSB3b3Jrcw0KRzNfS0VS
TkVMX05BTUU9My4xOC4xICAjPC0tIHdvcmtzIG5vdA0KDQpHM19BQ1RfQlNQX1BBVEg9L29wdC9n
M0RldmVsQmFzZS9nM1Rvb2xjaGFpbi9nM0JzcC9zZDNYZW5vQXJtSW14LkJzcC5WMg0KRzNfUExB
VEZPUk1fTkFNRT1zbS1hcm0NCkczX1RBUkdFVF9TWVM9JHtHM19BQ1RfQlNQX1BBVEh9L3NlbGVj
dGVkX3Rvb2xjaGFpbi9hcm0tdjdhLWxpbnV4LWdudWVhYmkNCg0KT1VUUFVUX0RJUiA9IG91dA0K
I1NvdXJjZQ0KU09VUkNFX0RJUiA9IGludGVybmFsL3NyYw0KU09VUkNFUyA9ICR7U09VUkNFX0RJ
Un0vc20zNjUwMl91aW8ubyANCg0KI0tlcm5lbHZlcnNpb24NClRBUkdFVF9LRVJORUxfVkVSU0lP
Tj0ke0czX0tFUk5FTF9OQU1FfQ0KDQojS2VybmVsIE1vZHVsIE5hbWUgDQpLTU9EVUxfT0JKPWcz
a18zNjUwMg0KDQojS2VybmVsU1JDDQpUQVJHRVRfS0VSTkVMX1NSQz0ke0czX0FDVF9CU1BfUEFU
SH0vcGxhdGZvcm0tJHtHM19QTEFURk9STV9OQU1FfS9idWlsZC10YXJnZXQvbGludXgtJHtHM19L
RVJORUxfTkFNRX0NCg0Kb2JqLW0gOj0gICR7T1VUUFVUX0RJUn0vJHtLTU9EVUxfT0JKfS5vDQok
e09VVFBVVF9ESVJ9LyR7S01PRFVMX09CSn0tb2JqcyA6PSAke1NPVVJDRVN9DQogDQphbGw6DQoJ
bWFrZSAgQVJDSD1hcm0gQ1JPU1NfQ09NUElMRT0ke0czX1RBUkdFVF9TWVN9LSAtQyAke1RBUkdF
VF9LRVJORUxfU1JDfSBNPSQkUFdEICBtb2R1bGVzDQogICANCmNsZWFuOg0KCW1ha2UgLUMgJHtU
QVJHRVRfS0VSTkVMX1NSQ30gTT0kKFBXRCkgY2xlYW4NCgkNCg0KSSBjaGFuZ2Ugb25seSB0aGUg
a2VybmVsIHRyZWUgZnJvbSAzLjE0IHRvIDMuMTguIEJvdGhlIGFyZSBpbnN0YWxsZWQgdW5kZXIg
bXkgVEFSR0VUX0tFUk5FTF9TUkMuDQpVbmRlciAzLjE0IHdhcyBvbmx5IHRoZSBsaW5rZXIgYWN0
aXZlIGFuZCBzYXk6IG5vIGlucHV0ZmlsZXMuDQpJIG1pc3MgdGhlIGNvbXBpbGUgc3RhZ2UuDQoz
LjE4IHdvcmtzIGZpbmUuDQoNCi0tLQ0KQWxleA0KDQo=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* modules out of tree issue
@ 2015-04-20  9:09 Hänel-Baas, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-20  9:09 UTC (permalink / raw)
  To: Lucas De Marchi (lucas.de.marchi@gmail.com); +Cc: linux-modules

Hi,
no idea what is going wrong, when i include the output path in obj-m variab=
le?=20

obj-m :=3D out/alex.o                                              <-- work=
s not under 3.18 but in older versions
out/alex-y :=3D internal/src/sm36502_uio.o=20

obj-m :=3D alex.o                                                       <--=
 works
alex-y :=3D internal/src/sm36502_uio.o

I found a diff in /scripts/Makefile.build=20

$(multi-used-m): FORCE                                             <- kerne=
l 3.18
$(multi-used-m) : %.o: $(multi-objs-m) FORCE <- kernel 3.17.8

I'm not sure but the dependencies are lost???=20

When I set $(multi-used-m): FORCE  to  $(multi-used-m) : %.o: $(multi-objs-=
m) FORCE in the 3.18/scripts/makefile.build, all my external modules make f=
iles are lucky.

I hope that helps to find out what is going wrong and we find a solution ho=
w I can use a outputdir in the obj-m variable.

---
Alexander=20

^ permalink raw reply	[flat|nested] 6+ messages in thread

* modules out of tree issue
@ 2015-04-17  9:48 Hänel-Baas, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-17  9:48 UTC (permalink / raw)
  To: Lucas De Marchi (lucas.de.marchi@gmail.com); +Cc: linux-modules

Hi Lucas

i have played with the make files and find out that the problem is the
OUTDIR setting in the TARGET.

makefile:
OUTDIR=3Dout/
SOURCES =3D internal/src/sm36502_uio.o
TARGET=3D${OUTDIR}alex                                <-- works not

OBJECTS :=3D $(SOURCES:.c=3D.o)
obj-m :=3D $(TARGET).o
$(TARGET)-y :=3D $(OBJECTS)

This works NOT at Kernel 3.18 but with older kernels

I miss the compile state and get:
sm@debianVM:~/temp/ARMg3k036502Uio$ make
make  ARCH=3Darm CROSS_COMPILE=3D/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3Xeno=
ArmImx.Bsp.V2/selected_toolchain/arm-v7a-linux-gnueabi- -C /opt/g3DevelBase=
/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-=
3.18 M=3D$PWD  modules
make[1]: Entering directory `/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmI=
mx.Bsp.V2/platform-sm-arm/build-target/linux-3.18'
LD [M]  /home/sm/temp/ARMg3k036502Uio/out/alex.o
/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/selected_toolchain/=
arm-v7a-linux-gnueabi-ld: no input files

Without given OUTDIR in TARGET it works.

makefile:
SOURCES =3D internal/src/sm36502_uio.o
TARGET=3Dalex                                                      <--NO  p=
roblem

OBJECTS :=3D $(SOURCES:.c=3D.o)
obj-m :=3D $(TARGET).o
$(TARGET)-y :=3D $(OBJECTS)

sm@debianVM:~/temp/ARMg3k036502Uio$ make
make  ARCH=3Darm CROSS_COMPILE=3D/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3Xeno=
ArmImx.Bsp.V2/selected_toolchain/arm-v7a-linux-gnueabi- -C /opt/g3DevelBase=
/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-=
3.18 M=3D$PWD  modules
make[1]: Entering directory `/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmI=
mx.Bsp.V2/platform-sm-arm/build-target/linux-3.18'
CC [M]  /home/sm/temp/ARMg3k036502Uio/internal/src/sm36502_uio.o
  LD [M]  /home/sm/temp/ARMg3k036502Uio/alex.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/sm/temp/ARMg3k036502Uio/alex.mod.o
  LD [M]  /home/sm/temp/ARMg3k036502Uio/alex.ko

Then I played with kernelversion too:
3.17.8 works with my OUTDIR in TARGET
3.18 works not

I found a diff in /scripts/Makefile.build=20

@@ -386,7 +386,7 @@
               $(call if_changed,link_multi-y)
$(call multi_depend, $(multi-used-y), .o, -objs -y)

+$(multi-used-m): FORCE
-$(multi-used-m) : %.o: $(multi-objs-m) FORCE
               $(call if_changed,link_multi-m)
               @{ echo $(@:.o=3D.ko); echo $(link_multi_deps); } > $(MODVER=
DIR)/$(@F:.o=3D.mod)
$(call multi_depend, $(multi-used-m), .o, -objs -y)

I'm not sure but the dependencies are lost???=20

When I set $(multi-used-m): FORCE  to  $(multi-used-m) : %.o: $(multi-objs-=
m) FORCE in the makefile.build,
all my modules make files are lucky.

I hope that helps to find out what is going wrong and we find a solution ho=
w I can
use a outputdir in the makefile.


---
Alexander=20

^ permalink raw reply	[flat|nested] 6+ messages in thread

* modules out of tree issue
@ 2015-04-17  9:41 Hänel-Baas, Alexander
  0 siblings, 0 replies; 6+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-17  9:41 UTC (permalink / raw)
  To: Lucas De Marchi (lucas.de.marchi@gmail.com); +Cc: linux-modules

[-- Attachment #1: Type: text/plain, Size: 2819 bytes --]

Hi Lucas

i have played with the make files and find out that the problem is the
OUTDIR setting in the TARGET.

makefile:
OUTDIR=out/
SOURCES = internal/src/sm36502_uio.o
TARGET=${OUTDIR}alex                                <-- works not

OBJECTS := $(SOURCES:.c=.o)
obj-m := $(TARGET).o
$(TARGET)-y := $(OBJECTS)

This works NOT at Kernel 3.18 but with older kernels

I miss the compile state and get:
sm@debianVM:~/temp/ARMg3k036502Uio$ make
make  ARCH=arm CROSS_COMPILE=/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/selected_toolchain/arm-v7a-linux-gnueabi- -C /opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-3.18 M=$PWD  modules
make[1]: Entering directory `/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-3.18'
LD [M]  /home/sm/temp/ARMg3k036502Uio/out/alex.o
/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/selected_toolchain/arm-v7a-linux-gnueabi-ld: no input files

Without given OUTDIR in TARGET it works.

makefile:
SOURCES = internal/src/sm36502_uio.o
TARGET=alex                                                      <--NO  problem

OBJECTS := $(SOURCES:.c=.o)
obj-m := $(TARGET).o
$(TARGET)-y := $(OBJECTS)

sm@debianVM:~/temp/ARMg3k036502Uio$ make
make  ARCH=arm CROSS_COMPILE=/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/selected_toolchain/arm-v7a-linux-gnueabi- -C /opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-3.18 M=$PWD  modules
make[1]: Entering directory `/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArmImx.Bsp.V2/platform-sm-arm/build-target/linux-3.18'
CC [M]  /home/sm/temp/ARMg3k036502Uio/internal/src/sm36502_uio.o
  LD [M]  /home/sm/temp/ARMg3k036502Uio/alex.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/sm/temp/ARMg3k036502Uio/alex.mod.o
  LD [M]  /home/sm/temp/ARMg3k036502Uio/alex.ko

Then I played with kernelversion too:
3.17.8 works with my OUTDIR in TARGET
3.18 works not

I found a diff in /scripts/Makefile.build

@@ -386,7 +386,7 @@
               $(call if_changed,link_multi-y)
$(call multi_depend, $(multi-used-y), .o, -objs -y)
+$(multi-used-m): FORCE
-$(multi-used-m) : %.o: $(multi-objs-m) FORCE
               $(call if_changed,link_multi-m)
               @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)
$(call multi_depend, $(multi-used-m), .o, -objs -y)

I'm not sure but the dependencies are lost???

When I set $(multi-used-m): FORCE  to  $(multi-used-m) : %.o: $(multi-objs-m) FORCE in the makefile.build,
all my modules make files are lucky.

I hope that helps to find out what is going wrong and we find a solution how I can
use a outputdir in the makefile.


With best regards,
Alexander


[-- Attachment #2: Type: text/html, Size: 10199 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-20  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16  9:41 modules out of tree issue Hänel-Baas, Alexander
2015-04-16 11:25 ` Lucas De Marchi
2015-04-16 12:27   ` AW: " Hänel-Baas, Alexander
2015-04-17  9:41 Hänel-Baas, Alexander
2015-04-17  9:48 Hänel-Baas, Alexander
2015-04-20  9:09 Hänel-Baas, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).