Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Kernel module compiled but not found
@ 2013-10-13 14:29 Marco Trapanese
  2013-10-13 14:51 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Marco Trapanese @ 2013-10-13 14:29 UTC (permalink / raw)
  To: buildroot

Hello,
I read the official documentation and this tutorial:

http://blog.willygroup.org/buildroot-aggiungere-modulo-al-kernel.html#fn-729-1

to add a custom kernel module.
It seems it is successfully compiled but I cannot find the .ko file in 
the Buildroot tree.
This is the relevant output:

 >>> sensoray2253 1.2.6 Building
/usr/bin/make -j5 
HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm 
INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target 
CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-" 
DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod 
-C /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom 
M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6 
modules
make[1]: Entering directory 
`/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
   Building modules, stage 2.
   MODPOST 0 modules
make[1]: Leaving directory 
`/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
 >>> sensoray2253 1.2.6 Installing to target
/usr/bin/make -j5 
HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm 
INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target 
CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-" 
DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod 
-C /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom 
M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6 
modules_install
make[1]: Entering directory 
`/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
   DEPMOD  3.9.11
make[1]: Leaving directory 
`/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
mkdir -p /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc
echo "rpi" > /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc/hostname


As you can see, there are no errors but I'm not sure the module is 
correctly installed!
According to the tutorial I should find it in:

buildroot_folder/output/target/lib/modules/kernel_version/extra/

but mine is empty.

How investigate further?
Thanks
Mark

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 14:29 [Buildroot] Kernel module compiled but not found Marco Trapanese
@ 2013-10-13 14:51 ` Yann E. MORIN
  2013-10-13 15:02   ` Marco Trapanese
  2013-10-13 15:56 ` Yann E. MORIN
  2013-10-13 20:11 ` Ciarán Rehill
  2 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2013-10-13 14:51 UTC (permalink / raw)
  To: buildroot

Marco, All,

On 2013-10-13 16:29 +0200, Marco Trapanese spake thusly:
> Hello,
> I read the official documentation and this tutorial:
> 
> http://blog.willygroup.org/buildroot-aggiungere-modulo-al-kernel.html#fn-729-1
> 
> to add a custom kernel module.
> It seems it is successfully compiled but I cannot find the .ko file in the
> Buildroot tree.
> This is the relevant output:
> 
> >>> sensoray2253 1.2.6 Building
> /usr/bin/make -j5
> HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache
> /usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
> INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target
> CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache /home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-"
> DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod -C
> /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom
> M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6
> modules
> make[1]: Entering directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
>   Building modules, stage 2.
>   MODPOST 0 modules
> make[1]: Leaving directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
> >>> sensoray2253 1.2.6 Installing to target
> /usr/bin/make -j5
> HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache
> /usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
> INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target
> CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache /home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-"
> DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod -C
> /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom
> M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6
> modules_install

You're missing INSTALL_MOD_PATH=$(TARGET_DIR) on this command line
(the make line for 'MYKMOD_INSTALL_TARGET_CMDS' ).

Regards,
Yann E. MORIN.

> make[1]: Entering directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
>   DEPMOD  3.9.11
> make[1]: Leaving directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
> mkdir -p /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc
> echo "rpi" > /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc/hostname
> 
> 
> As you can see, there are no errors but I'm not sure the module is correctly
> installed!
> According to the tutorial I should find it in:
> 
> buildroot_folder/output/target/lib/modules/kernel_version/extra/
> 
> but mine is empty.
> 
> How investigate further?
> Thanks
> Mark
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 14:51 ` Yann E. MORIN
@ 2013-10-13 15:02   ` Marco Trapanese
  2013-10-13 15:05     ` Thomas Petazzoni
  2013-10-13 16:53     ` Sagaert Johan
  0 siblings, 2 replies; 13+ messages in thread
From: Marco Trapanese @ 2013-10-13 15:02 UTC (permalink / raw)
  To: buildroot

Il 13/10/2013 16:51, Yann E. MORIN ha scritto:
> You're missing INSTALL_MOD_PATH=$(TARGET_DIR) on this command line 
> (the make line for 'MYKMOD_INSTALL_TARGET_CMDS' ). Regards, Yann E. 
> MORIN. 

Yann,
thank you for your quick answer. I changed the command line (in 
sensoray2253/sensoray2253.mk) in this way:

define SENSORAY2253_INSTALL_TARGET_CMDS
     $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) 
INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
endef

