summaryrefslogtreecommitdiffstats
path: root/meta/classes/uboot-config.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/uboot-config.bbclass')
-rw-r--r--meta/classes/uboot-config.bbclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 451db0c650..e9e7148f0d 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -11,6 +11,11 @@
11# 11#
12# Copyright 2013, 2014 (C) O.S. Systems Software LTDA. 12# Copyright 2013, 2014 (C) O.S. Systems Software LTDA.
13 13
14def removesuffix(s, suffix):
15 if suffix and s.endswith(suffix):
16 return s[:-len(suffix)]
17 return s
18
14# Some versions of u-boot use .bin and others use .img. By default use .bin 19# Some versions of u-boot use .bin and others use .img. By default use .bin
15# but enable individual recipes to change this value. 20# but enable individual recipes to change this value.
16UBOOT_SUFFIX ??= "bin" 21UBOOT_SUFFIX ??= "bin"
@@ -33,10 +38,13 @@ UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
33# should be packaged along with the u-boot binary as well as placed in the 38# should be packaged along with the u-boot binary as well as placed in the
34# deploy directory. For those versions they can set the following variables 39# deploy directory. For those versions they can set the following variables
35# to allow packaging the SPL. 40# to allow packaging the SPL.
41SPL_SUFFIX ?= ""
36SPL_BINARY ?= "" 42SPL_BINARY ?= ""
37SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" 43SPL_DELIMITER ?= "${@'.' if d.getVar("SPL_SUFFIX") else ''}"
38SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" 44SPL_BINARYFILE ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
39SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" 45SPL_BINARYNAME ?= "${@removesuffix(d.getVar("SPL_BINARYFILE"), "." + d.getVar("SPL_SUFFIX"))}"
46SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}"
47SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}"
40 48
41# Additional environment variables or a script can be installed alongside 49# Additional environment variables or a script can be installed alongside
42# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' 50# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'