diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/uboot-config.bbclass | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass index cb061af348..3f760f2fbe 100644 --- a/meta/classes/uboot-config.bbclass +++ b/meta/classes/uboot-config.bbclass @@ -3,7 +3,7 @@ # The format to specify it, in the machine, is: # # UBOOT_CONFIG ??= <default> -# UBOOT_CONFIG[foo] = "config,images" +# UBOOT_CONFIG[foo] = "config,images,binary" # # or # @@ -11,9 +11,13 @@ # # Copyright 2013, 2014 (C) O.S. Systems Software LTDA. +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" + python () { ubootmachine = d.getVar("UBOOT_MACHINE", True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') + ubootbinary = d.getVar('UBOOT_BINARY', True) + ubootbinaries = d.getVar('UBOOT_BINARIES', True) # The "doc" varflag is special, we don't want to see it here ubootconfigflags.pop('doc', None) @@ -27,6 +31,9 @@ python () { if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.") + if ubootconfigflags and ubootbinaries: + raise bb.parse.SkipPackage("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.") + if not ubootconfigflags: return @@ -36,13 +43,19 @@ python () { for f, v in ubootconfigflags.items(): if config == f: items = v.split(',') - if items[0] and len(items) > 2: - raise bb.parse.SkipPackage('Only config,images can be specified!') + if items[0] and len(items) > 3: + raise bb.parse.SkipPackage('Only config,images,binary can be specified!') d.appendVar('UBOOT_MACHINE', ' ' + items[0]) # IMAGE_FSTYPES appending if len(items) > 1 and items[1]: bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1]) d.appendVar('IMAGE_FSTYPES', ' ' + items[1]) + if len(items) > 2 and items[2]: + bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % items[2]) + d.appendVar('UBOOT_BINARIES', ' ' + items[2]) + else: + bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary) + d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary) break elif len(ubootconfig) == 0: raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.') |