Is it correct?
Mark

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:02   ` Marco Trapanese
@ 2013-10-13 15:05     ` Thomas Petazzoni
  2013-10-13 15:19       ` Marco Trapanese
  2013-10-13 15:57       ` Yann E. MORIN
  2013-10-13 16:53     ` Sagaert Johan
  1 sibling, 2 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2013-10-13 15:05 UTC (permalink / raw)
  To: buildroot

Dear Marco Trapanese,

On Sun, 13 Oct 2013 17:02:17 +0200, Marco Trapanese wrote:
> Il 13/10/2013 16:51, Yann E. MORIN ha scritto:
> > You're missing INSTALL_MOD_PATH=$(TARGET_DIR) on this command line 
> > (the make line for 'MYKMOD_INSTALL_TARGET_CMDS' ). Regards, Yann E. 
> > MORIN. 
> 
> Yann,
> thank you for your quick answer. I changed the command line (in 
> sensoray2253/sensoray2253.mk) in this way:
> 
> define SENSORAY2253_INSTALL_TARGET_CMDS
>      $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) 
> INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
> endef
> 
> Is it correct?

Adding INSTALL_MOD_PATH should normally not be necessary, since
LINUX_MAKE_FLAGS already contains INSTALL_MOD_PATH.

From linux/linux.mk:

LINUX_MAKE_FLAGS = \
        HOSTCC="$(HOSTCC)" \
        HOSTCFLAGS="$(HOSTCFLAGS)" \
        ARCH=$(KERNEL_ARCH) \
        INSTALL_MOD_PATH=$(TARGET_DIR) \
        CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
        DEPMOD=$(HOST_DIR)/sbin/depmod

Macro, can you post your current package (.mk file and Config.in files,
or even better, a patch against Buildroot), so that we can potentially
reproduce your issue and help you solve it?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:05     ` Thomas Petazzoni
@ 2013-10-13 15:19       ` Marco Trapanese
  2013-10-13 21:12         ` Arnout Vandecappelle
  2013-10-13 15:57       ` Yann E. MORIN
  1 sibling, 1 reply; 13+ messages in thread
From: Marco Trapanese @ 2013-10-13 15:19 UTC (permalink / raw)
  To: buildroot

Il 13/10/2013 17:05, Thomas Petazzoni ha scritto:
> Macro, can you post your current package (.mk file and Config.in files,
> or even better, a patch against Buildroot), so that we can potentially
> reproduce your issue and help you solve it?


Thomas,
I don't know how to post a patch against Buildroot (please, may you 
provide a link where is explained how to?) but I can post here the 
content of the two files for sure:

Config.in
config BR2_PACKAGE_SENSORAY2253
     bool "sensoray2253"
     depends on BR2_LINUX_KERNEL
     help
       Kernel module for Sensoray 2253

       http://it.sensoray.com/products/2253.htm


sensoray2253.mk
################################################################################
#
# sensoray2253
#
################################################################################

SENSORAY2253_VERSION = 1.2.6
SENSORAY2253_SOURCE = sdk_x53_linux_$(SENSORAY2253_VERSION).tar.bz2
SENSORAY2253_SITE = http://it.sensoray.com/downloads/
SENSORAY2253_DEPENDENCIES = linux

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

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

$(eval $(generic-package))

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 14:29 [Buildroot] Kernel module compiled but not found Marco Trapanese
  2013-10-13 14:51 ` Yann E. MORIN
