diff options
Diffstat (limited to 'meta/classes/uboot-config.bbclass')
-rw-r--r-- | meta/classes/uboot-config.bbclass | 14 |
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 | ||
14 | def 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. |
16 | UBOOT_SUFFIX ??= "bin" | 21 | UBOOT_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. |
41 | SPL_SUFFIX ?= "" | ||
36 | SPL_BINARY ?= "" | 42 | SPL_BINARY ?= "" |
37 | SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" | 43 | SPL_DELIMITER ?= "${@'.' if d.getVar("SPL_SUFFIX") else ''}" |
38 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" | 44 | SPL_BINARYFILE ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" |
39 | SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" | 45 | SPL_BINARYNAME ?= "${@removesuffix(d.getVar("SPL_BINARYFILE"), "." + d.getVar("SPL_SUFFIX"))}" |
46 | SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}" | ||
47 | SPL_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' |