Search code examples
yoctobitbake

What is the difference between BPN and PN?


In bitbake.conf, I found the definition of BPN and PN.

But I wonder the difference between BPN and PN.

Please explain to me with example. thanks


Solution

  • In the context of BitBake, a build automation tool used primarily in the Yocto Project for building embedded Linux systems, understanding the difference between BPN and PN is crucial.

    PN - stands for "Package Name." It refers to the name of the software package being built. For example, if you're building the GNU C Compiler (GCC), the PN would be "gcc".

    BPN - stands for "Base Package Name." It refers to the core part of the package name. For example, if the PN is "gcc-10.3.0", then the BPN would be "gcc".

    Example:

    Let's say you're building a package for OpenSSL, and the version is 1.2.3. In this case: PN "openssl-1.2.3" BPN" openssl"

    Understanding this difference is essential because BitBake recipes often refer to BPN, allowing flexibility in handling different versions of the same software package.

    Edit

    In BitBake, the variable P does indeed include the version, as it's defined as "${PN}-${PV}". Here's what these variables represent:

    • PN Package Name, which is the core name of the package.
    • PV Package Version, which is the version of the package.

    So, if PN is "gcc" and PV is "10.3.0", then P would be "gcc-10.3.0".

    Let's clarify the example:

    • PN: "gcc" (the core package name)
    • PV: "10.3.0" (the version)
    • P: "gcc-10.3.0" (the full package name including version)