一些变量

以TI的 linux-ti-staging 为例子,说明一些变量的基本含义.

D:表示编译生成镜像的目录,即构建成果,该目录下的产物,可用于共享给其他配方,用于共享的成果会被copy到SYSROOT_DESTDIR目录.

bitbake linux-ti-staging -e | grep ^D
D="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git/image"

SYSROOT_DESTDIR:该目录最终会被放置到共享区,默认为 /home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/sysroots-components/,其他配方需要共享成果,就去这个sysroots-components目录去找.

bitbake linux-ti-staging -e | grep ^SYSROOT_DESTDIR
SYSROOT_DESTDIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git/sysroot-destdir"

S:表示解压后(包括打补丁后)的源码目录

bitbake linux-ti-staging -e | grep ^S
S="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git/git"

B:编译目录

bitbake linux-ti-staging -e | grep ^B
B="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git/build"

TMPDIR:bitbake编译过程中的tmp目录

bitbake linux-ti-staging -e | grep ^TMPDIR
TMPDIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc"

PACKAGE_ARCH:包的架构名

bitbake linux-ti-staging -e | grep ^PACKAGE_ARCH
PACKAGE_ARCH="am62xx_evm"
PACKAGE_ARCHS="all any noarch aarch64 am62xx_evm"

TARGET_OS:目标操作系统类型

bitbake linux-ti-staging -e | grep ^TARGET_OS
TARGET_OS="linux"

PN:构建包的配方名

bitbake linux-ti-staging -e | grep ^PN
PN="linux-ti-staging"

PV:配方版本

bitbake linux-ti-staging -e | grep ^PV
PV="6.6.32+git"

PR:配方的修订版本

bitbake linux-ti-staging -e | grep ^PR
PR="r0_tisdk_5_edgeai_0_edgeai_8"

BP:PN+PV

bitbake linux-ti-staging -e | grep ^BP
BP="linux-ti-staging-6.6.32+git"
BPN="linux-ti-staging"

WORKDIR:软件包编译的工作目录

bitbake linux-ti-staging -e | grep ^WORKDIR
WORKDIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git"
WORKDIR_PKGDATA="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/arago-tmp-default-glibc/work/am62xx_evm-oe-linux/linux-ti-staging/6.6.32+git/pkgdata-sysroot"

 DL_DIR:软件包下载存放目录

bitbake linux-ti-staging -e | grep ^DL_DIR
DL_DIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build/../downloads"

THISDIR:bb文件所在目录

bitbake linux-ti-staging -e | grep ^THISDIR
THISDIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux"

SRC_URI:源文件列表

bitbake linux-ti-staging -e | grep ^SRC_URI
SRC_URI=" git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git;protocol=https;branch=ti-linux-6.6.y             file://defconfig      file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch     file://0001-vt-conmakehash-improve-reproducibility.patch     file://0001-pnmtologo-use-relocatable-file-name.patch       file://0001-remoteproc-k3-dsp-assert-reset-in-probe.patch "

FILESPATH:本地文件目录集合,bitbake查找SRC_URI的 file:// 时会去FILESPATH指定的目录去查找file。FILESPATH的默认值在base.bbclass中定义,使用FILESEXTRAPATHS扩展FILESPATH

bitbake linux-ti-staging -e | grep ^FILESPATH
FILESPATH="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/arago:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/am62xx:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/k3:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/ti-soc:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/bsp-ti-6_6:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/aarch64:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6.32+git/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/files/"

FILESEXTRAPATHS:扩展FILESPATH

bitbake linux-ti-staging -e | grep ^FILESEXTRAPATHS
FILESEXTRAPATHS="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai/recipes-kernel/linux/linux-ti-staging/am62xx-evm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-6.6:__default:"

 DEPENDS:构建依赖

bitbake linux-ti-staging -e | grep ^DEPENDS
DEPENDS="pkgconfig-native   virtual/aarch64-oe-linux-binutils virtual/aarch64-oe-linux-gcc kmod-native bc-native bison-native    gmp-native libmpc-native openssl-native ti-k3-secdev-native u-boot-tools-native dtc-native"

RDEPENDS:运行时依赖

bitbake linux-ti-staging -e | grep ^RDEPENDS
RDEPENDS:kernel="kernel-base (= 6.6.32+git-r0_tisdk_5_edgeai_0_edgeai_8)"
RDEPENDS:kernel-image="  kernel-image-image (= 6.6.32+git-r0_tisdk_5_edgeai_0_edgeai_8) kernel-image-fitimage (= 6.6.32+git-r0_tisdk_5_edgeai_0_edgeai_8)"
RDEPENDS:linux-ti-staging-staticdev="linux-ti-staging-dev (= 6.6.32+git-r0_tisdk_5_edgeai_0_edgeai_8)"

 TOPDIR:全局build目录

bitbake linux-ti-staging -e | grep ^TOPDIR
TOPDIR="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build"

BBPATH:工程所有bb文件和bbappend文件的路径,使用:隔开,有点像环境变量的做法

BBPATH .= ":${LAYERDIR}"的意思是将 :${LAYERDIR} 追加到 BBPATH 的当前值后面

在meta-**文件夹里的conf/layer.conf中,都会使用以下代码来扩展BBPATH的值

# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"

变量的实际值:

bitbake linux-ti-staging -e | grep ^BBPATH
BBPATH="/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/build:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-tisdk:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arago/meta-arago-distro:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arago/meta-arago-extras:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arago/meta-arago-demos:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arago/meta-arago-test:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-browser/meta-chromium:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-qt5:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-virtualization:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-networking:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-python:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-oe:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-gnome:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-filesystems:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-openembedded/meta-multimedia:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-extras:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-ti/meta-ti-bsp:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arm/meta-arm:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-arm/meta-arm-toolchain:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-clang:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/oe-core/meta:/home/likw/ex1/ti-tisdk-yocto/tisdk/tisdk/sources/meta-edgeai"

 

posted on 2024-11-19 10:56  f1engmin11  阅读(2)  评论(0编辑  收藏  举报

导航