All of lore.kernel.org
 help / color / mirror / Atom feed
* Building a out of tree kernel module on target system
@ 2019-09-30 19:29 Shravan Singh
  2019-10-04 17:42 ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Shravan Singh @ 2019-09-30 19:29 UTC (permalink / raw)
  To: yocto

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

Hello,

I am trying to build an out of tree service module on a yocto raspberry pi
image(target system).
I am using yocto version warrior
and my machine is Raspberrypi-cm3
Kernel version is 4.19.58

I was able to get the build directory by including

IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc"
After that, I saw a build directory on raspberrypi-image

Now I am trying to compile my source file with the command

*make* *ARCH*=arm *CROSS_COMPILE*=arm-poky-linux-gnueabi-
*KSRC*="/lib/modules/4.19.58/source"
-C /lib/modules/$(shell uname -r)/build *M=*/home/root/tsDriver modules

After that I get an error saying *asm/bitsperlong.h*: no such file or
directory

Am I missing something in my make command?


Regards,
Shravan Singh
(239) 243-0838

Blue Sparq, Inc.
928 NE 24th Lane unit 4 and 5.
Cape Coral, FL 33993

IMPORTANT: The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only. If you have received
this email by mistake, please notify the sender immediately and do not
disclose the contents to anyone or make copies thereof.

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

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

* Re: Building a out of tree kernel module on target system
  2019-09-30 19:29 Building a out of tree kernel module on target system Shravan Singh
@ 2019-10-04 17:42 ` Bruce Ashfield
  2019-10-08 13:57   ` Shravan Singh
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2019-10-04 17:42 UTC (permalink / raw)
  To: Shravan Singh; +Cc: Yocto Project Discussion

On Fri, Oct 4, 2019 at 11:40 AM Shravan Singh <shravan@bluesparq.com> wrote:
>
> Hello,
>
> I am trying to build an out of tree service module on a yocto raspberry pi image(target system).
> I am using yocto version warrior
> and my machine is Raspberrypi-cm3
> Kernel version is 4.19.58
>
> I was able to get the build directory by including
>
> IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc"
> After that, I saw a build directory on raspberrypi-image
>
> Now I am trying to compile my source file with the command
>
> make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- KSRC="/lib/modules/4.19.58/source" -C /lib/modules/$(shell uname -r)/build M=/home/root/tsDriver modules
>
> After that I get an error saying asm/bitsperlong.h: no such file or directory
>
> Am I missing something in my make command?

