diff mbox series

u-boot: Allow for customizing installed/deployed file names

Message ID 20250611190430.13378-1-reatmon@ti.com
State Accepted, archived
Commit debc691853e2954bd325bad395b8829939afaa08
Headers show
Series u-boot: Allow for customizing installed/deployed file names | expand

Commit Message

Ryan Eatmon June 11, 2025, 7:04 p.m. UTC
When assembling all of the various filenames that are installed/deployed
from u-boot, we have been including the PV and PR in the filenames.  This
change introduces a simple variable indirection for those places so that
the values for PV and PR can be modified if desired.

In this case, we are wanting to use the value for PKGV instead of PV so
that we can pick up the git commit, but a change of that magnitude in a
bbappend would be impossible with all of the places where PV is hard-coded.

This change should not be disruptive since the default value for the new
UBOOT_PV and UBOOT_PR are just PV and PR respectively.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 meta/classes-recipe/uboot-config.bbclass | 15 +++--
 meta/recipes-bsp/u-boot/u-boot.inc       | 80 ++++++++++++------------
 2 files changed, 50 insertions(+), 45 deletions(-)

Comments

Ross Burton June 17, 2025, 5:16 p.m. UTC | #1
On 11 Jun 2025, at 20:04, Ryan Eatmon via lists.openembedded.org <reatmon=ti.com@lists.openembedded.org> wrote:
> 
> When assembling all of the various filenames that are installed/deployed
> from u-boot, we have been including the PV and PR in the filenames.  This
> change introduces a simple variable indirection for those places so that
> the values for PV and PR can be modified if desired.
> 
> In this case, we are wanting to use the value for PKGV instead of PV so
> that we can pick up the git commit, but a change of that magnitude in a
> bbappend would be impossible with all of the places where PV is hard-coded.
> 
> This change should not be disruptive since the default value for the new
> UBOOT_PV and UBOOT_PR are just PV and PR respectively.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
> meta/classes-recipe/uboot-config.bbclass | 15 +++--
> meta/recipes-bsp/u-boot/u-boot.inc       | 80 ++++++++++++------------
> 2 files changed, 50 insertions(+), 45 deletions(-)
> 
> diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
> index f44605cb6a..6287701888 100644
> --- a/meta/classes-recipe/uboot-config.bbclass
> +++ b/meta/classes-recipe/uboot-config.bbclass
> @@ -22,12 +22,17 @@ def removesuffix(s, suffix):
> UBOOT_ENTRYPOINT ?= "0x20008000"
> UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
> 
> +# When naming the files we install/deploy, the package version and revision
> +# are part of the filename.  Allow these to be customized if desired.
> +UBOOT_PV ?= "${PV}"
> +UBOOT_PR ?= "${PR}"

> -UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
> +UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}”

Every instance of this is PV-PR, so why not have a single “UBOOT_VERSION” variable that defaults to PV-PR?

Putting the PR in the filenames seems wrong, but that can be a follow-up patch.

Ross
Ryan Eatmon June 17, 2025, 6:01 p.m. UTC | #2
On 6/17/2025 12:16 PM, Ross Burton wrote:
> On 11 Jun 2025, at 20:04, Ryan Eatmon via lists.openembedded.org <reatmon=ti.com@lists.openembedded.org> wrote:
>>
>> When assembling all of the various filenames that are installed/deployed
>> from u-boot, we have been including the PV and PR in the filenames.  This
>> change introduces a simple variable indirection for those places so that
>> the values for PV and PR can be modified if desired.
>>
>> In this case, we are wanting to use the value for PKGV instead of PV so
>> that we can pick up the git commit, but a change of that magnitude in a
>> bbappend would be impossible with all of the places where PV is hard-coded.
>>
>> This change should not be disruptive since the default value for the new
>> UBOOT_PV and UBOOT_PR are just PV and PR respectively.
>>
>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>> ---
>> meta/classes-recipe/uboot-config.bbclass | 15 +++--
>> meta/recipes-bsp/u-boot/u-boot.inc       | 80 ++++++++++++------------
>> 2 files changed, 50 insertions(+), 45 deletions(-)
>>
>> diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
>> index f44605cb6a..6287701888 100644
>> --- a/meta/classes-recipe/uboot-config.bbclass
>> +++ b/meta/classes-recipe/uboot-config.bbclass
>> @@ -22,12 +22,17 @@ def removesuffix(s, suffix):
>> UBOOT_ENTRYPOINT ?= "0x20008000"
>> UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
>>
>> +# When naming the files we install/deploy, the package version and revision
>> +# are part of the filename.  Allow these to be customized if desired.
>> +UBOOT_PV ?= "${PV}"
>> +UBOOT_PR ?= "${PR}"
> 
>> -UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
>> +UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}”
> 
> Every instance of this is PV-PR, so why not have a single “UBOOT_VERSION” variable that defaults to PV-PR?
> 
> Putting the PR in the filenames seems wrong, but that can be a follow-up patch.

