waf: boards: pass configure context to configure_env()
There will be cases when the configuration context will be needed.
This commit is contained in:
parent
2f324c056f
commit
4f55c75767
@ -18,7 +18,7 @@ class BoardMeta(type):
|
||||
class Board:
|
||||
def configure(self, cfg):
|
||||
env = waflib.ConfigSet.ConfigSet()
|
||||
self.configure_env(env)
|
||||
self.configure_env(cfg, env)
|
||||
|
||||
d = env.get_merged_dict()
|
||||
# Always prepend so that arguments passed in the command line get
|
||||
@ -37,7 +37,7 @@ class Board:
|
||||
else:
|
||||
cfg.env[k] = val
|
||||
|
||||
def configure_env(self, env):
|
||||
def configure_env(self, cfg, env):
|
||||
# Use a dictionary instead of the convetional list for definitions to
|
||||
# make easy to override them. Convert back to list before consumption.
|
||||
env.DEFINES = {}
|
||||
@ -103,8 +103,8 @@ def get_board(name):
|
||||
# be worthy to keep board definitions in files of their own.
|
||||
|
||||
class sitl(Board):
|
||||
def configure_env(self, env):
|
||||
super(sitl, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(sitl, self).configure_env(cfg, env)
|
||||
|
||||
env.DEFINES.update(
|
||||
CONFIG_HAL_BOARD = 'HAL_BOARD_SITL',
|
||||
@ -123,8 +123,8 @@ class sitl(Board):
|
||||
]
|
||||
|
||||
class linux(Board):
|
||||
def configure_env(self, env):
|
||||
super(linux, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(linux, self).configure_env(cfg, env)
|
||||
|
||||
env.DEFINES.update(
|
||||
CONFIG_HAL_BOARD = 'HAL_BOARD_LINUX',
|
||||
@ -143,8 +143,8 @@ class linux(Board):
|
||||
]
|
||||
|
||||
class minlure(linux):
|
||||
def configure_env(self, env):
|
||||
super(minlure, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(minlure, self).configure_env(cfg, env)
|
||||
|
||||
env.DEFINES.update(
|
||||
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_MINLURE',
|
||||
@ -152,8 +152,8 @@ class minlure(linux):
|
||||
|
||||
|
||||
class erleboard(linux):
|
||||
def configure_env(self, env):
|
||||
super(erleboard, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(erleboard, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -161,8 +161,8 @@ class erleboard(linux):
|
||||
)
|
||||
|
||||
class navio(linux):
|
||||
def configure_env(self, env):
|
||||
super(navio, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(navio, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -170,8 +170,8 @@ class navio(linux):
|
||||
)
|
||||
|
||||
class navio2(linux):
|
||||
def configure_env(self, env):
|
||||
super(navio2, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(navio2, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -179,8 +179,8 @@ class navio2(linux):
|
||||
)
|
||||
|
||||
class zynq(linux):
|
||||
def configure_env(self, env):
|
||||
super(zynq, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(zynq, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-xilinx-linux-gnueabi'
|
||||
env.DEFINES.update(
|
||||
@ -188,8 +188,8 @@ class zynq(linux):
|
||||
)
|
||||
|
||||
class bbbmini(linux):
|
||||
def configure_env(self, env):
|
||||
super(bbbmini, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(bbbmini, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -197,8 +197,8 @@ class bbbmini(linux):
|
||||
)
|
||||
|
||||
class pxf(linux):
|
||||
def configure_env(self, env):
|
||||
super(pxf, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(pxf, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -206,8 +206,8 @@ class pxf(linux):
|
||||
)
|
||||
|
||||
class bebop(linux):
|
||||
def configure_env(self, env):
|
||||
super(bebop, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(bebop, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -216,8 +216,8 @@ class bebop(linux):
|
||||
env.STATIC_LINKING = True
|
||||
|
||||
class raspilot(linux):
|
||||
def configure_env(self, env):
|
||||
super(raspilot, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(raspilot, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -225,8 +225,8 @@ class raspilot(linux):
|
||||
)
|
||||
|
||||
class erlebrain2(linux):
|
||||
def configure_env(self, env):
|
||||
super(erlebrain2, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(erlebrain2, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -234,8 +234,8 @@ class erlebrain2(linux):
|
||||
)
|
||||
|
||||
class bhat(linux):
|
||||
def configure_env(self, env):
|
||||
super(bhat, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(bhat, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
@ -243,8 +243,8 @@ class bhat(linux):
|
||||
)
|
||||
|
||||
class pxfmini(linux):
|
||||
def configure_env(self, env):
|
||||
super(pxfmini, self).configure_env(env)
|
||||
def configure_env(self, cfg, env):
|
||||
super(pxfmini, self).configure_env(cfg, env)
|
||||
|
||||
env.TOOLCHAIN = 'arm-linux-gnueabihf'
|
||||
env.DEFINES.update(
|
||||
|
Loading…
Reference in New Issue
Block a user