All of lore.kernel.org
 help / color / mirror / Atom feed
* how to install a kernel module
@ 2016-05-12 14:31 S.Jaritz
  2016-05-12 15:59 ` Christian Ege
  2016-05-13  9:15 ` Esponde, Joel
  0 siblings, 2 replies; 6+ messages in thread
From: S.Jaritz @ 2016-05-12 14:31 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

Hej

I created a recipe for a own modul. It's similar to the example given at:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod

I checked the bitbake process. A "kernel-module-<module name>" package is 
created and filled with the ko-file.

Actually I am failing to bring the module into my image and run it. Are 
there a special command for the "local.conf" or so?

How and where to include the module?

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.

[-- Attachment #2: Type: text/html, Size: 2293 bytes --]

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

* Re: how to install a kernel module
  2016-05-12 14:31 how to install a kernel module S.Jaritz
@ 2016-05-12 15:59 ` Christian Ege
  2016-05-13  9:15 ` Esponde, Joel
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Ege @ 2016-05-12 15:59 UTC (permalink / raw)
  To: yocto

Hi,

> Hej
>
> I created a recipe for a own modul. It's similar to the example given at:
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod
>
> I checked the bitbake process. A "kernel-module-<module name>" package is
> created and filled with the ko-file.

Not sure what you already tried. You can check this as a example:

https://github.com/graugans/meta-udoo/blob/master/conf/machine/udooneo.conf

I do use autoload  and recommends to add modules to the image.

Regards,
Christian
 >
> Actually I am failing to bring the module into my image and run it. Are
> there a special command for the "local.conf" or so?
>
> How and where to include the module?
>
> Regards!
>
> Stefan Jaritz
>
> ------------------------------------------------------------
> ESA Elektroschaltanlagen Grimma GmbH
> Broner Ring 30
> 04668 Grimma
> Telefon: +49 3437 9211 176
> Telefax: +49 3437 9211 26
> E-Mail: s.jaritz@esa-grimma.de
> Internet: www.esa-grimma.de
>
>
> Geschäftsführer:
> Dipl.-Ing. Jörg Gaitzsch
> Jörg Reinker
>
> Sitz der Gesellschaft: Grimma
> Ust.-ID: DE 141784437
> Amtsgericht: Leipzig, HRB 5159
> Steuernummer: 238/108/00755
>
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
> erhalten
> haben, informieren Sie bitte sofort den Absender und löschen Sie diese
> Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
> Mail
> ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you
> are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly
> forbidden.
>
>
> ----------
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>





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

* Re: how to install a kernel module
  2016-05-12 14:31 how to install a kernel module S.Jaritz
  2016-05-12 15:59 ` Christian Ege
@ 2016-05-13  9:15 ` Esponde, Joel
  2016-05-13  9:53   ` Antwort: " S.Jaritz
       [not found]   ` <OF1FC0D227.27F6983E-ONC1257FB2.0033934A-C1257FB2.00364E76@LocalDomain>
  1 sibling, 2 replies; 6+ messages in thread
From: Esponde, Joel @ 2016-05-13  9:15 UTC (permalink / raw)
  To: S.Jaritz, yocto

[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]

Hi,

FYI, image recipes are in recipes-core/images folders.
So if you created your own image recipe, my previous mail should answer your need.

Otherwise, I don't know if you could just add this line to your local.conf file...

IMAGE_INSTALL_append = " ledmodule"

The best way to know that your IMAGE_INSTALL variable is correctly set is to call this bitbake command:

$ bitbake <image> -e

Bitbake will output all the build environment variables and functions related to your image recipe.
So you will be able to check with this command that IMAGE_INSTALL has effectively your module name added to the list.

bitbake -e is a very important command when working with Yocto.

Regards,

Joël Esponde
Honeywell | Sensing and Productivity Solutions

De : yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] De la part de S.Jaritz@esa-grimma.de
Envoyé : jeudi 12 mai 2016 16:32
À : yocto@yoctoproject.org
Objet : [yocto] how to install a kernel module

Hej

I created a recipe for a own modul. It's similar to the example given at:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod

I checked the bitbake process. A "kernel-module-<module name>" package is created and filled with the ko-file.

Actually I am failing to bring the module into my image and run it. Are there a special command for the "local.conf" or so?

How and where to include the module?

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de<mailto:s.jaritz@esa-grimma.de>
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und löschen Sie diese
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.

