0

Can anyone help me understand the usage of PKG_NAME variable in yocto recipes. How do we determine its value if we are downloading a package from a certain URI.

kdopen
  • 8,032
  • 7
  • 44
  • 52
shery6405
  • 105
  • 2
  • 13

1 Answers1

0

As far as I know, there is no standard variable called PKG_NAME in bitbake recipes. So I presume you mean PN.

The meaning of PN is given in the Yocto reference manual

This variable can have two separate functions depending on the context: a recipe name or a resulting package name.

PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package. The name is normally extracted from the recipe file name. For example, if the recipe is named expat_2.0.1.bb, then the default value of PN will be "expat".

The variable refers to a package name in the context of a file created or produced by the OpenEmbedded build system.

If applicable, the PN variable also contains any special suffix or prefix. For example, using bash to build packages for the native machine, PN is bash-native. Using bash to build packages for the target and for Multilib, PN would be bash and lib64-bash, respectively.

Thus, within a recipe its value will usually be the name of the bitbake recipe file, less any version numbering.

It has no real relationship to the SRC_URI variable except that there is, behind the scenes, a variable named SRC_URI_pn-${PN}

kdopen
  • 8,032
  • 7
  • 44
  • 52