@ 2013-10-13 15:56 ` Yann E. MORIN
  2013-10-13 16:02   ` Marco Trapanese
  2013-10-13 20:11 ` Ciarán Rehill
  2 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2013-10-13 15:56 UTC (permalink / raw)
  To: buildroot

Marco,

On 2013-10-13 16:29 +0200, Marco Trapanese spake thusly:
> Hello,
> I read the official documentation and this tutorial:
> 
> http://blog.willygroup.org/buildroot-aggiungere-modulo-al-kernel.html#fn-729-1
> 
> to add a custom kernel module.
> It seems it is successfully compiled but I cannot find the .ko file in the
> Buildroot tree.
> This is the relevant output:
> 
> >>> sensoray2253 1.2.6 Building
> /usr/bin/make -j5
> HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache
> /usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
> INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target
> CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache /home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-"
> DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod -C
> /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom
> M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6
> modules
> make[1]: Entering directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
>   Building modules, stage 2.
>   MODPOST 0 modules
> make[1]: Leaving directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
> >>> sensoray2253 1.2.6 Installing to target
> /usr/bin/make -j5
> HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache
> /usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
> INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target
> CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache /home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-"
> DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod -C
> /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom
> M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6
> modules_install
> make[1]: Entering directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
>   DEPMOD  3.9.11
> make[1]: Leaving directory
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
> mkdir -p /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc
> echo "rpi" > /home/mark/dev/rpiqt5/buildroot-rpi/output/target/etc/hostname
> 
> 
> As you can see, there are no errors but I'm not sure the module is correctly
> installed!
> According to the tutorial I should find it in:
> 
> buildroot_folder/output/target/lib/modules/kernel_version/extra/
> 
> but mine is empty.

Have you checked it does not end in another directory beside 'extra'?
    find output/target/lib/modules/kernel_version/extra/ |grep 'your-module.ko'

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:05     ` Thomas Petazzoni
  2013-10-13 15:19       ` Marco Trapanese
@ 2013-10-13 15:57       ` Yann E. MORIN
  1 sibling, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2013-10-13 15:57 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-10-13 17:05 +0200, Thomas Petazzoni spake thusly:
> Dear Marco Trapanese,
> 
> On Sun, 13 Oct 2013 17:02:17 +0200, Marco Trapanese wrote:
> > Il 13/10/2013 16:51, Yann E. MORIN ha scritto:
> > > You're missing INSTALL_MOD_PATH=$(TARGET_DIR) on this command line 
> > > (the make line for 'MYKMOD_INSTALL_TARGET_CMDS' ). Regards, Yann E. 
> > > MORIN. 
> > 
> > Yann,
> > thank you for your quick answer. I changed the command line (in 
> > sensoray2253/sensoray2253.mk) in this way:
> > 
> > define SENSORAY2253_INSTALL_TARGET_CMDS
> >      $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) 
> > INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
> > endef
> > 
> > Is it correct?
> 
> Adding INSTALL_MOD_PATH should normally not be necessary, since
> LINUX_MAKE_FLAGS already contains INSTALL_MOD_PATH.
> 
> From linux/linux.mk:
> 
> LINUX_MAKE_FLAGS = \
>         HOSTCC="$(HOSTCC)" \
>         HOSTCFLAGS="$(HOSTCFLAGS)" \
>         ARCH=$(KERNEL_ARCH) \
>         INSTALL_MOD_PATH=$(TARGET_DIR) \
>         CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
>         DEPMOD=$(HOST_DIR)/sbin/depmod

We should document these variables: the list (to have the names of the
variables), their purpose, and their values.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:56 ` Yann E. MORIN
@ 2013-10-13 16:02   ` Marco Trapanese
  0 siblings, 0 replies; 13+ messages in thread
From: Marco Trapanese @ 2013-10-13 16:02 UTC (permalink / raw)
  To: buildroot

Il 13/10/2013 17:56, Yann E. MORIN ha scritto:
> Have you checked it does not end in another directory beside 'extra'?
>      find output/target/lib/modules/kernel_version/extra/ |grep 'your-module.ko'


The extra directory is empty.
Anyway, if I type from the buildroot base directory:

find -name *.ko | grep s2253.ko

nothing is found
Mark

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:02   ` Marco Trapanese
  2013-10-13 15:05     ` Thomas Petazzoni
@ 2013-10-13 16:53     ` Sagaert Johan
  2013-10-13 17:05       ` Marco Trapanese
  1 sibling, 1 reply; 13+ messages in thread
From: Sagaert Johan @ 2013-10-13 16:53 UTC (permalink / raw)
  To: buildroot

 
Hi

Just a caution:
It's best to do a clean in a MYKMOD_CONFIGURE_CMDS section.
I stumbled into this: the install path was not correct if the module had been build before.
(In my case it was already build from within eclipse while developing.)

Here is my buildroot .mk file for info :
--------------------------------------
########################################################################
#
# fm25clxx
#
########################################################################

FM25CLXX_VERSION = 1.0.1
FM25CLXX_SITE = /root/workspace2/FM25FRAMDriver-$(FM25CLXX_VERSION)
FM25CLXX_SITE_METHOD = local
FM25CLXX_DEPENDENCIES = linux


TARGETKERNEL = $(BUILD_DIR)/linux-$(BR2_LINUX_KERNEL_VERSION)
FM25CLXX_MOD_INSTALL_DIR=mydrivers

FM25CLXX_MAKE_OPTS += ARCH=$(KERNEL_ARCH)
FM25CLXX_MAKE_OPTS += CROSS_COMPILE=$(TARGET_CROSS)

FM25CLXX_INSTALL_OPTS += -C $(TARGETKERNEL)
FM25CLXX_INSTALL_OPTS += M=$(@D)
FM25CLXX_INSTALL_OPTS += INSTALL_MOD_PATH=$(TARGET_DIR)
FM25CLXX_INSTALL_OPTS += INSTALL_MOD_STRIP=1
FM25CLXX_INSTALL_OPTS += INSTALL_MOD_DIR=kernel/$(FM25CLXX_MOD_INSTALL_DIR)

# see https://www.kernel.org/doc/Documentation/kbuild/modules.txt

define FM25CLXX_CONFIGURE_CMDS
	$(MAKE) KERNELDIR=$(TARGETKERNEL) $(DIGITAL_IO_MAKE_OPTS) PWD=$(@D) -C $(@D)  clean
endef

define FM25CLXX_BUILD_CMDS
	$(MAKE) KERNELDIR=$(TARGETKERNEL) $(FM25CLXX_MAKE_OPTS) PWD=$(@D) -C $(@D)  all
endef

define FM25CLXX_INSTALL_TARGET_CMDS
	$(MAKE) $(FM25CLXX_MAKE_OPTS) $(FM25CLXX_INSTALL_OPTS) modules_install
endef

define FM25CLXX_UNINSTALL_TARGET_CMDS
	rm -rf $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/$(FM25CLXX_MOD_INSTALL_DIR)
endef

$(eval $(generic-package))

--------------------------------------

The actual module makefile looked like :

---------------------
MODULENAME := fm25clxx

obj-m += $(MODULENAME).o

all:$(MODULENAME).ko

$(MODULENAME).ko:$(MODULENAME).c
	make -C $(KERNELDIR) SUBDIRS=$(PWD) modules CC=arm-linux-gcc LD=arm-linux-ld ARCH=arm
	
.PHONY clean:
	make -C $(KERNELDIR) M=$(PWD) clean

---------------------

The $(KERNELDIR) is an environment variable I have set inside eclipse to point to the kernel.
(usually something like .../buildroot/output/build/linux-xx.yy.zz )

It's maybe not perfect but it allowed me to develop in eclipse and at the same time build it using buildroot.

Johan


-----Oorspronkelijk bericht-----
Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Marco Trapanese
Verzonden: zondag 13 oktober 2013 17:02
CC: buildroot at busybox.net
Onderwerp: Re: [Buildroot] Kernel module compiled but not found

Il 13/10/2013 16:51, Yann E. MORIN ha scritto:
> You're missing INSTALL_MOD_PATH=$(TARGET_DIR) on this command line 
> (the make line for 'MYKMOD_INSTALL_TARGET_CMDS' ). Regards, Yann E.
> MORIN. 

Yann,
thank you for your quick answer. I changed the command line (in
sensoray2253/sensoray2253.mk) in this way:

define SENSORAY2253_INSTALL_TARGET_CMDS
     $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D)
INSTALL_MOD_PATH=$(TARGET_DIR) modules_install endef

Is it correct?
Mark

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 16:53     ` Sagaert Johan
@ 2013-10-13 17:05       ` Marco Trapanese
  0 siblings, 0 replies; 13+ messages in thread
From: Marco Trapanese @ 2013-10-13 17:05 UTC (permalink / raw)
  To: buildroot

Il 13/10/2013 18:53, Sagaert Johan ha scritto:
> Just a caution:
> It's best to do a clean in a MYKMOD_CONFIGURE_CMDS section.
> I stumbled into this: the install path was not correct if the module had been build before.
> (In my case it was already build from within eclipse while developing.)


Hi,
I added the following section:

define SENSORAY2253_CONFIGURE_CMDS
     $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) clean
endef

with no chance.
I tried also to remove the build/sensoray2253 directory and call:

make sensoray2253-reconfigure
make sensoray2253-rebuild

I cannot fine the ko file even in the build directory (I assume it is 
copied to the install dir rather than moved). Anyway I would expect a 
compiler error if the binary file is not created.

Mark

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 14:29 [Buildroot] Kernel module compiled but not found Marco Trapanese
  2013-10-13 14:51 ` Yann E. MORIN
  2013-10-13 15:56 ` Yann E. MORIN