I can make that change.  I had thought about doing something like that, 
but decided for the more specific change.  I'll take a stab at that and 
send in a v2.  Thanks!


> Ross
Richard Purdie June 17, 2025, 10:36 p.m. UTC | #3
On Tue, 2025-06-17 at 13:01 -0500, Ryan Eatmon via lists.openembedded.org wrote:
> On 6/17/2025 12:16 PM, Ross Burton wrote:
> > On 11 Jun 2025, at 20:04, Ryan Eatmon via lists.openembedded.org <reatmon=ti.com@lists.openembedded.org> wrote:
> > > 
> > > When assembling all of the various filenames that are installed/deployed
> > > from u-boot, we have been including the PV and PR in the filenames.  This
> > > change introduces a simple variable indirection for those places so that
> > > the values for PV and PR can be modified if desired.
> > > 
> > > In this case, we are wanting to use the value for PKGV instead of PV so
> > > that we can pick up the git commit, but a change of that magnitude in a
> > > bbappend would be impossible with all of the places where PV is hard-coded.
> > > 
> > > This change should not be disruptive since the default value for the new
> > > UBOOT_PV and UBOOT_PR are just PV and PR respectively.
> > > 
> > > Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> > > ---
> > > meta/classes-recipe/uboot-config.bbclass | 15 +++--
> > > meta/recipes-bsp/u-boot/u-boot.inc       | 80 ++++++++++++------------
> > > 2 files changed, 50 insertions(+), 45 deletions(-)
> > > 
> > > diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
> > > index f44605cb6a..6287701888 100644
> > > --- a/meta/classes-recipe/uboot-config.bbclass
> > > +++ b/meta/classes-recipe/uboot-config.bbclass
> > > @@ -22,12 +22,17 @@ def removesuffix(s, suffix):
> > > UBOOT_ENTRYPOINT ?= "0x20008000"
> > > UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
> > > 
> > > +# When naming the files we install/deploy, the package version and revision
> > > +# are part of the filename.  Allow these to be customized if desired.
> > > +UBOOT_PV ?= "${PV}"
> > > +UBOOT_PR ?= "${PR}"
> > 
> > > -UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
> > > +UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}”
> > 
> > Every instance of this is PV-PR, so why not have a single “UBOOT_VERSION” variable that defaults to PV-PR?
> > 
> > Putting the PR in the filenames seems wrong, but that can be a follow-up patch.
> 
> I can make that change.  I had thought about doing something like that, 
> but decided for the more specific change.  I'll take a stab at that and 
> send in a v2.  Thanks!

FWIW I don't think we need/want PR in this, at least by default and I'd
prefer to drop that as a follow up patch too, simplify things a bit. PR
doesn't tend to change much now.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index f44605cb6a..6287701888 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -22,12 +22,17 @@  def removesuffix(s, suffix):
 UBOOT_ENTRYPOINT ?= "0x20008000"
 UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
 
+# When naming the files we install/deploy, the package version and revision
+# are part of the filename.  Allow these to be customized if desired.
+UBOOT_PV ?= "${PV}"
+UBOOT_PR ?= "${PR}"
+
 # Some versions of u-boot use .bin and others use .img.  By default use .bin
 # but enable individual recipes to change this value.
 UBOOT_SUFFIX ??= "bin"
 UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
 UBOOT_BINARYNAME ?= "${@os.path.splitext(d.getVar("UBOOT_BINARY"))[0]}"
-UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
+UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}"
 UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}"
 UBOOT_MAKE_TARGET ?= "all"
 
