ACC SHELL
/**
* File:
* include/bootloader/ppc/ppc_dialogs.ycp
*
* Module:
* Bootloader installation and configuration
*
* Summary:
* Dialogs for ppc configuration functions
*
* Authors:
* Jozef Uhliarik <juhliarik@suse.cz>
*
*/
{
textdomain "bootloader";
import "Label";
import "Wizard";
import "CWM";
import "BootCommon";
import "Stage";
import "Arch";
include "bootloader/routines/common_options.ycp";
include "bootloader/ppc/options.ycp";
list<string> arch_widget_names = ["append", "initrd", "root", "timeout", "activate"];
term arch_term = `Empty();
void PPCArchDep()
{
string board_type = getBoardType ();
board_type = "prep";
switch(board_type) {
case ("prep"):
arch_term = `Frame ( _("PReP Specific Settings"),`HBox(`HSpacing(1),`VBox(
"bootfolder"
)));
arch_widget_names = ["append", "initrd", "root", "timeout", "activate",
"bootfolder"];
break;
case ("pmac"):
arch_term = `Frame ( _("Mac Specific Settings"),`HBox(`HSpacing(1),`VBox(
`Left("no_os_chooser"),
`Left("macos_timeout"),
"bootfolder"
)));
arch_widget_names = ["append", "initrd", "root", "timeout", "activate",
"no_os_chooser", "bootfolder", "macos_timeout"];
break;
case ("iseries"):
break;
default:
arch_term = `Frame ( _("CHRP Specific Settings"),`HBox(`HSpacing(1),`VBox(
`Left("force_fat"),
`Left("force"),
`Left("clone")
)));
arch_widget_names = ["append", "initrd", "root", "timeout", "activate",
"force", "force_fat", "clone"];
break;
}
}
/**
* Run dialog to adjust installation on i386 and AMD64
* @return symbol for wizard sequencer
*/
symbol PPCDetailsDialog () {
y2milestone ("Running ppc loader details dialog");
PPCArchDep();
term contents = `HBox(`HSpacing(1), `VBox (
`Frame ( _("Global Section Options"),`HBox(`HSpacing(1),`VBox(
`Left("append"),
"initrd",
`Left("root"),
"timeout",
`Left("activate")
))),
`VSpacing(1),
// add board specific settings
arch_term
));
list<string> widget_names = arch_widget_names;
return CWM::ShowAndRun ($[
"widget_descr": PPCOptions(),
"widget_names": widget_names,
"contents": contents,
"caption" : _("Boot Loader Options"),
"back_button" : Label::BackButton (),
"abort_button" : Label::CancelButton (),
"next_button" : Label::OKButton ()
]);
}
map<string,any> ppcBootLoaderLocationWidget ()
{
string board_type = getBoardType ();
board_type = "prep";
switch(board_type) {
case ("prep"):
return BootPReP();
break;
case ("pmac"):
return BootPMAC();
break;
case ("iseries"):
return BootISeries();
break;
default:
return BootCHRP();
break;
}
}
/**
* Cache for genericWidgets function
*/
map<string,map<string,any> > _ppc_widgets = nil;
/**
* Get generic widgets
* @return a map describing all generic widgets
*/
global map<string,map<string,any> > ppcWidgets () {
if (_ppc_widgets == nil)
{
_ppc_widgets = $[
"loader_location" : ppcBootLoaderLocationWidget (),
];
}
return _ppc_widgets;
}
}
ACC SHELL 2018