diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/uboot-config.bbclass | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass index b467659cbb..cb061af348 100644 --- a/meta/classes/uboot-config.bbclass +++ b/meta/classes/uboot-config.bbclass | |||
@@ -31,28 +31,19 @@ python () { | |||
31 | return | 31 | return |
32 | 32 | ||
33 | ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split() | 33 | ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split() |
34 | if len(ubootconfig) > 1: | 34 | if len(ubootconfig) > 0: |
35 | raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.') | 35 | for config in ubootconfig: |
36 | for f, v in ubootconfigflags.items(): | ||
37 | if config == f: | ||
38 | items = v.split(',') | ||
39 | if items[0] and len(items) > 2: | ||
40 | raise bb.parse.SkipPackage('Only config,images can be specified!') | ||
41 | d.appendVar('UBOOT_MACHINE', ' ' + items[0]) | ||
42 | # IMAGE_FSTYPES appending | ||
43 | if len(items) > 1 and items[1]: | ||
44 | bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1]) | ||
45 | d.appendVar('IMAGE_FSTYPES', ' ' + items[1]) | ||
46 | break | ||
36 | elif len(ubootconfig) == 0: | 47 | elif len(ubootconfig) == 0: |
37 | raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.') | 48 | raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.') |
38 | ubootconfig = ubootconfig[0] | ||
39 | |||
40 | for f, v in ubootconfigflags.items(): | ||
41 | items = v.split(',') | ||
42 | if items[0] and len(items) > 2: | ||
43 | raise bb.parse.SkipPackage('Only config,images can be specified!') | ||
44 | |||
45 | if ubootconfig == f: | ||
46 | bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0]) | ||
47 | d.setVar('UBOOT_MACHINE', items[0]) | ||
48 | |||
49 | # IMAGE_FSTYPES appending | ||
50 | if len(items) > 1 and items[1]: | ||
51 | bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1]) | ||
52 | d.appendVar('IMAGE_FSTYPES', ' ' + items[1]) | ||
53 | |||
54 | # Go out as we found a match! | ||
55 | break | ||
56 | else: | ||
57 | raise bb.parse.SkipPackage("UBOOT_CONFIG %s is not supported" % ubootconfig) | ||
58 | } | 49 | } |