You need to rebuild/regenerate some file on target (they can't be packaged).
So have you gone to /usr/src/kernel and done a "make scripts prepare" ?

Bruce

>
>
> Regards,
> Shravan Singh
> (239) 243-0838
>
> Blue Sparq, Inc.
> 928 NE 24th Lane unit 4 and 5.
> Cape Coral, FL 33993
>
> IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


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

* Re: Building a out of tree kernel module on target system
  2019-10-04 17:42 ` Bruce Ashfield
@ 2019-10-08 13:57   ` Shravan Singh
  2019-10-09 12:05     ` Zoran Stojsavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Shravan Singh @ 2019-10-08 13:57 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Yocto Project Discussion

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

Hello Bruce,

So I was finally able to compile the kernel module by creating a patch and
then applying that patch to linux recipe file.
However now, I am facing a different issue and have been trying to figure
that one out, Hence the delay in my response.

After creating an appropriate device tree overlay file. After loading the
module, the I2C driver still reads the screen abs_x_max=800 and
abs_y_max=480.
I have specified the frame_buffer_width and frame_buffer height as 1024 X
600. Also I have specifically provided touchscreen-x-size and
touchscreen-y-size in my device tree overlay to match the same.

Why could this be happening?

Regards,
Shravan Singh
(239) 243-0838

Blue Sparq, Inc.
928 NE 24th Lane unit 4 and 5.
Cape Coral, FL 33993

IMPORTANT: The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only. If you have received
this email by mistake, please notify the sender immediately and do not
disclose the contents to anyone or make copies thereof.


On Fri, Oct 4, 2019 at 1:42 PM Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> On Fri, Oct 4, 2019 at 11:40 AM Shravan Singh <shravan@bluesparq.com>
> wrote:
> >
> > Hello,
> >
> > I am trying to build an out of tree service module on a yocto raspberry
> pi image(target system).
> > I am using yocto version warrior
> > and my machine is Raspberrypi-cm3
> > Kernel version is 4.19.58
> >
> > I was able to get the build directory by including
> >
> > IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc"
> > After that, I saw a build directory on raspberrypi-image
> >
> > Now I am trying to compile my source file with the command
> >
> > make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-
> KSRC="/lib/modules/4.19.58/source" -C /lib/modules/$(shell uname -r)/build
> M=/home/root/tsDriver modules
> >
> > After that I get an error saying asm/bitsperlong.h: no such file or
> directory
> >
> > Am I missing something in my make command?
>
> You need to rebuild/regenerate some file on target (they can't be
> packaged).
> So have you gone to /usr/src/kernel and done a "make scripts prepare" ?
>
> Bruce
>
> >
> >
> > Regards,
> > Shravan Singh
> > (239) 243-0838
> >
> > Blue Sparq, Inc.
> > 928 NE 24th Lane unit 4 and 5.
> > Cape Coral, FL 33993
> >
> > IMPORTANT: The contents of this email and any attachments are
> confidential. They are intended for the named recipient(s) only. If you
> have received this email by mistake, please notify the sender immediately
> and do not disclose the contents to anyone or make copies thereof.
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>

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

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

* Re: Building a out of tree kernel module on target system
  2019-10-08 13:57   ` Shravan Singh
@ 2019-10-09 12:05     ` Zoran Stojsavljevic
  0 siblings, 0 replies; 4+ messages in thread
From: Zoran Stojsavljevic @ 2019-10-09 12:05 UTC (permalink / raw)
  To: Shravan Singh; +Cc: Yocto Project Discussion

I have this all standardized for BBB, and here are pointers how to
build an out of tree kernel module on BBB target system (with some
specifics):
local.conf (with added systemd service):
https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-warrior/local.conf_full

Compiling out of tree kernel modules:
https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/Issues/LKM/prepare_modules.log

Zoran
_______

On Wed, Oct 9, 2019 at 12:48 PM Shravan Singh <shravan@bluesparq.com> wrote:
>
> Hello Bruce,
>
> So I was finally able to compile the kernel module by creating a patch and then applying that patch to linux recipe file.
> However now, I am facing a different issue and have been trying to figure that one out, Hence the delay in my response.
>
> After creating an appropriate device tree overlay file. After loading the module, the I2C driver still reads the screen abs_x_max=800 and abs_y_max=480.
> I have specified the frame_buffer_width and frame_buffer height as 1024 X 600. Also I have specifically provided touchscreen-x-size and touchscreen-y-size in my device tree overlay to match the same.
>
> Why could this be happening?
>
> Regards,
> Shravan Singh
> (239) 243-0838
>
> Blue Sparq, Inc.
> 928 NE 24th Lane unit 4 and 5.
> Cape Coral, FL 33993
>
> IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.
>
>
> On Fri, Oct 4, 2019 at 1:42 PM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>>
>> On Fri, Oct 4, 2019 at 11:40 AM Shravan Singh <shravan@bluesparq.com> wrote:
>> >
>> > Hello,
>> >
>> > I am trying to build an out of tree service module on a yocto raspberry pi image(target system).
>> > I am using yocto version warrior
>> > and my machine is Raspberrypi-cm3
>> > Kernel version is 4.19.58
>> >
>> > I was able to get the build directory by including
>> >
>> > IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc"
>> > After that, I saw a build directory on raspberrypi-image
>> >
>> > Now I am trying to compile my source file with the command
>> >
>> > make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- KSRC="/lib/modules/4.19.58/source" -C /lib/modules/$(shell uname -r)/build M=/home/root/tsDriver modules
>> >
>> > After that I get an error saying asm/bitsperlong.h: no such file or directory
>> >
>> > Am I missing something in my make command?
>>
>> You need to rebuild/regenerate some file on target (they can't be packaged).
>> So have you gone to /usr/src/kernel and done a "make scripts prepare" ?
>>
>> Bruce
>>
>> >
>> >
>> > Regards,
>> > Shravan Singh
>> > (239) 243-0838
>> >
>> > Blue Sparq, Inc.
>> > 928 NE 24th Lane unit 4 and 5.
>> > Cape Coral, FL 33993
>> >
>> > IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>>
>> --
>> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end
>> - "Use the force Harry" - Gandalf, Star Trek II
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

end of thread, other threads:[~2019-10-09 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30 19:29 Building a out of tree kernel module on target system Shravan Singh
2019-10-04 17:42 ` Bruce Ashfield
2019-10-08 13:57   ` Shravan Singh
2019-10-09 12:05     ` Zoran Stojsavljevic

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.