bitbake错误

在OE bitbake配置完毕的情况下,执行bitbake 命令时出现:

 

$ bitbake midinux-image
/home/fedora11/stuff/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated
  import types, sets
ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).


解决办法:
[root@redora11 stuff]# vim /etc/sysctl.conf


增加一句:vm.mmap_min_addr = 0


[root@redora11 stuff]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
vm.mmap_min_addr = 0

 

重新执行bitbake就可以通过。

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

据说和一个安全漏洞有关系,在Linux kernel2.6.*中,空指针的参数设置,可以让本地用户实现root的特权,有人发现了这个问题,后来官方在2.6.32RC中修复了该问题,但是之前内核版本都存在,用户们为了阻止被攻击,就设置Value>0。

 

参考文档:

 

A null-pointer dereference in the Linux kernel allows local users to assume root privileges. Brad Spengler, who claims first discovery, announced that he will present a corresponding exploit during the course of the day.

Concurrent with Spengler's discovery in mid-October, Earl Chew likewise brought attention to the bug in an lkml.org blog . The bug affects all kernel versions in the 2.6 series and was fixed in the upcoming 2.6.32 RC. So far Red Hat is the only distro providing patches for what is now the CVE-2009-3547 advisory. Users of other distros can apply a workaround that sets the pointer to a value higher than zero, which prevents the exploit. Admins can enter

# cat /proc/sys/vm/mmap_min_addr

to read the current pointer value. If larger than zero, no action need be taken, otherwise use the command

# sysctl -w vm.mmap_min_addr="4096"

to set the value to 4096, for example. The value, however, is only good until the next reboot. To give it a more lasting value, users of Debian or its derivatives should use the following commands:

# echo "vm.mmap_min_addr = 4096" > /etc/sysctl.d/mmap_min_addr.conf
# /etc/init.d/procps restart

Users of openSUSE should use the following command instead:

# echo -e "/nvm.mmap_min_addr=4096/n" >> /etc/sysctl.conf

followed by a system reboot.

First indications are that Ubuntu/Kubuntu 9.10 are not affected by the bug, because the initial counter is set to 65535. However, subsequently installed programs such as Wine or Qemu will reset the counter to zero. First tests with Wine installations show this to be evident. The openSUSE distro is potentially the most vulnerable in that the initial counter is also set to zero.

(Thomas Leichtenstern)
<think>好的,我需要处理用户关于“bitbake gbm”的查询。首先,我应该明确用户所指的“gbm”具体是什么。在嵌入式系统和Yocto项目中,GBM通常代表Generic Buffer Management,这是图形栈中的一个关键组件,用于管理缓冲区和与GPU交互。 接下来,我需要考虑BitBake和Yocto项目的关系。BitBake作为构建工具,用于执行任务和元数据,而Yocto项目使用它来构建定制的Linux发行版。因此,用户可能在询问如何在Yocto项目中使用BitBake来构建或处理与GBM相关的组件。 然后,我需要确定用户的具体需求。他们可能是在开发图形相关的应用,如Wayland或OpenGL,需要GBM支持。或者,他们在构建过程中遇到了问题,需要了解如何正确配置BitBake来包含GBM。 接下来,我应该解释如何通过BitBake集成GBM。这可能涉及到修改本地配置文件local.conf,添加相关的DISTRO_FEATURES和IMAGE_INSTALL设置。例如,启用opengl和wayland,并安装必要的软件包如mesa和libgbm。 此外,用户可能需要了解如何验证GBM是否被正确集成到镜像中。这包括检查构建日志,确认软件包是否被包含,以及测试镜像运行时GBM的功能是否正常。 我还需要提醒用户注意可能的依赖关系和配置错误。例如,确保显卡驱动支持GBM,检查DISTRO_FEATURES是否正确启用,以及处理构建过程中可能出现的依赖问题。 最后,我应该总结关键点,帮助用户系统地理解和解决问题,确保他们能够正确使用BitBake来处理GBM相关的构建任务。</think>在Yocto项目开发中,`bitbake gbm` 通常指构建与Generic Buffer Management(通用缓冲区管理)相关的组件。以下分步骤说明关键要点: $$\text{GBM} = \text{Graphics Stack的基础组件}$$ 一、核心概念 1. **GBM定义**:Linux DRM子系统中的抽象层,提供统一的缓冲区管理接口 - 位于显卡驱动(如Mesa)和应用层(如Wayland/Weston)之间 2. **主要功能**: - 显存分配管理:通过`gbm_bo_create`创建缓冲对象 - GPU上下文隔离:保证多进程安全访问GPU - 格式协商:处理不同硬件的像素格式兼容性 二、BitBake构建配置 1. **依赖关系**: ```bitbake DEPENDS = "virtual/libgl libdrm mesa" ``` 2. **典型配方示例**: ```bitbake inherit pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" ``` 三、常见配置步骤 1. 在`local.conf`启用必要特性: ```bash DISTRO_FEATURES:append = " opengl wayland" ``` 2. 安装运行时组件: ```bitbake IMAGE_INSTALL:append = " mesa libgbm wayland" ``` 四、验证方法 1. 构建检查: ```bash bitbake-layers show-recipes | grep gbm ``` 2. 运行时测试: ```bash ls /usr/lib/libgbm.so* # 验证库文件存在 gbm_info # 测试工具(需提前编译) ``` 五、典型问题排查 1. **ERROR: Missing OpenGL支持**: - 检查显卡驱动是否包含在`MACHINE`配置中 - 确认`DISTRO_FEATURES`包含opengl 2. **Undefined symbol: gbm_create_device**: - 检查mesa版本是否≥19.1(要求GBM后端支持) - 验证libgbm.so的符号表:`nm -D /usr/lib/libgbm.so | grep gbm_create` 六、应用场景示例 当构建Weston合成器时,GBM作为关键依赖: ```bitbake DEPENDS = "virtual/egl virtual/libgles2 libgbm" ``` 建议通过`bitbake -c devshell mesa`进入开发环境,直接调试gbm相关API调用。该组件对图形性能影响显著,需根据具体硬件调整缓冲区分配策略。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值