<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Linux driver module compile needs Linux headers in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918746#M4380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to compile a Linux driver and it depends on Linux headers which are not installed in the LSDK generated base filesystem (Ubuntu based).&lt;/P&gt;&lt;P&gt;Ideally, one could request appropriate Linux headers with 'sudo apt-get install linux-headers-$(uname -r)',&amp;nbsp; however the LSDK does not make this package available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the recommended way to make header files available to compile a Linux driver in LSDK?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jul 2019 15:43:32 GMT</pubDate>
    <dc:creator>penman</dc:creator>
    <dc:date>2019-07-29T15:43:32Z</dc:date>
    <item>
      <title>Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918746#M4380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to compile a Linux driver and it depends on Linux headers which are not installed in the LSDK generated base filesystem (Ubuntu based).&lt;/P&gt;&lt;P&gt;Ideally, one could request appropriate Linux headers with 'sudo apt-get install linux-headers-$(uname -r)',&amp;nbsp; however the LSDK does not make this package available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the recommended way to make header files available to compile a Linux driver in LSDK?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 15:43:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918746#M4380</guid>
      <dc:creator>penman</dc:creator>
      <dc:date>2019-07-29T15:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918747#M4381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The suggested steps are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Build the LSDK kernel in any recommended way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;a)&lt;A href="https://nxp.sdlproducts.com/LiveContent/content/en-US/LSDKUG_Rev19.06/GUID-2313B5AD-DF27-4403-95E1-60C32C055474"&gt; by hand&lt;/A&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;b)&lt;A href="https://nxp.sdlproducts.com/LiveContent/content/en-US/LSDKUG_Rev19.06/GUID-47B8F1F5-3A8F-45F4-A096-4D3DCDE8D07C"&gt; with LSDK automation tool called flex-builder&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Follow the instructions in&lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/Documentation/kbuild/modules.txt"&gt; this file &lt;/A&gt;to build an external kernel module&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 01:04:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918747#M4381</guid>
      <dc:creator>bpe</dc:creator>
      <dc:date>2019-07-30T01:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918748#M4382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the file referenced in the previous message:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-components%2Flinux%2Ftree%2FDocumentation%2Fkbuild%2Fmodules.txt" title="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-components%2Flinux%2Ftree%2FDocumentation%2Fkbuild%2Fmodules.txt"&gt;https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-componen…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2.1 and 2.2 refer to a &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&amp;lt;path_to_kernel_src&amp;gt;&lt;/SPAN&gt; and&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;($KDIR refers to the path of the kernel source directory.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A kernel source directory is not present in the filesystem generated by LSDK.&lt;/P&gt;&lt;P&gt;What is the recommended way to get the kernel source directory into the filesystem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I've tried several methods that do not work, including&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;'sudo apt-get install linux-headers-$(uname -r)' and copying directories from the packages and build directories.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 14:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918748#M4382</guid>
      <dc:creator>penman</dc:creator>
      <dc:date>2019-07-30T14:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918749#M4383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to build your module directly on the target? Otherwise, you do not need kernel sources or headers in the&lt;/P&gt;&lt;P&gt;target filesystem. Note, all my suggestions above are for building the kernel and modules for your target system on a&lt;/P&gt;&lt;P&gt;system where your LSDK is installed, which should be an x86 Linux machine. That is the recommended method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2019 00:54:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918749#M4383</guid>
      <dc:creator>bpe</dc:creator>
      <dc:date>2019-07-31T00:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918750#M4384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we are building the module on the target, common for chip vendors supplying Linux drivers that depend on a running target, evidenced in the call to 'uname -r' of section 2.1 in the how to build an external kernel module above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Similarly, for cross compilation, reference in section 2.2, also depends on a valid $KDIR.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&amp;nbsp;I don't see where/how the LSDK has or can gener&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;ate this directory.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;I've tried following the docs/flexbuild_usage.txt section 'Build Distro Root Filesystem'&lt;/P&gt;&lt;P&gt;sudo chroot build/rfs/rootfs_lsdk_19.03_LS_arm64/ apt install linux-headers-4.19.26&lt;BR /&gt;[sudo] password for username: &lt;BR /&gt;Reading package lists... Done&lt;BR /&gt;Building dependency tree&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Reading state information... Done&lt;BR /&gt;E: Unable to locate package linux-headers-4.19.26&lt;BR /&gt;E: Couldn't find any package by glob 'linux-headers-4.19.26'&lt;BR /&gt;E: Couldn't find any package by regex 'linux-headers-4.19.26'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;LSDK/build/Linux/Linux/arm64/LS/output/LSDK-19.03-V4.19&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;LSDK/package/Linux/Linux&amp;nbsp;&lt;/P&gt;&lt;P&gt;,neither are to be a valid $KDIR as needed for section 2.2.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;What directory should be used for $KDIR?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 18:03:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918750#M4384</guid>
      <dc:creator>penman</dc:creator>
      <dc:date>2019-08-02T18:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Linux driver module compile needs Linux headers</title>
      <link>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918751#M4385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On my machine, the directory valid for KDIR is &amp;lt;LSDK_INSTALL_DIR&amp;gt;/build/linux/linux/arm64/LS/output/LSDK-19.06-V4.19. I've tried it with several off-kernel modules before posting this and all of them succeeded . I do not have LSDK 19.03&lt;/P&gt;&lt;P&gt;by hand but it should be similar. If that doesn't work for you, make sure flex-builder builds the kernel successfully (flex-builder -c linux ). Also, after a successful kernel build, there should be kernel headers under build/images/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2019 13:11:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Linux-driver-module-compile-needs-Linux-headers/m-p/918751#M4385</guid>
      <dc:creator>bpe</dc:creator>
      <dc:date>2019-08-13T13:11:40Z</dc:date>
    </item>
  </channel>
</rss>

