How patching works in yocto

前端 未结 1 1174
野趣味
野趣味 2021-01-05 16:16

I am using BBB to understand the yocto-project. I am not sure how patching works. This is my project directory

├── meta-testlayer
├── poky

相关标签:
1条回答
  • 2021-01-05 16:26

    First, create the patch:

    diff -u helloworld.c newhelloworld.c > helloworld.patch
    

    or using Git (replace x by the number of commits you want to extract a patch):

    git format-patch -x
    

    Two ways to apply the patch:

    • Put it into your test-layer, add a line on your .bb file: SRC_URI += " file://example.patch "

    • Put it in another layer, but it's only needed if it isn't your layer (meta-oe, meta-fsl, meta-qt...)

    For this case, use in your .bbappend file:

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    SRC_URI += " file://helloworld.patch "
    
    0 讨论(0)
提交回复
热议问题