YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

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

This module has an unstable interface.

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

Imports

  • Storage
  • System::Bootloader_API

Global Functions

Local Variables

local library_initialized -> string

Loader the library has been initialized to use

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,string> > 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,string> >

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 GetDeviceMap () -> map<string,string>

Get the device mapping (Linux <-> Firmware)

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

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

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 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