[yocto] NooB: applying new patches to older files, where do I find the older files?

Randy MacLeod randy.macleod at windriver.com
Wed Oct 30 17:52:00 PDT 2019


On 10/30/19 8:16 AM, R wrote:
> Hello List,
> 
> First I'm working on a unsupported distro (Manjaro) and try to get an 
> older version (2.7.1) of poky working. I have ask a question before and 
> Ross Burton pointed me in the direction of a patch.
> Now I'm trying to apply that patch, however the patch is for a newer 
> version of the original files, so I need to make my own patch for the 
> older version of these files.
> (reason: WARNING: Some of the context lines in patches were ignored. 
> This can lead to incorrectly applied patches.)
> 
> The patch says: the file to be patch is e.g. /linux-user/syscall.c
> My question is where can I find the original syscall.c before any 
> patches are applied to it?

Hi Robert,

This file and the patch are for the qemu package.

You can run:
$ bitbake -c patch qemu-native <--- host build
or
$ bitbake -c patch qemu <--- target build
to get all the patches that are listed in the qemu recipe in poky:
    meta/recipes-devtools/qemu/qemu_3.1.1.1.bb
and
    meta/recipes-devtools/qemu/qemu.inc
applied to unpacked source.

The patched source will be in (this is on master branch):
 
<build_area>/tmp-glibc/work/x86_64-linux/qemu-native/4.1.0-r0/qemu-4.1.0/linux-user/syscall.c

poky might just be /tmp/ instead of /tmp-glibc/

In my case the log of the patching is in:
    tmp-glibc/work/x86_64-linux/qemu-native/4.1.0-r0/temp/log.do_patch

> 
> Just to be complete: I have tried the latest warrior branch and that 
> worked fine. My objective is not just to get it working be also to get a 
> grip on how the system works :-)

Super.

Have you looked at:
    https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html

and perhaps:
 
https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#finding-the-temporary-source-code

will be useful now.

Manipulating patches by hand can be tedious. There's a tool
called wiggle:
    https://linux.die.net/man/1/wiggle
which can help but may be too much for you to deal with initially.

Actually, I suggest that you build on a supported distro initially
to understand the basic workflow and then decide if you want to figure
out how to make Arch/Manjaro work.

../Randy

> Thanks,
> Robert.


-- 
# Randy MacLeod
# Wind River Linux


More information about the yocto mailing list