[prev in list] [next in list] [prev in thread] [next in thread] 

List:       buildroot
Subject:    Re: [Buildroot] In Buildroot, how to compile kernel modules
From:       Raúl_Sánchez Siles <rasasi78 () gmail ! com>
Date:       2014-02-25 10:23:01
Message-ID: 20140225102301.GA6130 () trismegisto ! universo
[Download RAW message or body]

On Tue, Feb 25, 2014 at 10:04:34AM +0100, Frank Ihle wrote:
> Hi everyone,
> 
[...]
> 
> I actually just want to make changes on the Buildroot or Linux configuration
> and if Image is generated I'd still like to have a runnable kernel module.
> 
> Can somebody tell me a hint about the steps, a manual or a tutorial ?
> 
> Kind Regards
> 
> Frank Ihle

  Hello:

  Consider this example for aufs, which I'll someday manage to submit. You'll
need to created an aufs package, in this case Config.in and aufs.mk

  The interesting part is aufs.mk:

------8<--------
AUFS_SITE_METHOD = git
AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone

AUFS_DEPENDENCIES = linux
AUFS_INSTALL_STAGING = YES

define AUFS_BUILD_CMDS
        $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) aufs.ko
endef

define AUFS_INSTALL_TARGET_CMDS
        $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) install
endef

define AUFS_INSTALL_STAGING_CMDS
        $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) -f scripts/Makefile.host \
                scripts/unifdef
        $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) usr/include/linux/aufs_type.h
        $(INSTALL) -p -m 0644 $(@D)/usr/include/linux/aufs_type.h $(STAGING_DIR)/usr/include/linux
endef

$(eval $(generic-package))
------>8--------

  Mind that this is targetted for 2013.11 so it may not work that straight
forward on a more recent (or older) version.

  Notes:

  - STAGING may not be needed in your case
  - You may need to add/remove some stuff to get your case working.
  - Consider following [0] guideliness

[0] http://buildroot.net/downloads/manual/manual.html#adding-packages

  Disclaimer: This snippet is not an aufs fully working example.

  Regards,

-- 
Raúl Sánchez Siles
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic