[rtems-tools commit] misc/boot-image: Fix macro set logic and --net-boot-dhcp processing.
Chris Johns
chrisj at rtems.org
Wed Jun 12 04:46:57 UTC 2019
Module: rtems-tools
Branch: master
Commit: d73ce80ec072bf7fdaf19ecf7c3d027d76dd8dcf
Changeset: http://git.rtems.org/rtems-tools/commit/?id=d73ce80ec072bf7fdaf19ecf7c3d027d76dd8dcf
Author: Chris Johns <chrisj at rtems.org>
Date: Wed Jun 12 14:44:36 2019 +1000
misc/boot-image: Fix macro set logic and --net-boot-dhcp processing.
---
misc/tools/boot.py | 11 ++++++-----
1 file 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'
More information about the vc
mailing list