<div dir="ltr"><div>Sorry I am fairly new to bitbake.  How do I apply a patch?  Why do I have to apply a patch as opposed to just editing corresponding files (I know that is probably a dumb question but again I am very new to bitbake)?  Khem Raj did mention a patch to fix the problem:</div><div><br></div><div><a href="https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2">https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2</a></div><div><br></div><div>Would I be able to somehow take the patch from that website and apply it to my project?  Though I&#39;d like to mention again it seems like that patch is trying to change 
<span>&quot;#!/bin/awk -f&quot;</span> to 
<span>&quot;#!/usr/bin/awk -f&quot; in the ver_linux file.  But the ver_linux files in my project look very different from the ver_linux file in the patch (see example of my ver_linux file: <a href="https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677">https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677</a>) and has <span>&quot;<span><span>#!</span>/bin/sh&quot;</span></span> for its #! line instead.  In that case, would the patch Khem Raj mentioned even work for my project?  Again I&#39;m new to bitbake so I apologize for my questions being naive.</span>

</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 13, 2019 at 12:31 PM Mark Hatle &lt;<a href="mailto:mark.hatle@kernel.crashing.org">mark.hatle@kernel.crashing.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Bitbake inspects the binaries and looks at the #! line.  You need to change the<br>
line itself (via a patch) to /usr/bin/awk, and then it will pick up the<br>
dependency automatically on a rebuild.<br>
<br>
--Mark<br>
<br>
On 11/13/19 12:14 PM, Wayne Li wrote:<br>
&gt; On further inspection of the older image my coworker made, it looks like awk is<br>
&gt; located at &quot;/usr/bin/awk&quot;.  I see this by just doing a &quot;which awk&quot; in the<br>
&gt; console of the T4240 RDB when the old image is loaded.  So it looks like the<br>
&gt; most likely case is that Khem Raj is correct and that bitbake is expecting awk<br>
&gt; to be in &quot;/bin&quot; when awk is actually in &quot;/usr/bin&quot;.  In that case, I need to<br>
&gt; know where the line telling bitbake to look for awk in the &quot;/bin&quot; directory is.<br>
&gt; <br>
&gt; On Wed, Nov 13, 2019 at 12:02 PM Wayne Li &lt;<a href="mailto:waynli329@gmail.com" target="_blank">waynli329@gmail.com</a><br>
&gt; &lt;mailto:<a href="mailto:waynli329@gmail.com" target="_blank">waynli329@gmail.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;     I&#39;d like also like to mention that my main concern with the ver_linux files<br>
&gt;     that I found in my project was that the shebang line was &quot; #!/bin/sh&quot;<br>
&gt;     instead of &quot;#!/bin/awk -f&quot; which is the shebang line in the ver_linux file<br>
&gt;     in the patch.  The patch wants to change the shebang line from &quot;#!/bin/awk<br>
&gt;     -f&quot; to  &quot;#!/usr/bin/awk -f&quot; so I&#39;m not sure how that change would translate<br>
&gt;     when I&#39;m working with the shebang line &quot;#!/bin/sh&quot;.  Or perhaps Yocto has<br>
&gt;     changed since that patch was posted and maybe the place /bin/awk is<br>
&gt;     specified is different?<br>
&gt; <br>
&gt;     On Wed, Nov 13, 2019 at 11:51 AM Wayne Li &lt;<a href="mailto:waynli329@gmail.com" target="_blank">waynli329@gmail.com</a><br>
&gt;     &lt;mailto:<a href="mailto:waynli329@gmail.com" target="_blank">waynli329@gmail.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;         So after further investigation, I&#39;m fairly sure awk is actually present<br>
&gt;         in the target image.  Here are my reasons why I feel that this is the case:<br>
&gt; <br>
&gt;         -I looked at the busybox menuconfig GUI that comes up when I run<br>
&gt;         &quot;bitbake -c menuconfig busybox&quot; and it says awk is built-in. <br>
&gt;         -I looked at various def-config files I found by just doing a &quot;grep -rn<br>
&gt;         &quot;CONFIG_AWK&quot;&quot; and found that CONFIG_AWK seems to have been enabled<br>
&gt;         throughout the project (there was the line CONFIG_AWK=y uncommented in<br>
&gt;         the various def-config files I mentioned). <br>
&gt;         -I have an older version of the target image that my coworker (who has<br>
&gt;         since left the company) created.  I just need to rebuild this image<br>
&gt;         because I am trying to add some kernel modules to the image.  When I run<br>
&gt;         the command &quot;awk&quot; in the console for the T4240 RDB when the older<br>
&gt;         version of the image is loaded, I do see the gawk help info come up.<br>
&gt;         This shows awk is present in the older image.<br>
&gt; <br>
&gt;         But looking at what Khem Raj mentioned, perhaps bitbake is just not<br>
&gt;         finding the awk because it&#39;s actually in /usr/bin when bitbake expects<br>
&gt;         it to be in /bin?  Though I am a little confused about the link you<br>
&gt;         sent, Khem Raj.  How do exactly do I apply this patch?  I&#39;m assuming we<br>
&gt;         have to change the file ver_linux?  I did a &quot;find . -name &quot;ver_linux&quot;&quot;<br>
&gt;         and I see multiple results:<br>
&gt; <br>
&gt;         bash-4.2$ find . -name &quot;ver_linux&quot;<br>
&gt;         ./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux<br>
&gt;         ./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux<br>
&gt;         ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux<br>
&gt;         ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux<br>
&gt;         ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux<br>
&gt;         ./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux<br>
&gt;         ./build_t4240rdb/tmp/work/ppc64e6500-fslmllib64-linux/lib64-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux<br>
&gt;         ./build_t4240rdb/tmp/work/ppce6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux<br>
&gt;         ./build_t4240rdb/tmp/work-shared/t4240rdb/kernel-source/scripts/ver_linux<br>
&gt; <br>
&gt;         Now the build I&#39;m working on is build_t4240rdb-64b so the last three<br>
&gt;         results in that search probably don&#39;t matter.  Though there are still<br>
&gt;         six more results for when I search ver_linux.  So I&#39;m not sure which one<br>
&gt;         I need to change.  Moreover, all of the ver_linux files I found more or<br>
&gt;         less look like the following:<br>
&gt; <br>
&gt;         <a href="https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677" rel="noreferrer" target="_blank">https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677</a><br>
&gt; <br>
&gt;         Which seems to be very different from the ver_linux file mentioned in<br>
&gt;         the patch.  This further confuses me on how to apply the patch. <br>
&gt; <br>
&gt;         Or maybe do you guys think maybe the patch isn&#39;t the solution here? <br>
&gt;         Maybe there&#39;s some other reason bitbake isn&#39;t finding the awk?<br>
&gt; <br>
&gt;         -Thanks!, Wayne Li<br>
&gt; <br>
&gt;         On Wed, Nov 13, 2019 at 10:57 AM Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a><br>
&gt;         &lt;mailto:<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;             On Wed, 2019-11-13 at 10:33 +0200, Adrian Bunk wrote:<br>
&gt;             &gt; On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:<br>
&gt;             &gt; &gt; Dear Yocto Developers,<br>
&gt;             &gt; &gt;<br>
&gt;             &gt; &gt; I&#39;m trying to to build a Yocto kernel for a T4240 RDB.  When I run<br>
&gt;             &gt; &gt; &quot;bitbake<br>
&gt;             &gt; &gt; fsl-image-full&quot; to build the entire linux image, I get an error<br>
&gt;             &gt; &gt; that says<br>
&gt;             &gt; &gt; &quot;Can&#39;t install kernel-devsrc-1.0-r0@t4240rdb_64b: no package<br>
&gt;             &gt; &gt; provides<br>
&gt;             &gt; &gt; /bin/awk&quot;.  Here&#39;s the entire error print that I see:<br>
&gt;             &gt; &gt;<br>
&gt;             &gt; &gt; <a href="https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c" rel="noreferrer" target="_blank">https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c</a><br>
&gt;             &gt; &gt;<br>
&gt;             &gt; &gt; Anyway I&#39;m confused about this error because /bin/awk does<br>
&gt;             &gt; &gt; exist.  Like if<br>
&gt;             &gt; &gt; I run &quot;/bin/awk&quot; in the console I see help info come up describing<br>
&gt;             &gt; &gt; how to<br>
&gt;             &gt; &gt; use a program called &quot;gawk&quot;.  Why can&#39;t bitbake find /bin/awk<br>
&gt;             &gt; &gt; then?  Or am<br>
&gt;             &gt; &gt; I misunderstanding what this error is trying to say?  I mean I&#39;m<br>
&gt;             &gt; &gt; assuming<br>
&gt;             &gt; &gt; it&#39;s just not able to find /bin/awk but maybe the error means<br>
&gt;             &gt; &gt; something<br>
&gt;             &gt; &gt; else?  Or maybe /bin/awk is actually relative to some path?  Let me<br>
&gt;             &gt; &gt; know<br>
&gt;             &gt; &gt; your thoughts.<br>
&gt;             &gt;<br>
&gt;             &gt; /bin/awk is missing on your target image that will run on the T4240<br>
&gt;             &gt; RDB.<br>
&gt;             &gt;<br>
&gt;             &gt; The smallest implementation is to enable CONFIG_AWK in your busybox<br>
&gt;             &gt; config.<br>
&gt;             &gt;<br>
&gt; <br>
&gt;             import something like below patch into your kernel will help too<br>
&gt; <br>
&gt;             <a href="https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2" rel="noreferrer" target="_blank">https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2</a><br>
&gt; <br>
&gt;             &gt; &gt; -Thanks!, Wayne Li<br>
&gt;             &gt;<br>
&gt;             &gt; cu<br>
&gt;             &gt; Adrian<br>
&gt;             &gt;<br>
&gt;             &gt; --<br>
&gt;             &gt;<br>
&gt;             &gt;        &quot;Is there not promise of rain?&quot; Ling Tan asked suddenly out<br>
&gt;             &gt;         of the darkness. There had been need of rain for many days.<br>
&gt;             &gt;        &quot;Only a promise,&quot; Lao Er said.<br>
&gt;             &gt;                                        Pearl S. Buck - Dragon Seed<br>
&gt;             &gt;<br>
&gt; <br>
&gt; <br>
</blockquote></div>