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