制作yocto的recipe的补丁的方法

Yocto里的一个常见任务是给某个recipe打补丁。有很多方法给recipe打补丁的方法。这里介绍一种比较简单快速的方法。这里以虚拟的recipe_example为例,并且,假设源代码是以git的方式取到的。

  1. 解压源代码

    bitbake -c unpack recipe_example

  2. 新建文件夹

    mkdir ~/local_recipe_example
    .

  3. 将源代码放到新建的文件夹里

    cp BUILD目录/tmp/work/(取决于recipe_example的类型)/recipe_example/主版号.副版本号-r修订号/git/. ~/local_recipe_exmaple -a

  4. 进入文件夹重置并清除git

    cd ~/local_recipe_example
    git reset --hard
    git clean -fdx

  5. 做必要的修改

  6. 生成补丁文件

    cd ~/local_recipe_example
    git diff > mypatch.diff

  7. 将补丁文件放入到recipe_example所在的yocto源代码中

    cd recipe_example所在的yocto源代码中的位置
    mkdir files
    cp ~/local_recipe_example/mypatch.diff files

  8. 新建一个bbappend文件,假设原来的recipe-example是由recipe-example.bb定义的,则将新建文件recipe-example.bbappend文件。该文件内容为:

    SRC_URI += “file://mypatch.diff”

以上就是制作yocto的recipe的补丁的方法。希望可以帮到你。

发布了31 篇原创文章 · 获赞 0 · 访问量 9607

猜你喜欢

转载自blog.csdn.net/jumpingpig/article/details/104334173
今日推荐