summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-06-12 14:44:36 +1000
committerChris Johns <chrisj@rtems.org>2019-06-12 14:44:36 +1000
commitd73ce80ec072bf7fdaf19ecf7c3d027d76dd8dcf (patch)
treea26fcabccb989710fa9b00cf7d3fd4ef22198f82
parent98f2f02f1293daccfa6a2d464ce0d2591a3b4d0b (diff)
misc/boot-image: Fix macro set logic and --net-boot-dhcp processing.
-rw-r--r--misc/tools/boot.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/misc/tools/boot.py b/misc/tools/boot.py
index 8d6afd1..fb2e7f8 100644
--- a/misc/tools/boot.py
+++ b/misc/tools/boot.py
@@ -160,8 +160,10 @@ class bootloader(object):
def __setitem__(self, key, value):
if value is None:
value = 'None'
- if isinstance(value, int):
- value = str(int)
+ elif isinstance(value, bool):
+ value = '1' if value else '0'
+ elif isinstance(value, int):
+ value = str(value)
self.macros[key] = value
def get_mandatory_configs(self):
@@ -377,9 +379,8 @@ class uboot_bootloader(bootloader):
image.install(path.abspath(uenv_txt), mountpoint)
else:
template = None
- if self['net_dhcp'] is not None or \
- self['net_ip'] is not None:
- if self['net_dhcp'] is not None:
+ if self['net_dhcp'] or self['net_ip'] is not None:
+ if self['net_dhcp']:
template = 'uenv_net_dhcp'
else:
template = 'uenv_net_static'