YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

include/bootloader/routines/lib-iface.ycp
Functions to interface the bootloader library
  • Jiri Srain

This module has an unstable interface.

WARNING: To be included to BootCommon.ycp only Use import "BootCommon" instead.

Imports

  • Mode
  • Storage
  • System::Bootloader_API

Global Functions

Local Variables

local library_initialized -> string

Loader the library has been initialized to use

global DefineMultipath (map<string,string> multipath_map) -> boolean

Declarations...

Parameters:
multipath_map
Info:

Retrieve the data for perl-Bootloader library from Storage module and pass it along

Return value:
nothing
global InitializeLibrary (boolean force, string loader) -> boolean

Initialize the bootloader library

Parameters:
force boolean true if the initialization is to be forced
loader string the loader to initialize the library for
Return value:
true on success
global SetSections (list<map<string,any> > sections) -> boolean

Set boot loader sections

Parameters:
sections a list of all loader sections (as maps)
Return value:
true on success
global GetSections () -> list<map<string,any> >

Get boot loader sections

Return value:
a list of all loader sections (as maps)
global SetGlobal (map<string,string> globals) -> boolean

Set global bootloader options

Parameters:
globals a map of global bootloader options
Return value:
true on success
global GetGlobal () -> map<string,string>

Get global bootloader options

Return value:
a map of global bootloader options
global GetMetaData () -> map<string,string>

Get bootloader configuration meta data such as field type descriptions

Return value:
a map of meta data for global and section entries
global SetDeviceMap (map<string,string> device_map) -> boolean

Set the device mapping (Linux <-> Firmware)

Parameters:
device_map a map from Linux device to Firmware device identification
Return value:
true on success
global DefineMultipath (map<string,string> multipath_map) -> boolean

Set the mapping (real device <-> multipath)

Parameters:
multipath_map
Return value:
true on success
global GetDeviceMap () -> map<string,string>

Get the device mapping (Linux <-> Firmware)

Return value:
a map from Linux device to Firmware device identification
global ReadFiles (boolean avoid_reading_device_map) -> boolean

Read the files from the system to internal cache of the library

Parameters:
avoid_reading_device_map do not read the device map, but use internal data
Return value:
true on success
global CommitSettings () -> boolean

Flush the internal cache of the library to the disk

Return value:
true on success
global UpdateBootloader () -> boolean

Update the bootloader settings, make updated saved settings active

Return value:
true on success
global UpdateSerialConsole (string append, string console) -> string

Update append in from boot section, it means take value from "console" and add it to "append"

Parameters:
append
console
Return value:
updated append with console
global InitializeBootloader () -> boolean

Initialize the boot loader (eg. modify firmware, depending on architecture)

Return value:
true on success
global GetFilesContents () -> map<string,string>

Get contents of files from the library cache

Return value:
a map filename -> contents, empty map in case of fail
global SetFilesContents (map<string,string> files) -> boolean

Set the contents of all files to library cache

Parameters:
files a map filename -> contents
Return value:
true on success