cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
juha
Visitor
Visitor
271 Views
Registered: ‎03-23-2021

patched code is not used to compile package

Jump to solution

Hi, I'm trying to patch a Petalinux 2019.1 core package (weston) and it seems my patch is not used in the package build, despite being applied.

I'm trying to patch this package:
/opt/petalinux/components/yocto/source/arm/layers/core/meta/recipes-graphics/wayland/weston_5.0.0.bb

I've unpacked the weston_5.0.0.tar.gz and created my patch with git format-patch and then put it into my user layer at together with a weston_5.0.0.bbappend file:

 

$ ls -l petalinux/project-spec/meta-user/recipes-apps/weston/
total 8
-rw-rw-r-- 1 juha juha 1807 Mar 25 14:36 0001-fbdev-added-ABGR-format-detection.patch
-rw-rw-r-- 1 juha juha 108 Mar 26 13:24 weston_5.0.0.bbappend

 

 

These are the contents of the weston_5.0.0.bbappend file:

 

SRC_URI += "file://0001-fbdev-added-ABGR-format-detection.patch"

FILESEXTRAPATHS_prepend := "${THISDIR}/:"

 

 

Now, when I rebuild the package with

 

petalinux-build -c weston -x do_cleanall && petalinux-build -c weston

 

it seems like everything is working, but when I rebuild the rootfs image and run weston on my hardware, the patched code is not running.

 

I checked the following:

1. The patch log file looks ok:

 

$ cat petalinux/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/weston/5.0.0-r0/temp/log.do_patch
...
NOTE: Applying patch '0001-fbdev-added-ABGR-format-detection.patch' (../project-spec/meta-user/recipes-apps/weston/0001-fbdev-added-ABGR-format-detection.patch)
...

 

 

2. Interrupting the weston package build before cleanup and checking the patched sources:

 

$ cat petalinux/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/weston/5.0.0-r0/weston-5.0.0/libweston/compositor-fbdev.c

 

The patch is applied correctly...

 

3. Intentionally adding a syntax error into the patch doesn't lead to a compile error. So it seem that the source file is patched correctly, but not used to compile the package.

 

My questions:
- Does my weston_5.0.0.bbappend file look ok?
- Is the package compiled from different sources than the one I patched?
- Do I have to change any additional settings?

0 Kudos
1 Solution

Accepted Solutions
juha
Visitor
Visitor
144 Views
Registered: ‎03-23-2021

It turned out that the feature I was trying to patch wasn't enabled anymore after adding the patch despite being enabled in the default petalinux installation.
After adding

 

PACKAGECONFIG_append = " fbdev"

 

to my .bbappend file the patched source file was included in the build.

View solution in original post

2 Replies
thenumberdevil
Explorer
Explorer
177 Views
Registered: ‎04-21-2020

Hi @sandeepg ,

                            Could you please guide us here?.

                       

0 Kudos
juha
Visitor
Visitor
145 Views
Registered: ‎03-23-2021

It turned out that the feature I was trying to patch wasn't enabled anymore after adding the patch despite being enabled in the default petalinux installation.
After adding

 

PACKAGECONFIG_append = " fbdev"

 

to my .bbappend file the patched source file was included in the build.

View solution in original post