[-- Attachment #2: Type: text/html, Size: 10771 bytes --]

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

* Antwort: RE: how to install a kernel module
  2016-05-13  9:15 ` Esponde, Joel
@ 2016-05-13  9:53   ` S.Jaritz
       [not found]   ` <OF1FC0D227.27F6983E-ONC1257FB2.0033934A-C1257FB2.00364E76@LocalDomain>
  1 sibling, 0 replies; 6+ messages in thread
From: S.Jaritz @ 2016-05-13  9:53 UTC (permalink / raw)
  To: Esponde, Joel, Christian Ege; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 5786 bytes --]

Thanks for taking the time to help me

I tried your approach but it does not worked.

I tell what I figured out so far:

I.) checking the target system
1.) When flashing the images into my device and boot the system, the 
driver is not loaded.
2.) lsmod shows that there is no driver loaded
3.) modprobe tells me that there is no 'lib/modules' dir

II.) checking yocto
1.) Bitbake creates a package for my machine ("sama5d3xek") -> there are 
several packages; all are empty except the one with the "kernel-module-" 
prefix
2.) checking the "deploy/images" dir -> the module is not listed at the 
"*.manifest" file
3.) checking the "modules-*.tgz" file -> modules are in(like the ext4.ko) 
but not the ledmodule.ko

As far as I understand yocto and the meta-atmel layer there are "two" 
images build. One is the kernel and it goes under the "work/sama5d3xek..." 
dir. The other one is the rootfs and it goes under the "work/cortexahf..." 
dir. By using the module class for my ledmodule recipe yocto is generating 
it in the kernel dir.
I think I need to tell yocto in some way that it should include the module 
in the kernel(where the bb is placed) or at the rootfs (where the recipe 
is missing).
For me it seems that I have to rewrite my recipe. I delete the module 
class reference and adjust the install path to /lib/modules.
But it looks for me more as an workaround, because adding a own 
driver/module seems a common task which should be supported my yocto. I 
like to know the common way how to do it.

When checking the kernel package for the module the path for it is 
"/lib/modules/4.1.0_linux4sam.../extra/ledmodule.ko". The dir 
"/lib/modules/4.1.0_linux4sam.../" not exits at my target.

Regards!

Stefan Jaritz


------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.



Von:    "Esponde, Joel" <Joel.Esponde@Honeywell.com>
An:     "S.Jaritz@esa-grimma.de" <S.Jaritz@esa-grimma.de>, 
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Datum:  13.05.2016 11:15
Betreff:        RE: [yocto] how to install a kernel module



Hi,
 
FYI, image recipes are in recipes-core/images folders.
So if you created your own image recipe, my previous mail should answer 
your need.
 
Otherwise, I don’t know if you could just add this line to your local.conf 
file…
 
IMAGE_INSTALL_append = " ledmodule"
 
The best way to know that your IMAGE_INSTALL variable is correctly set is 
to call this bitbake command:
 
$ bitbake <image> -e
 
Bitbake will output all the build environment variables and functions 
related to your image recipe.
So you will be able to check with this command that IMAGE_INSTALL has 
effectively your module name added to the list.
 
bitbake -e is a very important command when working with Yocto.
 
Regards,
 
Joël Esponde
Honeywell | Sensing and Productivity Solutions
 
De : yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org
] De la part de S.Jaritz@esa-grimma.de
Envoyé : jeudi 12 mai 2016 16:32
À : yocto@yoctoproject.org
Objet : [yocto] how to install a kernel module
 
Hej 

I created a recipe for a own modul. It's similar to the example given at: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod 


I checked the bitbake process. A "kernel-module-<module name>" package is 
created and filled with the ko-file. 

Actually I am failing to bring the module into my image and run it. Are 
there a special command for the "local.conf" or so? 

How and where to include the module? 

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.


[-- Attachment #2: Type: text/html, Size: 10131 bytes --]

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

* Solved - Antwort: RE: how to install a kernel module
       [not found]   ` <OF1FC0D227.27F6983E-ONC1257FB2.0033934A-C1257FB2.00364E76@LocalDomain>
@ 2016-05-13 11:18     ` S.Jaritz
  2016-05-13 11:36       ` Esponde, Joel
  0 siblings, 1 reply; 6+ messages in thread
From: S.Jaritz @ 2016-05-13 11:18 UTC (permalink / raw)
  To: Joel.Esponde, k4230r6, yocto

[-- Attachment #1: Type: text/plain, Size: 7593 bytes --]

I solved that problem

Using 

IMAGE_INSTALL += "ledmodule"

instead of

IMAGE_INSTALL_append = " ledmodule"

caused that the module was installed.

I found the hint in

https://communities.intel.com/thread/56810?start=0&tstart=0

Thanks for the help. Maybe a tip in the recipe template "hello_mod" could 
help other people trying to build theire own modules.

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.



Von:    Stefan Jaritz/User/ESA-Grimma/DE
An:     "Esponde, Joel" <Joel.Esponde@Honeywell.com>, Christian Ege 
<k4230r6@gmail.com>
Kopie:  "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Datum:  13.05.2016 11:53
Betreff:        Antwort: RE: [yocto] how to install a kernel module


Thanks for taking the time to help me

I tried your approach but it does not worked.

I tell what I figured out so far:

I.) checking the target system
1.) When flashing the images into my device and boot the system, the 
driver is not loaded.
2.) lsmod shows that there is no driver loaded
3.) modprobe tells me that there is no 'lib/modules' dir

