From 789463333f6f4a54c1d0099b2a728f67af38c045 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Tue, 2 Feb 2016 16:15:20 +0100 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/wic/ksparser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/lib/wic/ksparser.py') 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): """ -- cgit v1.2.3-54-g00ecf