From: "Hänel-Baas, Alexander" <alexander.haenel-baas@sieb-meyer.de>
To: "Lucas De Marchi (lucas.de.marchi@gmail.com)"
<lucas.de.marchi@gmail.com>
Cc: "linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>
Subject: modules out of tree issue
Date: Fri, 17 Apr 2015 09:41:45 +0000 [thread overview]
Message-ID: <9BA84827B30CBE4996725F98F7DC912342963137@SMExchange01.siebmeyer.org> (raw)
[-- 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 --]
next reply other threads:[~2015-04-17 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 9:41 Hänel-Baas, Alexander [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-20 9:09 modules out of tree issue Hänel-Baas, Alexander
2015-04-17 9:48 Hänel-Baas, Alexander
2015-04-16 9:41 Hänel-Baas, Alexander
2015-04-16 11:25 ` Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9BA84827B30CBE4996725F98F7DC912342963137@SMExchange01.siebmeyer.org \
--to=alexander.haenel-baas@sieb-meyer.de \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).