II.) checking yocto
1.) Bitbake creates a package for my machine ("sama5d3xek") -> there are 
several packages; all are empty except the one with the "kernel-module-" 
prefix
2.) checking the "deploy/images" dir -> the module is not listed at the 
"*.manifest" file
3.) checking the "modules-*.tgz" file -> modules are in(like the ext4.ko) 
but not the ledmodule.ko

As far as I understand yocto and the meta-atmel layer there are "two" 
images build. One is the kernel and it goes under the "work/sama5d3xek..." 
dir. The other one is the rootfs and it goes under the "work/cortexahf..." 
dir. By using the module class for my ledmodule recipe yocto is generating 
it in the kernel dir.
I think I need to tell yocto in some way that it should include the module 
in the kernel(where the bb is placed) or at the rootfs (where the recipe 
is missing).
For me it seems that I have to rewrite my recipe. I delete the module 
class reference and adjust the install path to /lib/modules.
But it looks for me more as an workaround, because adding a own 
driver/module seems a common task which should be supported my yocto. I 
like to know the common way how to do it.

When checking the kernel package for the module the path for it is 
"/lib/modules/4.1.0_linux4sam.../extra/ledmodule.ko". The dir 
"/lib/modules/4.1.0_linux4sam.../" not exits at my target.

Regards!

Stefan Jaritz


------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.




Von:    "Esponde, Joel" <Joel.Esponde@Honeywell.com>
An:     "S.Jaritz@esa-grimma.de" <S.Jaritz@esa-grimma.de>, 
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Datum:  13.05.2016 11:15
Betreff:        RE: [yocto] how to install a kernel module



Hi,
 
FYI, image recipes are in recipes-core/images folders.
So if you created your own image recipe, my previous mail should answer 
your need.
 
Otherwise, I don’t know if you could just add this line to your local.conf 
file…
 
IMAGE_INSTALL_append = " ledmodule"
 
The best way to know that your IMAGE_INSTALL variable is correctly set is 
to call this bitbake command:
 
$ bitbake <image> -e
 
Bitbake will output all the build environment variables and functions 
related to your image recipe.
So you will be able to check with this command that IMAGE_INSTALL has 
effectively your module name added to the list.
 
bitbake -e is a very important command when working with Yocto.
 
Regards,
 
Joël Esponde
Honeywell | Sensing and Productivity Solutions
 
De : yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org
] De la part de S.Jaritz@esa-grimma.de
Envoyé : jeudi 12 mai 2016 16:32
À : yocto@yoctoproject.org
Objet : [yocto] how to install a kernel module
 
Hej 

I created a recipe for a own modul. It's similar to the example given at: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod 


I checked the bitbake process. A "kernel-module-<module name>" package is 
created and filled with the ko-file. 

Actually I am failing to bring the module into my image and run it. Are 
there a special command for the "local.conf" or so? 

How and where to include the module? 

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.


[-- Attachment #2: Type: text/html, Size: 13346 bytes --]

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

* Re: Solved - Antwort: RE: how to install a kernel module
  2016-05-13 11:18     ` Solved - " S.Jaritz
@ 2016-05-13 11:36       ` Esponde, Joel
  0 siblings, 0 replies; 6+ messages in thread
From: Esponde, Joel @ 2016-05-13 11:36 UTC (permalink / raw)
  To: S.Jaritz, k4230r6, yocto

[-- Attachment #1: Type: text/plain, Size: 8510 bytes --]

Great news !

BTW, I am surprised about this result… IMAGE_INSTALL_append works for me…
And the link you provided tells that _append method is preferred to +=…

Joël Esponde
Honeywell | Sensing and Productivity Solutions

De : S.Jaritz@esa-grimma.de [mailto:S.Jaritz@esa-grimma.de]
Envoyé : vendredi 13 mai 2016 13:18
À : Esponde, Joel; k4230r6@gmail.com; yocto@yoctoproject.org
Objet : Solved - Antwort: RE: [yocto] how to install a kernel module

I solved that problem

Using

IMAGE_INSTALL += "ledmodule"

instead of

IMAGE_INSTALL_append = " ledmodule"

caused that the module was installed.

I found the hint in

https://communities.intel.com/thread/56810?start=0&tstart=0

Thanks for the help. Maybe a tip in the recipe template "hello_mod" could help other people trying to build theire own modules.

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de<mailto:s.jaritz@esa-grimma.de>
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und löschen Sie diese
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.



Von:        Stefan Jaritz/User/ESA-Grimma/DE
An:        "Esponde, Joel" <Joel.Esponde@Honeywell.com<mailto:Joel.Esponde@Honeywell.com>>, Christian Ege <k4230r6@gmail.com<mailto:k4230r6@gmail.com>>
Kopie:        "yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>" <yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>>
Datum:        13.05.2016 11:53
Betreff:        Antwort: RE: [yocto] how to install a kernel module
________________________________


Thanks for taking the time to help me

I tried your approach but it does not worked.

I tell what I figured out so far:

I.) checking the target system
1.) When flashing the images into my device and boot the system, the driver is not loaded.
2.) lsmod shows that there is no driver loaded
3.) modprobe tells me that there is no 'lib/modules' dir

