summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@open-rnd.pl>2016-02-02 16:15:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:39:01 +0000
commit789463333f6f4a54c1d0099b2a728f67af38c045 (patch)
tree80e677febcb4e1bef1f4ad2baeb1ec967a6b65b6 /scripts
parent090fb5146f2e647843620660b98ba1773a2e341c (diff)
downloadpoky-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.py4
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
29import shlex 29import shlex
30from argparse import ArgumentParser, ArgumentError, ArgumentTypeError 30from argparse import ArgumentParser, ArgumentError, ArgumentTypeError
31 31
32from wic import msger
32from wic.partition import Partition 33from wic.partition import Partition
33from wic.utils.misc import find_canned 34from 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 """