diff options
author | Maciej Borzecki <maciej.borzecki@open-rnd.pl> | 2016-02-02 16:15:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-04 23:39:01 +0000 |
commit | 789463333f6f4a54c1d0099b2a728f67af38c045 (patch) | |
tree | 80e677febcb4e1bef1f4ad2baeb1ec967a6b65b6 /scripts | |
parent | 090fb5146f2e647843620660b98ba1773a2e341c (diff) | |
download | poky-789463333f6f4a54c1d0099b2a728f67af38c045.tar.gz |
wic: default to empty bootloader config
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.
(From OE-Core rev: 264c03e854f77c3b62acb710384f66716ccbf469)
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/ksparser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index f2a0e04744..2f1e0978db 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py | |||
@@ -29,6 +29,7 @@ import os | |||
29 | import shlex | 29 | import shlex |
30 | from argparse import ArgumentParser, ArgumentError, ArgumentTypeError | 30 | from argparse import ArgumentParser, ArgumentError, ArgumentTypeError |
31 | 31 | ||
32 | from wic import msger | ||
32 | from wic.partition import Partition | 33 | from wic.partition import Partition |
33 | from wic.utils.misc import find_canned | 34 | from wic.utils.misc import find_canned |
34 | 35 | ||
@@ -135,6 +136,9 @@ class KickStart(object): | |||
135 | include.add_argument('path', type=cannedpathtype) | 136 | include.add_argument('path', type=cannedpathtype) |
136 | 137 | ||
137 | self._parse(parser, confpath) | 138 | self._parse(parser, confpath) |
139 | if not self.bootloader: | ||
140 | msger.warning('bootloader config not specified, using defaults') | ||
141 | self.bootloader = bootloader.parse_args([]) | ||
138 | 142 | ||
139 | def _parse(self, parser, confpath): | 143 | def _parse(self, parser, confpath): |
140 | """ | 144 | """ |