All of lore.kernel.org
 help / color / mirror / Atom feed
* Building CONFIG_SAMPLES separately.
@ 2013-07-10 19:32 ` Jim Baxter
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Baxter @ 2013-07-10 19:32 UTC (permalink / raw)
  To: mmarek, linux-kbuild; +Cc: linux-kernel, Moseley, Drew

Hi,

I was wondering if there is a reason the modules under the samples
directory only build if you use the command make uImage modules?

I have created a patch so that they compile if you enable CONFIG_SAMPLES
and then build the kernel separately, i.e.
make uImage
make modules

This two step approach is how the kernel is built if you use bitbake in
yocto, currently it does not output the kernel module object file for
the sample modules.

This is the patch I am considering:

diff --git a/Makefile b/Makefile
index 29339b4..1acd69f 100644
--- a/Makefile
+++ b/Makefile
@@ -772,9 +772,6 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
 ifdef CONFIG_HEADERS_CHECK
        $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
 endif
-ifdef CONFIG_SAMPLES
-       $(Q)$(MAKE) $(build)=samples
-endif
 ifdef CONFIG_BUILD_DOCSRC
        $(Q)$(MAKE) $(build)=Documentation
 endif
@@ -943,6 +940,9 @@ all: modules

 PHONY += modules
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
+ifdef CONFIG_SAMPLES
+       $(Q)$(MAKE) $(build)=samples
+endif
        $(Q)$(AWK) '!x[$$0]++'
$(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost


Thank you for any help or advice,
Jim Baxter

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

* Building CONFIG_SAMPLES separately.
@ 2013-07-10 19:32 ` Jim Baxter
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Baxter @ 2013-07-10 19:32 UTC (permalink / raw)
  To: mmarek, linux-kbuild; +Cc: linux-kernel, Moseley, Drew

Hi,

I was wondering if there is a reason the modules under the samples
directory only build if you use the command make uImage modules?

I have created a patch so that they compile if you enable CONFIG_SAMPLES
and then build the kernel separately, i.e.
make uImage
make modules

This two step approach is how the kernel is built if you use bitbake in
yocto, currently it does not output the kernel module object file for
the sample modules.

This is the patch I am considering:

diff --git a/Makefile b/Makefile
index 29339b4..1acd69f 100644
--- a/Makefile
+++ b/Makefile
@@ -772,9 +772,6 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
 ifdef CONFIG_HEADERS_CHECK
        $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
 endif
-ifdef CONFIG_SAMPLES
-       $(Q)$(MAKE) $(build)=samples
-endif
 ifdef CONFIG_BUILD_DOCSRC
        $(Q)$(MAKE) $(build)=Documentation
 endif
@@ -943,6 +940,9 @@ all: modules

 PHONY += modules
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
+ifdef CONFIG_SAMPLES
+       $(Q)$(MAKE) $(build)=samples
+endif
        $(Q)$(AWK) '!x[$$0]++'
$(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost


Thank you for any help or advice,
Jim Baxter

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

end of thread, other threads:[~2013-07-10 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 19:32 Building CONFIG_SAMPLES separately Jim Baxter
2013-07-10 19:32 ` Jim Baxter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.