summaryrefslogtreecommitdiff
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:35:04 +0000
commit264c03e854f77c3b62acb710384f66716ccbf469 (patch)
treef76f71955c2383cefb385cbf46a4ebb3d1946d7d
parentacf1148bf3f4e489e9e2b0b8745753e1311ee812 (diff)
downloadopenembedded-core-264c03e854f77c3b62acb710384f66716ccbf469.tar.gz
openembedded-core-264c03e854f77c3b62acb710384f66716ccbf469.tar.bz2
openembedded-core-264c03e854f77c3b62acb710384f66716ccbf469.zip
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. Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Ross Burton <ross.burton@intel.com>
-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
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):
"""