<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2658</bug_id>
          
          <creation_ts>2012-06-25 20:35:57 +0000</creation_ts>
          <short_desc>Create Kernel Device Driver SDK (host-side)</short_desc>
          <delta_ts>2017-09-25 15:45:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>26 Sept 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>brian.avery</cc>
    
    <cc>dagenaisj</cc>
    
    <cc>henry.bruce</cc>
    
    <cc>joaohf</cc>
    
    <cc>khays</cc>
    
    <cc>kristi</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22564</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2012-06-25 20:35:57 +0000</bug_when>
    <thetext>We have meta-toolchain which can produce toolchain SDK good for application development but not for external module or device driver development. We should create such a target.

I have some priliminary patches for it. I will submit them soon for comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38068</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-10-18 22:39:32 +0000</bug_when>
    <thetext>Khem, what happened to this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40553</commentid>
    <comment_count>2</comment_count>
    <who name="João Henrique">joaohf</who>
    <bug_when>2014-02-21 03:01:57 +0000</bug_when>
    <thetext>I would like to take it. Khem, could you provide your preliminary patches?

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40554</commentid>
    <comment_count>3</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2014-02-21 03:09:41 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I would like to take it. Khem, could you provide your preliminary patches?

Joao,

I did not have any working patches. I added virtual/kernel to TARGET packages
for SDK but that was long time ago we did not have populate_sdk task back then
however, I quickly ran into problems where folks wanted to do much more than
external modules. So checking out a kernel source was an easier workflow</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45125</commentid>
    <comment_count>4</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-08-14 15:21:25 +0000</bug_when>
    <thetext>So currently, to build modules on the target, you need the sdk and the kernel-dev package. You also have to run make scripts in the kernel to build the target arch versions.

It isn&apos;t clear to me what exactly this bug is describing. Khem, can you provide any additional information? Is this still needed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45128</commentid>
    <comment_count>5</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2014-08-14 15:30:27 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; So currently, to build modules on the target, you need the sdk and the
&gt; kernel-dev package. You also have to run make scripts in the kernel to build
&gt; the target arch versions.
&gt; 
&gt; It isn&apos;t clear to me what exactly this bug is describing. Khem, can you
&gt; provide any additional information? Is this still needed?

This feature request is not for on device SDK but for cross SDK which is essentially very much the SDK we have for app development in addition to it will have configured kernel sources as well so that developers can write out-of-kernel lkms in a cross build environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45130</commentid>
    <comment_count>6</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-08-14 15:50:52 +0000</bug_when>
    <thetext>Thanks Khem, got it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45133</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-08-14 21:32:16 +0000</bug_when>
    <thetext>From someone else I spoke with looking to do a similar thing (build out of tree modules using the host SDK):

&quot;
1. Installed the sdk from the script produced from % bitbake image-full -c populate_sdk
2. cd into the top level of the sdk and source the environment variables file
3. cd to sysroots/i586*/usr/src/kernel
4. run &apos;make scripts&apos;
5. return to top level of sdk and add to environment variables file KERNELDIR to reference sysroots/i586*/usr/src/kernel

Now I can move to one of my kernel modules and run &apos;make&apos; and it just works.

So, from a naïve perspective, having the make scripts occur as part of the install would be quite helpful. Having KERNELDIR set in the environment variables would also be helpful.
&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75227</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-07-21 16:39:01 +0000</bug_when>
    <thetext>The current eSDK environment is able to build both kernels and out of tree modules, either directly or via devtool.  At this point, I think we need to improve the documentation of this functionality.

When using the eSDK with 2.4, we should now be able to use devtool to build a full kernel or a out of tree module without the additional steps that Darren mentions in comment #7. There are some examples in the Tips and Tricks section on the wiki.

We may need to add some use cases examples in Kernel Lab and Kernel Developer manual with links to/from the SDK manual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75228</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-07-21 17:49:11 +0000</bug_when>
    <thetext>Yes - this is a missing piece in the current doc set.  I have an email out to Henry Bruce to close on a kernel development workflow that involves devtool.  This needs to be in place.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75229</commentid>
    <comment_count>10</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-07-21 20:09:39 +0000</bug_when>
    <thetext>Content is being created in Tips and Tricks article at https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk. I&apos;ll assign bug to me and then hand over to Scott when done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75575</commentid>
    <comment_count>11</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-08-01 23:02:22 +0000</bug_when>
    <thetext>Handing over to Scott.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75790</commentid>
    <comment_count>12</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-08-09 22:09:14 +0000</bug_when>
    <thetext>I have scrubbed through the wiki page that Henry created (https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk).  I fixed some typos and added some clarifying notes that where things tripped me up a bit. 

My only question left with the wiki now is the placement of the layer creation step (meta-my-kernel).  I sent a separate email to Henry that asks for the some more information on just exactly where this part of the process is needed based on whether the user builds the *.sh file or downloads it.  

I will begin layering this wiki information into the manual set.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76672</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-09-07 23:28:46 +0000</bug_when>
    <thetext>I will move the creation of the layer step a bit in the wiki.  Once that is done I am calling it good on this bug.  The stuff in the kernel manual is going to be different than the wiki example.  Wiki uses real hardware and the kernel manual uses QEMU.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76676</commentid>
    <comment_count>14</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-09-07 23:36:57 +0000</bug_when>
    <thetext>So the &quot;Create a Layer&quot; section is now more appropriately located now.  I will put this in IN PROGRESS REVIEW should anyone like to look at the procedure again.  

scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77105</commentid>
    <comment_count>15</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-09-25 15:45:40 +0000</bug_when>
    <thetext>No review comments so marking RESOLVED.  Setting doc flag to &quot;done.&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>