Bitbake - 工具bitbake-layers介绍

在OpenEmbedded的发布套件中,使用bitbake-layers命令可以显示出现有的layers和priority:

$ bitbake-layers show-layers

layer                 path                                      priority

==========================================================================

meta                  /local/openstlinux-18-01-23/layers/openembedded-core/meta  5

meta-oe               /local/openstlinux-18-01-23/layers/meta-openembedded/meta-oe  6

这个bitbake-layers工具位于openembedded-core这个layer中,用来进行与layers相关的操作。

比如可以执行下列操作:

  • 查看当前配置中的layers列表

  • 将一个已存在的layer加入到现有配置中

  • 创建一个新layer

此工具的help信息:

$ bitbake-layers --help

NOTE: Starting bitbake server...

usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] <subcommand> ...

BitBake layers utility

optional arguments:

  -d, --debug           Enable debug output

  -q, --quiet           Print only errors

  -F, --force           Force add without recipe parse verification

  --color COLOR         Colorize output (where COLOR is auto, always, never)

  -h, --help            show this help message and exit

subcommands:

  <subcommand>

    show-layers         show current configured layers.

    show-overlayed      list overlayed recipes (where the same recipe exists in another layer)

    show-recipes        list available recipes, showing the layer they are provided by

    show-appends        list bbappend files and recipe files they apply to

    show-cross-depends  Show dependencies between recipes that cross layer boundaries.

    layerindex-fetch    Fetches a layer from a layer index along with its dependent layers, and adds them to conf/bblayers.conf.

    layerindex-show-depends

                        Find layer dependencies from layer index.

    add-layer           Add one or more layers to bblayers.conf.

    remove-layer        Remove one or more layers from bblayers.conf.

    flatten             flatten layer configuration into a separate output directory.

    create-layer        Create a basic layer

Use bitbake-layers <subcommand> --help to get help on a specific command

创建新layer后的建议操作:

  • 更新README文件

  • 更新conf/layer.conf文件中一些配置项,比如priority优先级

  • 针对你的发布需要进行修改或添加组件

创建一个新layer:

要创建的话,需要指定新layer的位置,名字,而layer的priority设置是可选的。

举例,以priority 7创建一个layer:

$ bitbake-layers create-layer --priority 7 ../layers/meta-st/meta-my-custo-layer

NOTE: Starting bitbake server...

Add your new layer with 'bitbake-layers add-layer ../layers/meta-st/meta-my-custo-layer'

$ cd ../layers/meta-st

$ tree meta-my-custo-layer

meta-my-custo-layer

├── conf

│   └── layer.conf

├── COPYING.MIT

├── README

└── recipes-example

    └── example

        └── example.bb

3 directories, 4 files

添加完成,可以使用show-layers来查看添加是否成功。

其他使用方式:

1,删除一个layer,使用remove-layer。

2,添加一个已有layer,使用add-layer。

3,查看当前配置中的recipes:show-recipes

列出所有的targets/recipes(.bb files):

$ bitbake-layers show-recipes

列出符合筛选条件的recipes:

$ bitbake-layers show-recipes "*libc*"

参考:

1,How to create a new open embedded layer - stm32mpu

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜流冰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值