[yocto] Building a out of tree kernel module on target system

Bruce Ashfield bruce.ashfield at gmail.com
Fri Oct 4 10:42:43 PDT 2019


On Fri, Oct 4, 2019 at 11:40 AM Shravan Singh <shravan at 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 at 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


More information about the yocto mailing list