summaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/kickstart/custom_commands/wicboot.py
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-02-03 19:16:56 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-04 12:57:35 +0000
commit363488fc9a045ef7415f0d07777c934a2c452714 (patch)
tree0381136053606aa9584369241154e66a6fdc2dff /scripts/lib/mic/kickstart/custom_commands/wicboot.py
parent3cb93017e64b409e887e37f255ae49bb4e274465 (diff)
downloadpoky-363488fc9a045ef7415f0d07777c934a2c452714.tar.gz
wic: Add wic-specific bootloader subclass
Add a new wic-specific bootloader subclass so we can add a --source param to hang non-partition plugin off of. By default, the bootloader gets the /boot partition source plugin, but this can be overridden by the --source bootloader param if needed. (From OE-Core rev: f90e4097c4e69d4f61c69923cb5d1ebb6b74d2ff) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic/kickstart/custom_commands/wicboot.py')
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/wicboot.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/wicboot.py b/scripts/lib/mic/kickstart/custom_commands/wicboot.py
new file mode 100644
index 0000000000..ab8871de4e
--- /dev/null
+++ b/scripts/lib/mic/kickstart/custom_commands/wicboot.py
@@ -0,0 +1,57 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3#
4# Copyright (c) 2014, Intel Corporation.
5# All rights reserved.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 2 as
9# published by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19#
20# DESCRIPTION
21# This module provides the OpenEmbedded bootloader object definitions.
22#
23# AUTHORS
24# Tom Zanussi <tom.zanussi (at] linux.intel.com>
25#
26
27from pykickstart.base import *
28from pykickstart.errors import *
29from pykickstart.options import *
30from pykickstart.commands.bootloader import *
31
32from mic.kickstart.custom_commands.micboot import *
33
34class Wic_Bootloader(Mic_Bootloader):
35 def __init__(self, writePriority=10, appendLine="", driveorder=None,
36 forceLBA=False, location="", md5pass="", password="",
37 upgrade=False, menus=""):
38 Mic_Bootloader.__init__(self, writePriority, appendLine, driveorder,
39 forceLBA, location, md5pass, password, upgrade)
40
41 self.source = ""
42
43 def _getArgsAsStr(self):
44 retval = Mic_Bootloader._getArgsAsStr(self)
45
46 if self.source:
47 retval += " --source=%s" % self.source
48
49 return retval
50
51 def _getParser(self):
52 op = Mic_Bootloader._getParser(self)
53 # use specified source plugin to implement bootloader-specific methods
54 op.add_option("--source", type="string", action="store",
55 dest="source", default=None)
56 return op
57