[yocto]yocto日志文件

日志文件

通用日志文件

  • bitbake把通用日志文件存储在由LOG_DIR变量指定的目录中。
  • 默认 LOG_DIR = "${TMPDIR}/log"
WARNING: You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"                              //bitbake版本号
BUILD_SYS            = "x86_64-linux"                       //构建系统的类型(使用的构建工具)
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "aarch64-poky-linux"                //目标构建系统的类型
MACHINE              = "xxxx"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0.6"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa53 crypto" //针对目标CPU架构的优化参数
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "HEAD:9006ef9075811a541ada61c509346f04241f40d3"   //层的提交ID
meta-oecore          = "HEAD:76ddcd64e327b6b840804c04f62cb9e6e81d07ef"
meta-oe              
meta-python          
meta-multimedia      = "HEAD:aa20821f171471cd59c38a3d4b1c3cbb5d90b311"
meta-selinux         = "HEAD:a401f4b2816a0b41ce8d9351542658c721935bcd"
meta-ambabsp         
meta-ambalib         
meta-ambaapp         
meta-thirdparty      
meta-external        = "HEAD:0fbffff03e295a026bb4522874ef0a990e4ba658"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.7/x86_64-nativesdk-libc-3.7.tar.xz;sha256sum=b110bf2e10fe420f5ca2f3ec55f048ee5f0a54c7e34856a3594e51eb2aea0570 (will check PREMIRRORS first)
Sstate summary: Wanted 22 Local 0 Mirrors 22 Missed 0 Current 0 (100% match, 0% complete)
NOTE: Executing Tasks

任务日志文件

  • bitbake为每个菜谱的每个文件创建日志文件
  • T变量指定输出路径 T = "${WORKDIR}/tmp"
    • 日志文件被存储到根据其执行菜谱的包名命名的子目录中
    • temp/work/cortexa53-crypto-poky-linux/speexdsp/1.2.0-r0/temp/log.do_package_write_rpm_setscene
  • clear任务日志路径 T_task_clean = "${LOGDIR}/cleanlogs/{PN}"
    • 因为clean任务会删除工作目录和其子目录,所以日志保存路径特殊

增加打印信息在配方文件中

打印消息级别

  • Plain:完全按照传递的方式记录消息而不带任何额外信息
  • Debug:记录前缀了DEBUG:的消息
  • Note:通知
  • Warn:它们不导致构建失败
  • Error:构建可以继续直到没有需要构建的任务
  • Fatal:致命条件使得bitbake在消息已经被记录后立即终止构建过程

bitbake的调试级别是通过增加-D参数到bitbake的命令行来设置的

  • 普通消息永远不会打印到控制台
bitbake -D <target>
bitbake -DD <target>
bitbake -DDD <target>

配方文件使用

  • python
    • python函数作为bitbake库的一部分实现
      python do_configure(){
      	bb.debug(1, "debug")
      	bb.fatal("fatal")
      } 
      
  • shell
    • shell函数是由logging.bbclass实现的,logging.bbclass是由OpenEmbedded核心元数据层提供的
      	do_configure(){
      		bbdebug 1 "debug"
      		bbfatal "fatal"
      	} 
      

任务执行

列出目标菜谱任务清单

bitbake linux-xxxx -c listtasks
NOTE: Executing Tasks
do_build                        Default task for a recipe - depends on all other normal tasks required to 'build' a recipe
do_buildclean                   
do_bundle_initramfs             Combines an initial ramdisk image and kernel together to form a single image
do_checkuri                     Validates the SRC_URI value
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_compile_kernelmodules        Compiles loadable modules for the Linux kernel
do_config_analysis
do_configure                    Configures the source by enabling and disabling any build-time and configuration options for the software being built
do_deploy                       Writes deployable output files to the deploy directory
do_deploy_source_date_epoch
do_devshell                     Starts a shell with the environment set up for development/debugging
do_diffconfig                   Compares the old and new config files after running do_menuconfig for the kernel
do_fetch                        Fetches the source code
do_install                      Copies files from the compilation directory to a holding area
do_kernel_configme              Assembles the kernel configuration for a linux-yocto style kernel
do_kernel_link_images           Creates a symbolic link in arch/$arch/boot for vmlinux and vmlinuz kernel images
do_kernel_metadata
do_kernel_version_sanity_check
do_listtasks                    Lists all defined tasks for a target
do_menuconfig                   Runs 'make menuconfig' for the kernel
do_package                      Analyzes the content of the holding area and splits it into subsets based on available packages and files
do_package_qa                   Runs QA checks on packaged files
do_package_write_rpm            Creates the actual RPM packages and places them in the Package Feed area
do_packagedata                  Creates package metadata used by the build system to generate the final packages
do_populate_lic                 Writes license information for the recipe that is collected later when the image is constructed
do_populate_sysroot             Copies a subset of files installed by do_install into the sysroot in order to make them available to other recipes
do_prepare_recipe_sysroot
do_pydevshell                   Starts an interactive Python shell for development/debugging
do_savedefconfig                Creates a minimal Linux kernel configuration file
do_shared_workdir
do_sizecheck                    Checks the size of the kernel image against KERNEL_IMAGE_MAXSIZE (if set)
do_strip                        Strips unneeded sections out of the Linux kernel image
do_symlink_kernsrc
do_transform_kernel
do_unpack                       Unpacks the source code into a working directory
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值