II.) checking yocto
1.) Bitbake creates a package for my machine ("sama5d3xek") -> there are several packages; all are empty except the one with the "kernel-module-" prefix
2.) checking the "deploy/images" dir -> the module is not listed at the "*.manifest" file
3.) checking the "modules-*.tgz" file -> modules are in(like the ext4.ko) but not the ledmodule.ko

As far as I understand yocto and the meta-atmel layer there are "two" images build. One is the kernel and it goes under the "work/sama5d3xek..." dir. The other one is the rootfs and it goes under the "work/cortexahf..." dir. By using the module class for my ledmodule recipe yocto is generating it in the kernel dir.
I think I need to tell yocto in some way that it should include the module in the kernel(where the bb is placed) or at the rootfs (where the recipe is missing).
For me it seems that I have to rewrite my recipe. I delete the module class reference and adjust the install path to /lib/modules.
But it looks for me more as an workaround, because adding a own driver/module seems a common task which should be supported my yocto. I like to know the common way how to do it.

When checking the kernel package for the module the path for it is "/lib/modules/4.1.0_linux4sam.../extra/ledmodule.ko". The dir "/lib/modules/4.1.0_linux4sam.../" not exits at my target.

Regards!

Stefan Jaritz


------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de<mailto:s.jaritz@esa-grimma.de>
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und löschen Sie diese
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.




Von:        "Esponde, Joel" <Joel.Esponde@Honeywell.com<mailto:Joel.Esponde@Honeywell.com>>
An:        "S.Jaritz@esa-grimma.de<mailto:S.Jaritz@esa-grimma.de>" <S.Jaritz@esa-grimma.de<mailto:S.Jaritz@esa-grimma.de>>, "yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>" <yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>>
Datum:        13.05.2016 11:15
Betreff:        RE: [yocto] how to install a kernel module
________________________________



Hi,

FYI, image recipes are in recipes-core/images folders.
So if you created your own image recipe, my previous mail should answer your need.

Otherwise, I don’t know if you could just add this line to your local.conf file…

IMAGE_INSTALL_append = " ledmodule"

The best way to know that your IMAGE_INSTALL variable is correctly set is to call this bitbake command:

$ bitbake <image> -e

Bitbake will output all the build environment variables and functions related to your image recipe.
So you will be able to check with this command that IMAGE_INSTALL has effectively your module name added to the list.

bitbake -e is a very important command when working with Yocto.

Regards,

Joël Esponde
Honeywell | Sensing and Productivity Solutions

De : yocto-bounces@yoctoproject.org<mailto:yocto-bounces@yoctoproject.org> [mailto:yocto-bounces@yoctoproject.org] De la part de S.Jaritz@esa-grimma.de<mailto:S.Jaritz@esa-grimma.de>
Envoyé : jeudi 12 mai 2016 16:32
À : yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Objet : [yocto] how to install a kernel module

Hej

I created a recipe for a own modul. It's similar to the example given at:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-kernel/hello-mod

I checked the bitbake process. A "kernel-module-<module name>" package is created and filled with the ko-file.

Actually I am failing to bring the module into my image and run it. Are there a special command for the "local.conf" or so?

How and where to include the module?

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de<mailto:s.jaritz@esa-grimma.de>
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und löschen Sie diese
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.

[-- Attachment #2: Type: text/html, Size: 25309 bytes --]

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

end of thread, other threads:[~2016-05-13 11:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 14:31 how to install a kernel module S.Jaritz
2016-05-12 15:59 ` Christian Ege
2016-05-13  9:15 ` Esponde, Joel
2016-05-13  9:53   ` Antwort: " S.Jaritz
     [not found]   ` <OF1FC0D227.27F6983E-ONC1257FB2.0033934A-C1257FB2.00364E76@LocalDomain>
2016-05-13 11:18     ` Solved - " S.Jaritz
2016-05-13 11:36       ` Esponde, Joel

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.