diff options
Diffstat (limited to 'scripts/lib/mic/kickstart/custom_commands')
| -rw-r--r-- | scripts/lib/mic/kickstart/custom_commands/wicboot.py | 57 |
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 | |||
| 27 | from pykickstart.base import * | ||
| 28 | from pykickstart.errors import * | ||
| 29 | from pykickstart.options import * | ||
| 30 | from pykickstart.commands.bootloader import * | ||
| 31 | |||
| 32 | from mic.kickstart.custom_commands.micboot import * | ||
| 33 | |||
| 34 | class 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 | |||
