diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-09-19 17:48:37 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-22 12:19:42 +0100 |
commit | 5262ea16a626d8b39bfe745d6d51dc0bfe5ea499 (patch) | |
tree | 25948913af3fd3073aa4ece6310f85bd25f0e6e8 | |
parent | 14c6a82c847b242bdb66201e171bd7780ef88da0 (diff) | |
download | poky-5262ea16a626d8b39bfe745d6d51dc0bfe5ea499.tar.gz |
uboot-config.bbclass: Handle UBOOT_MACHINE setting
The class now consolidate the handle of UBOOT_MACHINE and UBOOT_CONFIG
variables and handle possible mistakes done by user when using these
variables.
(From OE-Core rev: 87d9b585b2784bec04e9e244dc52c6e929484fd0)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/uboot-config.bbclass | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass index 44b46ffa0b..09a0c0f7b5 100644 --- a/meta/classes/uboot-config.bbclass +++ b/meta/classes/uboot-config.bbclass | |||
@@ -1,14 +1,30 @@ | |||
1 | # Allow easy override of U-Boot config for a machine | 1 | # Handle U-Boot config for a machine |
2 | # | 2 | # |
3 | # The format to specify it, in the machine, is: | 3 | # The format to specify it, in the machine, is: |
4 | # | 4 | # |
5 | # UBOOT_CONFIG ??= <default> | 5 | # UBOOT_CONFIG ??= <default> |
6 | # UBOOT_CONFIG[foo] = "config,images" | 6 | # UBOOT_CONFIG[foo] = "config,images" |
7 | # | 7 | # |
8 | # or | ||
9 | # | ||
10 | # UBOOT_MACHINE = "config" | ||
11 | # | ||
8 | # Copyright 2013 (C) O.S. Systems Software LTDA. | 12 | # Copyright 2013 (C) O.S. Systems Software LTDA. |
9 | 13 | ||
10 | python () { | 14 | python () { |
15 | ubootmachine = d.getVar("UBOOT_MACHINE", True) | ||
11 | ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') | 16 | ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') |
17 | |||
18 | if not ubootmachine and not ubootconfigflags: | ||
19 | PN = d.getVar("PN", True) | ||
20 | FILE = os.path.basename(d.getVar("FILE", True)) | ||
21 | bb.debug(1, "To build %s, see %s for instructions on \ | ||
22 | setting up your machine config" % (PN, FILE)) | ||
23 | raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE", True)) | ||
24 | |||
25 | if ubootmachine and ubootconfigflags: | ||
26 | raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.") | ||
27 | |||
12 | if not ubootconfigflags: | 28 | if not ubootconfigflags: |
13 | return | 29 | return |
14 | 30 | ||