1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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>
This commit is contained in:
Maciej Borzecki
2016-02-02 16:15:20 +01:00
committed by Richard Purdie
parent 090fb5146f
commit 789463333f
+4
View File
@@ -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):
"""