mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
uboot-config.bbclass: Use an annonymous python function
The processing needs to happen per recipe and thus it ought to use annonymous python function instead to be triggered at event. (From OE-Core rev: 75bde3ee02262cb3c6b91279ca277e3e5324ee5e) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8f650f2e2c
commit
19174b0796
@@ -7,14 +7,12 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2013 (C) O.S. Systems Software LTDA.
|
# Copyright 2013 (C) O.S. Systems Software LTDA.
|
||||||
|
|
||||||
addhandler uboot_config_eventhandler
|
python () {
|
||||||
uboot_config_eventhandler[eventmask] = "bb.event.ConfigParsed"
|
ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
|
||||||
python uboot_config_eventhandler() {
|
|
||||||
ubootconfigflags = e.data.getVarFlags('UBOOT_CONFIG')
|
|
||||||
if not ubootconfigflags:
|
if not ubootconfigflags:
|
||||||
return
|
return
|
||||||
|
|
||||||
ubootconfig = (e.data.getVar('UBOOT_CONFIG', True) or "").split()
|
ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split()
|
||||||
if len(ubootconfig) > 1:
|
if len(ubootconfig) > 1:
|
||||||
raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.')
|
raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.')
|
||||||
elif len(ubootconfig) == 0:
|
elif len(ubootconfig) == 0:
|
||||||
@@ -31,9 +29,9 @@ python uboot_config_eventhandler() {
|
|||||||
|
|
||||||
if ubootconfig == f:
|
if ubootconfig == f:
|
||||||
bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0])
|
bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0])
|
||||||
e.data.setVar('UBOOT_MACHINE', items[0])
|
d.setVar('UBOOT_MACHINE', items[0])
|
||||||
|
|
||||||
if items[1]:
|
if items[1]:
|
||||||
bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1])
|
bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1])
|
||||||
e.data.appendVar('IMAGE_FSTYPES', ' ' + items[1])
|
d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user