YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

include/bootloader/routines/lib-iface.ycp
Functions to interface the bootloader library
WARNING: To be included to BootCommon.ycp only Use import "BootCommon" instead.

Imports

  • Storage
  • System::Bootloader_API

Global Functions

Local Variables

Local Functions

local library_initialized -> string

Loader the library has been initialized to use

local PrepareInitData () -> map<string,any>

Prepare the data for perl-Bootloader library initialization

Return value:
a map of data needed for the library initialization
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 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 FlushCache () -> 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