[Buildroot] Buildroot and kernel modules

Sid Bharij sid.bharij at gmail.com
Wed Nov 12 18:25:45 UTC 2014


Thank you gentlemen!
So I have the driver source file and makefile for it.
Where does this part go into ? Does it go into the Config.in file or some
top level makefile or the same makefile needed for compiling the driver
code?

KERNELMODULE_DEPENDENCIES = linux

define KERNELMODULE_BUILD_CMDS
   $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
endef

define KERNELMODULE_INSTALL_TARGET_
CMDS
   $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules_install
endef

$(eval $(generic-package))


On Wed, Nov 12, 2014 at 6:34 AM, Thomas Petazzoni <
thomas.petazzoni at free-electrons.com> wrote:

> Dear Paassen, Hiram van,
>
> On Wed, 12 Nov 2014 12:21:12 +0000, Paassen, Hiram van wrote:
>
> > As an alternative we use a buildroot package with something like this in
> > it:
> >
> > KERNELMODULE_DEPENDENCIES = linux
> >
> > define KERNELMODULE_BUILD_CMDS
> >    $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
> > endef
> >
> > define KERNELMODULE_INSTALL_TARGET_CMDS
> >    $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules_install
> > endef
> >
> > $(eval $(generic-package))
> >
> >
> > which basically builds a normal out of tree module.
>
> Yes, that's what should be done if your module is out of tree, indeed.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141112/8a0808eb/attachment.html>


More information about the buildroot mailing list