yocto:bitbake单独编译某个模块的方法 |
您所在的位置:网站首页 › 如何编译内核模块 › yocto:bitbake单独编译某个模块的方法 |
在yocto编译环境中如果想单独编译某个模块 可以在已经搭建好的yocto编译环境中使用如下命令 Yocto中对于不同的Package,有不同的task,即可以执行不同的操作,有一些是所有包共通的,例如clean,build等。 我们可以使用下面命令来查看一个包都有哪些可执行的task: bitbake Package -c listtasks如:bitbake core-image-weston -c listtasks 有以下结果: Initialising tasks: 100% |#################################################################################################################################################################| Time: 0:00:07 NOTE: Executing RunQueue Tasks do_build Default task for a recipe - depends on all other normal tasks required to 'build' a recipe do_checkuri Validates the SRC_URI value do_checkuriall Validates the SRC_URI value for all recipes required to build a target do_clean Removes all output files for a target do_cleanall Removes all output files, shared state cache, and downloaded source files for a target do_cleansstate Removes all output files and shared state cache for a target do_compile Compiles the source in the compilation directory do_configure Configures the source by enabling and disabling any build-time and configuration options for the software being built do_devpyshell Starts an interactive Python shell for development/debugging do_devshell Starts a shell with the environment set up for development/debugging do_dtv_checking do_fetch Fetches the source code do_fetchall Fetches all remote sources required to build a target do_image do_image_complete do_image_complete_setscene (setscene version) do_image_ext4 do_image_qa do_image_qa_setscene (setscene version) do_image_tar do_install Copies files from the compilation directory to a holding area do_listtasks Lists all defined tasks for a target do_package Analyzes the content of the holding area and splits it into subsets based on available packages and files do_package_qa_setscene Runs QA checks on packaged files (setscene version) do_package_setscene Analyzes the content of the holding area and splits it into subsets based on available packages and files (setscene version) do_package_write_rpm Creates the actual RPM packages and places them in the Package Feed area do_package_write_rpm_setscene Creates the actual RPM packages and places them in the Package Feed area (setscene version) do_packagedata Creates package metadata used by the build system to generate the final packages do_packagedata_setscene Creates package metadata used by the build system to generate the final packages (setscene version) do_patch Locates patch files and applies them to the source code do_populate_lic Writes license information for the recipe that is collected later when the image is constructed do_populate_lic_setscene Writes license information for the recipe that is collected later when the image is constructed (setscene version) do_populate_sdk Creates the file and directory structure for an installable SDK do_populate_sdk_ext do_populate_sysroot_setscene Copies a subset of files installed by do_install into the sysroot in order to make them available to other recipes (setscene version) do_prepare_recipe_sysroot do_rootfs Creates the root filesystem (file and directory structure) for an image do_rootfs_wicenv do_sdk_depends do_unpack Unpacks the source code into a working directory do_vp9_checking NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.说明上面可以支持的CMD。 接着使用如下命令: bitbake -b bbfile -c CMD(before list) bitbake -b pulseaudio_10.0 -c compile bitbake -b pulseaudio_10.0 -c clean bitbake -b pulseaudio_10.0 -c build bitbake -b pulseaudio_10.0 -c configure bitbake -b pulseaudio_10.0 -c compile bitbake -b pulseaudio_10.0 -c install一般要在yocto的编译环境中打patch的方式如下: 1,bbappend文件的编译方式 在poky目录下的meta/conf/有个layer.conf配置文件 # We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" # We have recipes-* directories, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" BBFILES += "${LAYERDIR}/recipes-*/*/*.bbappend"其中BBFILES为需要参加编译的文件。 2,基于模块的源码的patch 把patch文件放在模块的放patch的目录下 找到该模块的bb文件,参照已有的打patch的方式,添加自己的patch。 比如: SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ file://0001-padsp-Make-it-compile-on-musl.patch \ file://0001-client-conf-Add-allow-autospawn-for-root.patch \ file://pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch \ file://volatiles.04_pulse \ file://fix-add-connectionid-in-simple.patch\(新增)
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |