Yocto:bitbake命令用于重新生成所有RPM文件

时间:2017-04-09 18:43:24

标签: linux embedded-linux rpm yocto bitbake

我想创建一些可用空间并删除build / tmp / deploy / rpm /中的所有目录,认为yocto会检测到它并在下一次bitbake调用时重新创建它们......这是一个错误! :(

以下是比特错误:

bitbake <image_name>
[...]
ERROR: ... do_rootfs: minicom not found in the base feeds (<image_name> corei7-64-intel-common corei7-64 core2-64 x86_64 noarch any all).
[...list of every package...]

有没有办法强制使用bitbake重新生成每个rpms? 使用bitbake -f -c package_write_rpm <package>强制重新生成有效,但我没有找到一次完成所有操作的命令。

我尝试清理原生rpm包的状态,认为它可能检测到它并使rpm文件状态无效,但没有运气:

bitbake -f -c cleanall nativesdk-rpm nativesdk-rpmresolve rpmresolve-native rpm-native
bitbake <image_name>

我也认为这会奏效,但它并没有:

bitbake -f -c package_write_rpm <image_name>

我会尝试使用bitbake-layers show-recipesxargs来破解某些内容,但使用正确的bitbake命令会很酷。

我正在使用Yocto 2.1(Krogoth)。

谢谢!

1 个答案:

答案 0 :(得分:2)

I ended up doing the following script and use bitbake dependency tree to get the list of packages (thanks to this yocto/bitbake reference page):

# bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq | grep -v "}" | grep -v cross | grep -v gcc | grep -v glibc > packages-list.txt
# cat packages-list.txt | xargs bitbake -f -c package_write_rpm

Maybe there is a more straightforward solution ? For now this worked.