diff options
Diffstat (limited to 'meta/classes-recipe/uboot-config.bbclass')
| -rw-r--r-- | meta/classes-recipe/uboot-config.bbclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass index bc20913f73..eb82dd3583 100644 --- a/meta/classes-recipe/uboot-config.bbclass +++ b/meta/classes-recipe/uboot-config.bbclass | |||
| @@ -35,6 +35,7 @@ UBOOT_BINARYNAME ?= "${@os.path.splitext(d.getVar("UBOOT_BINARY"))[0]}" | |||
| 35 | UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_VERSION}.${UBOOT_SUFFIX}" | 35 | UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_VERSION}.${UBOOT_SUFFIX}" |
| 36 | UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}" | 36 | UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}" |
| 37 | UBOOT_MAKE_TARGET ?= "all" | 37 | UBOOT_MAKE_TARGET ?= "all" |
| 38 | UBOOT_MAKE_OPTS ?= "" | ||
| 38 | 39 | ||
| 39 | # Output the ELF generated. Some platforms can use the ELF file and directly | 40 | # Output the ELF generated. Some platforms can use the ELF file and directly |
| 40 | # load it (JTAG booting, QEMU) additionally the ELF can be used for debugging | 41 | # load it (JTAG booting, QEMU) additionally the ELF can be used for debugging |
| @@ -103,6 +104,7 @@ python () { | |||
| 103 | ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') | 104 | ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') |
| 104 | ubootbinary = d.getVar('UBOOT_BINARY') | 105 | ubootbinary = d.getVar('UBOOT_BINARY') |
| 105 | ubootbinaries = d.getVar('UBOOT_BINARIES') | 106 | ubootbinaries = d.getVar('UBOOT_BINARIES') |
| 107 | ubootconfigmakeopts = d.getVar('UBOOT_CONFIG_MAKE_OPTS') | ||
| 106 | # The "doc" varflag is special, we don't want to see it here | 108 | # The "doc" varflag is special, we don't want to see it here |
| 107 | ubootconfigflags.pop('doc', None) | 109 | ubootconfigflags.pop('doc', None) |
| 108 | ubootconfig = (d.getVar('UBOOT_CONFIG') or "").split() | 110 | ubootconfig = (d.getVar('UBOOT_CONFIG') or "").split() |
| @@ -120,6 +122,9 @@ python () { | |||
| 120 | if ubootconfigflags and ubootbinaries: | 122 | if ubootconfigflags and ubootbinaries: |
| 121 | raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.") | 123 | raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.") |
| 122 | 124 | ||
| 125 | if ubootconfigflags and ubootconfigmakeopts: | ||
| 126 | raise bb.parse.SkipRecipe("You cannot use UBOOT_CONFIG_MAKE_OPTS as it is internal to uboot_config.bbclass.") | ||
| 127 | |||
| 123 | if len(ubootconfig) > 0: | 128 | if len(ubootconfig) > 0: |
| 124 | for config in ubootconfig: | 129 | for config in ubootconfig: |
| 125 | found = False | 130 | found = False |
| @@ -127,8 +132,8 @@ python () { | |||
| 127 | if config == f: | 132 | if config == f: |
| 128 | found = True | 133 | found = True |
| 129 | items = v.split(',') | 134 | items = v.split(',') |
| 130 | if items[0] and len(items) > 3: | 135 | if items[0] and len(items) > 4: |
| 131 | raise bb.parse.SkipRecipe('Only config,images,binary can be specified!') | 136 | raise bb.parse.SkipRecipe('Only config,images,binary,make_opts can be specified!') |
| 132 | d.appendVar('UBOOT_MACHINE', ' ' + items[0]) | 137 | d.appendVar('UBOOT_MACHINE', ' ' + items[0]) |
| 133 | # IMAGE_FSTYPES appending | 138 | # IMAGE_FSTYPES appending |
| 134 | if len(items) > 1 and items[1]: | 139 | if len(items) > 1 and items[1]: |
| @@ -140,6 +145,12 @@ python () { | |||
| 140 | else: | 145 | else: |
| 141 | bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary) | 146 | bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary) |
| 142 | d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary) | 147 | d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary) |
| 148 | if len(items) > 3 and items[3]: | ||
| 149 | bb.debug(1, "Appending '%s' to UBOOT_CONFIG_MAKE_OPTS." % items[3]) | ||
| 150 | d.appendVar('UBOOT_CONFIG_MAKE_OPTS', items[3] + " ? ") | ||
| 151 | else: | ||
| 152 | bb.debug(1, "Appending '%s' to UBOOT_CONFIG_MAKE_OPTS." % "") | ||
| 153 | d.appendVar('UBOOT_CONFIG_MAKE_OPTS', " ? ") | ||
| 143 | break | 154 | break |
| 144 | 155 | ||
| 145 | if not found: | 156 | if not found: |