@@ -36,7 +41,7 @@  UBOOT_MAKE_TARGET ?= "all"
 # purposes.
 UBOOT_ELF ?= ""
 UBOOT_ELF_SUFFIX ?= "elf"
-UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
+UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX}"
 UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
 UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
 
@@ -49,7 +54,7 @@  SPL_BINARY ?= ""
 SPL_DELIMITER  ?= "${@'.' if d.getVar("SPL_SUFFIX") else ''}"
 SPL_BINARYFILE ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
 SPL_BINARYNAME ?= "${@removesuffix(d.getVar("SPL_BINARYFILE"), "." + d.getVar("SPL_SUFFIX"))}"
-SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}"
+SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX}"
 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}"
 
 # Additional environment variables or a script can be installed alongside
@@ -62,14 +67,14 @@  UBOOT_ENV ?= ""
 UBOOT_ENV_SRC_SUFFIX ?= "cmd"
 UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}"
 UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
-UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
+UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ENV_SUFFIX}"
 UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
 
 # U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf
 # to find EXTLINUX conf file.
 UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
 UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
-UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
+UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}"
 
 # Options for the device tree compiler passed to mkimage '-D' feature:
 UBOOT_MKIMAGE_DTCOPTS ??= ""
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 9464736b84..84e636f9b0 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -192,16 +192,16 @@  uboot_install_config () {
     config=$1
     type=$2
 
-    install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
+    install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
 
     # Install the uboot-initial-env
     if [ -n "${UBOOT_INITIAL_ENV}" ]; then
-        install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
+        install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
     fi
 }
 
@@ -211,9 +211,9 @@  uboot_install () {
 
     # Install the uboot-initial-env
     if [ -n "${UBOOT_INITIAL_ENV}" ]; then
-        install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
+        install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
     fi
 }
 
@@ -221,9 +221,9 @@  uboot_install_elf_config () {
     config=$1
     type=$2
 
-    install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
+    install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
 }
 
 uboot_install_elf () {
@@ -235,9 +235,9 @@  uboot_install_spl_config () {
     config=$1
     type=$2
 
-    install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
+    install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
 }
 
 uboot_install_spl () {
@@ -282,10 +282,10 @@  do_deploy () {
     fi
 
     if [ -e ${UNPACKDIR}/fw_env.config ] ; then
-        install -D -m 644 ${UNPACKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR}
+        install -D -m 644 ${UNPACKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}
         cd ${DEPLOYDIR}
-        ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE}
-        ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config
+        ln -sf fw_env.config-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} fw_env.config-${MACHINE}
+        ln -sf fw_env.config-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} fw_env.config
     fi
 
     if [ -n "${UBOOT_ELF}" ]
@@ -355,19 +355,19 @@  uboot_deploy_config () {
     config=$1
     type=$2
 
-    install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+    install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX}
     cd ${DEPLOYDIR}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
-    ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
+    ln -sf ${UBOOT_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
 
     # Deploy the uboot-initial-env
     if [ -n "${UBOOT_INITIAL_ENV}" ]; then
-        install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}
+        install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR}
         cd ${DEPLOYDIR}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${type}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${UBOOT_PV}-${UBOOT_PR} ${UBOOT_INITIAL_ENV}-${type}
     fi
 }
 
@@ -381,10 +381,10 @@  uboot_deploy () {
 
     # Deploy the uboot-initial-env
     if [ -n "${UBOOT_INITIAL_ENV}" ]; then
-        install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}
+        install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR}
         cd ${DEPLOYDIR}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}
-        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} ${UBOOT_INITIAL_ENV}-${MACHINE}
+        ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${UBOOT_PV}-${UBOOT_PR} ${UBOOT_INITIAL_ENV}
     fi
 }
 
@@ -392,11 +392,11 @@  uboot_deploy_elf_config () {
     config=$1
     type=$2
 
-    install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
-    ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
+    install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
+    ln -sf u-boot-${type}-${UBOOT_PV}-${UBOOT_PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
 }
 
 uboot_deploy_elf () {
@@ -409,12 +409,12 @@  uboot_deploy_spl_config () {
     config=$1
     type=$2
 
-    install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
+    install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX}
     rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-    ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+    ln -sf ${SPL_BINARYNAME}-${type}-${UBOOT_PV}-${UBOOT_PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}
 }
 
 uboot_deploy_spl () {