Bug 3729 - Add a section on how to build out-of-tree modules on the target.
Summary: Add a section on how to build out-of-tree modules on the target.
Status: RESOLVED FIXED
Alias: None
Product: Kernel Development
Classification: Documentation
Component: kernel-development (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low normal
Target Milestone: 1.7 M3
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 17 June 2014: RESOLVED
Depends on:
Blocks:
 
Reported: 2013-01-16 17:15 UTC by Darren Hart
Modified: 2014-06-17 07:14 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2013-01-16 17:15:32 UTC
By building the sdk image, the toolchain and the kernel-dev package will be installed on the target. As the host binaries have been removed from the kernel-dev package, you will first need to build the scripts prior to building your modules.

$ cd /usr/src/kernel
$ make scripts

Then you should be able to build your out-of-tree modules.

Details in the relevant commits to support this process:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=68a8caa738caa25f313a0bccfd8179cc5584afa5
Comment 1 Scott Rifenbark 2013-01-29 18:12:50 UTC
Darren, 

Is this task separate from "Incorporating Out-of-Tree Modules" at http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules?  And, if so, is the information provided in your comment all the user needs to understand?

Scott
Comment 2 Scott Rifenbark 2013-02-12 00:49:04 UTC
Still need some info on this.
Comment 3 Scott Rifenbark 2013-10-31 17:31:45 UTC
Resetting the target to 1.6.  This is an old bug that I still need clarification on.
Comment 4 Scott Rifenbark 2014-04-10 20:27:23 UTC
Can't get to this... pushing to 1.7.
Comment 5 Darren Hart 2014-05-29 00:15:21 UTC
Scott, yes, this is a separate issue from Incorporating Out of Tree Modules, which is about recipes like hello-mod. This is about compiling drivers on the device itself using the sdk image.
Comment 6 Scott Rifenbark 2014-06-03 07:58:44 UTC
Darren, 

I have made an attempt at understanding this and creating a section in the kernel-dev manual to address it.  Since there was already a section in there called "Incorporating Out-of-Tree Modules" I decided to group that existing section with a new section called "Building Out-of-Tree Modules on the Target" under a parent section titled "Working with Out-of-Tree Modules". 

I am not sure I totally understand what parts were necessary for the fix and what is required of the user.  I assumed that just getting in that right directory and running the make scripts was all the use had to do.  Because I am not a kernel developer, I also did not know the entire context.  So, I assumed that the user had to do these things prior to building the SDK image that eventually runs on the target.  Then, I guess that the image is installed and booted on the target and they can automatically build out-of-tree modules as they want.  

So, please review this stuff and correct me where I have made wrong assumptions and we can get it fixed.

http://www.yoctoproject.org/docs/1.7/kernel-dev/kernel-dev.html#working-with-out-of-tree-modules.

Thanks, 
Scott
Comment 7 Scott Rifenbark 2014-06-03 08:20:39 UTC
Darren, 

I pinged Richard and he gave me some contextual information that corrected a bad assumption I noted in the Comment 6. Evidently, the user changes to that directory and creates those scripts from the target... not prior to building the SDK image on the build host.  I have updated the section.  You will see the latest but I wanted to note my "gaffe" here in the comments.

Please review when you can.

Thanks,
Scott

http://www.yoctoproject.org/docs/1.7/kernel-dev/kernel-dev.html#working-with-out-of-tree-modules.

I also added Richard to the CC list since I got info from him.
Comment 8 Scott Rifenbark 2014-06-17 07:14:22 UTC
This section has been on review a while and I have received no feedback.  I am marking it RESOLVED and setting the documentation flag to "Done".

Scott