[yast-commit] r67833 - in /trunk/bootloader: package/ src/modules/ src/routines/
Author: snwint Date: Fri Mar 30 13:02:53 2012 New Revision: 67833 URL: http://svn.opensuse.org/viewcvs/yast?rev=67833&view=rev Log: - add new grub2-efi module to support booting on UEFI firmware Modified: trunk/bootloader/package/yast2-bootloader.changes trunk/bootloader/src/modules/BootCommon.ycp trunk/bootloader/src/modules/BootSupportCheck.ycp trunk/bootloader/src/modules/Makefile.am trunk/bootloader/src/routines/dialogs.ycp trunk/bootloader/src/routines/global_widgets.ycp trunk/bootloader/src/routines/switcher.ycp Modified: trunk/bootloader/package/yast2-bootloader.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/package/yast2-bootloader.changes (original) +++ trunk/bootloader/package/yast2-bootloader.changes Fri Mar 30 13:02:53 2012 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Mar 22 10:56:28 UTC 2012 - mchang@suse.com + +- add new grub2-efi module to support booting on UEFI firmware. + +------------------------------------------------------------------- Wed Mar 14 15:43:44 CET 2012 - aschnell@suse.de - adapted ssh command for 2nd stage ssh installation (bnc#745340) Modified: trunk/bootloader/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootCommon.ycp (original) +++ trunk/bootloader/src/modules/BootCommon.ycp Fri Mar 30 13:02:53 2012 @@ -187,7 +187,7 @@ /** * type of bootloader to configure/being configured - * shall be one of "lilo", "grub", "elilo", "ppc", "zipl", "grub2" + * shall be one of "lilo", "grub", "elilo", "ppc", "zipl", "grub2", "grub2-efi" */ string loader_type = nil; @@ -289,7 +289,7 @@ * List of all supported bootloaders */ global list<string> bootloaders = ["lilo", "grub", "elilo", - "zipl", "ppc", "grub2"]; + "zipl", "ppc", "grub2", "grub2-efi"]; /** FATE#305008: Failover boot configurations for md arrays with redundancy * if true enable redundancy for md array @@ -1059,7 +1059,9 @@ } if ((Arch::i386() || Arch::x86_64()) && Linuxrc::InstallInf("EFI") == "1") { - loader_type = "elilo"; + // use grub2-efi as default bootloader for x86_64/i386 EFI + // previously we use elilo + loader_type = "grub2-efi"; } loader_type = SupportedLoader (loader_type); @@ -1139,7 +1141,7 @@ global define list<string> getBootloaders () { if (Mode::config ()) { - return ["grub", "lilo", "elilo", "zipl", "ppc", "grub2", "default", "none"]; + return ["grub", "lilo", "elilo", "zipl", "ppc", "grub2", "grub2-efi", "default", "none"]; } list<string> ret = [ getLoaderType (false), @@ -1149,7 +1151,7 @@ { ret = (list<string>)merge (ret, ["lilo", "grub", "grub2"]); if (Arch::x86_64 ()) - ret = (list<string>)merge (ret, ["elilo"]); + ret = (list<string>)merge (ret, ["elilo", "grub2-efi"]); } // in order not to display it twice when "none" is selected ret = filter (string l, ret, { Modified: trunk/bootloader/src/modules/BootSupportCheck.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootSupportCheck.ycp?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootSupportCheck.ycp (original) +++ trunk/bootloader/src/modules/BootSupportCheck.ycp Fri Mar 30 13:02:53 2012 @@ -74,7 +74,7 @@ * Check that bootloader is known and supported */ boolean KnownLoader () { - if (! contains (["grub", "grub2", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) + if (! contains (["grub", "grub2", "grub2-efi", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) { if (Bootloader::getLoaderType () != "lilo") @@ -122,7 +122,7 @@ return true; if (Arch::i386() || Arch::x86_64()) { if (checkElilo()) { - if (lt == "elilo") + if (lt == "elilo" || lt == "grub2-efi") return true; } else { if ((lt == "grub") || (lt == "lilo") || (lt == "grub2")) @@ -304,6 +304,13 @@ } /** + * GRUB2EFI-related check + */ +global boolean GRUB2EFI () { + return true; +} + +/** * ELILO related check */ boolean ELILO () { @@ -357,6 +364,8 @@ supported = ZIPL () && supported; else if (lt == "grub2") supported = GRUB2 () && supported; + else if (lt == "grub2-efi") + supported = GRUB2EFI () && supported; y2milestone ("Configuration supported: %1", supported); return supported; Modified: trunk/bootloader/src/modules/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Makefile.am?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/modules/Makefile.am (original) +++ trunk/bootloader/src/modules/Makefile.am Fri Mar 30 13:02:53 2012 @@ -12,6 +12,7 @@ BootELILO.ycp \ BootGRUB.ycp \ BootGRUB2.ycp \ + BootGRUB2EFI.ycp \ BootLILO.ycp \ BootPOWERLILO.ycp \ BootZIPL.ycp \ Modified: trunk/bootloader/src/routines/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/dialogs.ycp?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/routines/dialogs.ycp (original) +++ trunk/bootloader/src/routines/dialogs.ycp Fri Mar 30 13:02:53 2012 @@ -84,7 +84,7 @@ string lt = Bootloader::getLoaderType (); term contents = `VBox ( "tab", - (lt == "grub2") + (lt == "grub2" || lt == "grub2-efi") ? nil : `Right ("adv_button") ); @@ -101,7 +101,7 @@ } // F#300779: end - list<string> widget_names = (lt == "grub2") + list<string> widget_names = (lt == "grub2" || lt == "grub2-efi") ? ["tab"] : ["tab", "adv_button"]; map<string,map<string,any> > widget_descr = $[]; @@ -109,12 +109,12 @@ widget_descr = (map<string,map<string,any> >) union (CommonGlobalWidgets (), Bootloader::blWidgetMaps ()); widget_descr["tab"] = CWMTab::CreateWidget($[ - "tab_order": (lt == "grub2") + "tab_order": (lt == "grub2" || lt == "grub2-efi") ? ["installation"] : ["sections", "installation"], "tabs": TabsDescr (), "widget_descr": widget_descr, - "initial_tab" : (lt == "grub2") + "initial_tab" : (lt == "grub2" || lt == "grub2-efi") ? "installation" : return_tab ]); Modified: trunk/bootloader/src/routines/global_widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/global_widgets.ycp?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/routines/global_widgets.ycp (original) +++ trunk/bootloader/src/routines/global_widgets.ycp Fri Mar 30 13:02:53 2012 @@ -330,6 +330,22 @@ return `redraw; } + if (new_bl == "grub2-efi") { + if (Popup::ContinueCancel (_(" +The grub2-efi is still under develope and test. + +Proceed? +"))) + { + BootCommon::other_bl[old_bl] = Bootloader::Export (); + BootCommon::setLoaderType ("grub2-efi"); + Bootloader::Propose (); + BootCommon::location_changed = true; + BootCommon::changed = true; + } + return `redraw; + } + if (Arch::x86_64 ()) { if (new_bl == "elilo") { // continue/cancel pop-up @@ -720,7 +736,7 @@ `HStretch (), `VBox ( `Label (""), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2" || lt == "grub2-efi") ? `Empty() : "loader_options" ), `HSpacing (2) @@ -728,7 +744,7 @@ `VSpacing (0.4) )), `VStretch (), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2-efi") ? `Empty () : "loader_location", `VStretch (), @@ -737,8 +753,8 @@ : "inst_details", `VStretch () ), `HStretch ()), - "widget_names": (lt == "none" || lt == "default" || lt=="zipl" || lt == "grub2") - ? [ "loader_type", "loader_options", "loader_location"] + "widget_names": (lt == "none" || lt == "default" || lt=="zipl" || lt == "grub2-efi") + ? [ "loader_type", "loader_options" ] : [ "loader_type", "loader_options", "loader_location", "inst_details"] ], Modified: trunk/bootloader/src/routines/switcher.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/switcher.ycp?rev=67833&r1=67832&r2=67833&view=diff ============================================================================== --- trunk/bootloader/src/routines/switcher.ycp (original) +++ trunk/bootloader/src/routines/switcher.ycp Fri Mar 30 13:02:53 2012 @@ -24,6 +24,7 @@ import "BootPOWERLILO"; import "BootZIPL"; import "BootGRUB2"; +import "BootGRUB2EFI"; import "BootCommon"; /** @@ -40,7 +41,8 @@ "elilo" : BootELILO::GetFunctions, "zipl" : BootZIPL::GetFunctions, "ppc" : BootPOWERLILO::GetFunctions, - "grub2" : BootGRUB2::GetFunctions + "grub2" : BootGRUB2::GetFunctions, + "grub2-efi" : BootGRUB2EFI::GetFunctions ]; map<string,any> () gf = (map<string,any>())(bl_functions[bootloader]:nil); if (gf == nil) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
snwint@svn2.opensuse.org