A kickstart file for non-x86 boards may have no 'bootloader' stanza. It is the usual case if bootloader is setup using other mechanism than through wic, and is for instance a part of u-boot configuration. In such case the 'bootloader' field in the KickStart class will be uninitialized. Instead of adding an empty bootloader line in every kickstart file call the bootloader parser with empty argument list to get defaults namespace.
Signed-off-by: Maciej Borzecki <[email protected]> --- scripts/lib/wic/ksparser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index f2a0e047449e122470b84e521a114f52d55bc4a4..2f1e0978db5cd39c88e9ac11c090d20a68573605 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py @@ -29,6 +29,7 @@ import os import shlex from argparse import ArgumentParser, ArgumentError, ArgumentTypeError +from wic import msger from wic.partition import Partition from wic.utils.misc import find_canned @@ -135,6 +136,9 @@ class KickStart(object): include.add_argument('path', type=cannedpathtype) self._parse(parser, confpath) + if not self.bootloader: + msger.warning('bootloader config not specified, using defaults') + self.bootloader = bootloader.parse_args([]) def _parse(self, parser, confpath): """ -- 2.5.0 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