@ 2013-10-13 20:11 ` Ciarán Rehill
  2 siblings, 0 replies; 13+ messages in thread
From: Ciarán Rehill @ 2013-10-13 20:11 UTC (permalink / raw)
  To: buildroot

Marco Trapanese wrote:
...
>  >>> sensoray2253 1.2.6 Building
> /usr/bin/make -j5 
> HOSTCC="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
> /usr/bin/gcc" HOSTCFLAGS="" ARCH=arm 
> INSTALL_MOD_PATH=/home/mark/dev/rpiqt5/buildroot-rpi/output/target 
> CROSS_COMPILE="/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/ccache 
> /home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/bin/arm-buildroot-linux-gnueabi-" 
> DEPMOD=/home/mark/dev/rpiqt5/buildroot-rpi/output/host/usr/sbin/depmod 
> -C /home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom 
> M=/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6 
> modules
> make[1]: Entering directory 
> `/home/mark/dev/rpiqt5/buildroot-rpi/output/build/linux-custom'
>    Building modules, stage 2.
>    MODPOST 0 modules

Zero modules makes me think that there's something up with your source
makefile (the one in output/build/sensoray...)  You should probably post
it.

As you say, no errors - but nothing done either.

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 15:19       ` Marco Trapanese
@ 2013-10-13 21:12         ` Arnout Vandecappelle
  2013-10-14  7:58           ` Marco Trapanese
  0 siblings, 1 reply; 13+ messages in thread
From: Arnout Vandecappelle @ 2013-10-13 21:12 UTC (permalink / raw)
  To: buildroot

On 13/10/13 17:19, Marco Trapanese wrote:
> Il 13/10/2013 17:05, Thomas Petazzoni ha scritto:
>> Macro, can you post your current package (.mk file and Config.in files,
>> or even better, a patch against Buildroot), so that we can potentially
>> reproduce your issue and help you solve it?
>
>
> Thomas,
> I don't know how to post a patch against Buildroot (please, may you
> provide a link where is explained how to?) but I can post here the
> content of the two files for sure:
>
> Config.in
> config BR2_PACKAGE_SENSORAY2253
>      bool "sensoray2253"
>      depends on BR2_LINUX_KERNEL
>      help
>        Kernel module for Sensoray 2253
>
>        http://it.sensoray.com/products/2253.htm
>
>
> sensoray2253.mk
> ################################################################################
>
> #
> # sensoray2253
> #
> ################################################################################
>
>
> SENSORAY2253_VERSION = 1.2.6
> SENSORAY2253_SOURCE = sdk_x53_linux_$(SENSORAY2253_VERSION).tar.bz2
> SENSORAY2253_SITE = http://it.sensoray.com/downloads/
> SENSORAY2253_DEPENDENCIES = linux
>
> define SENSORAY2253_BUILD_CMDS
>      $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules

  The module is in the driver directory, so I guess this should be 
M=$(@D)/driver

  Regards,
  Arnout

> endef
>
> define SENSORAY2253_INSTALL_TARGET_CMDS
>      $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules_install
> endef
>
> $(eval $(generic-package))
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] Kernel module compiled but not found
  2013-10-13 21:12         ` Arnout Vandecappelle
@ 2013-10-14  7:58           ` Marco Trapanese
  0 siblings, 0 replies; 13+ messages in thread
From: Marco Trapanese @ 2013-10-14  7:58 UTC (permalink / raw)
  To: buildroot

Il 13/10/2013 23:12, Arnout Vandecappelle ha scritto:
>  The module is in the driver directory, so I guess this should be 
> M=$(@D)/driver


Good shot!!!
Now it tries to compile, indeed!

It fails but I know why. I'm going to ask a question about patching. But 
this issue is fixed!

Thanks
Mark

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

end of thread, other threads:[~2013-10-14  7:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-13 14:29 [Buildroot] Kernel module compiled but not found Marco Trapanese
2013-10-13 14:51 ` Yann E. MORIN
2013-10-13 15:02   ` Marco Trapanese
2013-10-13 15:05     ` Thomas Petazzoni
2013-10-13 15:19       ` Marco Trapanese
2013-10-13 21:12         ` Arnout Vandecappelle
2013-10-14  7:58           ` Marco Trapanese
2013-10-13 15:57       ` Yann E. MORIN
2013-10-13 16:53     ` Sagaert Johan
2013-10-13 17:05       ` Marco Trapanese
2013-10-13 15:56 ` Yann E. MORIN
2013-10-13 16:02   ` Marco Trapanese
2013-10-13 20:11 ` Ciarán Rehill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox