diff options
author | Chris Johns <chrisj@rtems.org> | 2019-06-12 14:44:36 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-06-12 14:44:36 +1000 |
commit | d73ce80ec072bf7fdaf19ecf7c3d027d76dd8dcf (patch) | |
tree | a26fcabccb989710fa9b00cf7d3fd4ef22198f82 /misc | |
parent | misc/boot-image: Add a tool to create boot images. (diff) | |
download | rtems-tools-d73ce80ec072bf7fdaf19ecf7c3d027d76dd8dcf.tar.bz2 |
misc/boot-image: Fix macro set logic and --net-boot-dhcp processing.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/tools/boot.py | 11 |
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' |