]> code.delx.au - refind/commitdiff
Added support for "-1" value to "screensaver" token. Modified
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 14 Dec 2013 23:28:43 +0000 (18:28 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 14 Dec 2013 23:28:43 +0000 (18:28 -0500)
install.sh and mkrlconf.sh to create a new boot option that sets the
efi_no_storage_paranoia kernel option.

NEWS.txt
docs/refind/configfile.html
docs/refind/todo.html
install.sh
mkrlconf.sh
refind.conf-sample
refind/config.c
refind/menu.c
refind/screen.c

index ec97a1b4ea4272770a598859a304374441dd04be..bcfefd45d3fb2ecee7480eb5d5b3a29340d05fa6 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,16 @@
-0.7.6 (11/??/2013):
+0.7.6 (12/??/2013):
 -------------------
 
+- Added support for a blank-screen startup: Set "screensaver -1" and the
+  screen saver will be initialized when rEFInd starts. If you set a low
+  "timeout" value, the result will be a boot straight to the default OS
+  unless you hit a key soon after rEFInd starts. Once you hit a key, the
+  screensaver will be disabled.
+
+- Modified install.sh and mkrlconf.sh to create a new Linux kernel
+  option set: "Boot without EFI storage paranoia," which passes the
+  efi_no_storage_paranoia option to the kernel.
+
 - Added --ownhfs {target} option to install.sh. This option causes rEFInd
   to install to an HFS+ partition in a way that's more consistent with the
   way the Mac's native boot loader is installed. Note that you should NOT
index 6efd42cd130fd82edcf243cadb152ab73d6a8e60..4bae3e57c8bb72fb3b4dbd6e1cfd04299d10ed21 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-11/10/2013, referencing rEFInd 0.7.5</p>
+12/14/2013, referencing rEFInd 0.7.5</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
@@ -214,7 +214,7 @@ timeout 20
 <tr>
    <td><tt>screensaver</tt></td>
    <td>numeric value</td>
-   <td>Sets the number of seconds of inactivity before the screen blanks to prevent burn-in. The display returns after most keypresses (unfortunately, not including modifiers such as Shift, Control, Alt, or Option). The default is <tt>0</tt>, which disables this feature.</td>
+   <td>Sets the number of seconds of inactivity before the screen blanks to prevent burn-in. The display returns after most keypresses (unfortunately, not including modifiers such as Shift, Control, Alt, or Option). The default is <tt>0</tt>, which disables this feature. Setting this token to <tt>-1</tt> causes a blank display until the <tt>timeout</tt> value passes or you press a key.</td>
 </tr>
 <tr>
    <td><tt>hideui</tt></td>
@@ -311,6 +311,11 @@ timeout 20
    <td>none or <tt>0</tt></td>
    <td>When set, causes rEFInd to add Linux kernels (files with names that begin with <tt>vmlinuz</tt> or <tt>bzImage</tt>) to the list of EFI boot loaders, even if they lack <tt>.efi</tt> filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in <tt>.efi</tt>. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (<a href="drivers.html">Drivers</a> and the <tt>also_scan_dirs</tt> options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. Versions of rEFInd prior to 0.5.0 left this option commented out in the <tt>refind.conf-sample</tt> file, but as of version 0.5.0, this option is enabled in the default configuration file. The program default remains to not scan for such kernels, though, so you can delete or uncomment this option to keep them from appearing in your boot menu. Passing any option but <tt>0</tt> causes scans for all kernels to occur; passing a <tt>0</tt> causes these kernels to not be scanned. (This could be useful if you want to override a setting of <tt>scan_all_linux_kernels</tt> in an included secondary configuration file.)</td>
 </tr>
+<tr>
+   <td><tt>max_tags</tt></td>
+   <td>numeric (integer) value</td>
+   <td>Limits the number of tags that rEFInd will display at one time. If rEFInd discovers more loaders than this value, they're shown in a scrolling list. The default value is <tt>0</tt>, which imposes no limit.</td>
+</tr>
 <tr>
    <td><tt>default_selection</tt></td>
    <td>a substring of a boot loader's title; or a numeric position</td>
index bca8a39bc7b04c2ff7c280804d4e962636335857..cd5110faa570b42f4392d6350c04651bfc2f80c3 100644 (file)
@@ -219,6 +219,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
        and/or initial RAM disks relative to the rEFInd directory (or the
        boot loader's directory, in the case of initrds).</li>
 
+    <li>Currently the background for certain subscreens (such as the
+       information page or submenu listings) is a solid color based on the
+       upper-left corner of the screen. Having an option to support a
+       transparent background is desirable to some users.</li>
+
     </ul></li> <!-- Improvements -->
 
 <li><b>Known bugs that need squashing:</b>
index d00c6a891b88c417f786581194b0b5c743fe8cc1..a31dbb33b9c9325203981f1ae2c346917c9414ed 100755 (executable)
@@ -780,9 +780,10 @@ GenerateRefindLinuxConf() {
          fi
       fi
       DefaultOptions="$GRUB_CMDLINE_LINUX $GRUB_CMDLINE_LINUX_DEFAULT"
-      echo "\"Boot with standard options\" \"ro root=$RootFS $DefaultOptions \"" > $RLConfFile
-      echo "\"Boot to single-user mode\"   \"ro root=$RootFS $DefaultOptions single\"" >> $RLConfFile
-      echo "\"Boot with minimal options\"  \"ro root=$RootFS\"" >> $RLConfFile
+      echo "\"Boot with standard options\"        \"ro root=$RootFS $DefaultOptions \"" > $RLConfFile
+      echo "\"Boot to single-user mode\"          \"ro root=$RootFS $DefaultOptions single\"" >> $RLConfFile
+      echo "\"Boot without EFI storage paranoia\" \"ro root=$RootFS $DefaultOptions efi_no_storage_paranoia\"" >> $RLConfFile
+      echo "\"Boot with minimal options\"         \"ro root=$RootFS\"" >> $RLConfFile
    fi
 }
 
index f7c1f591ab4e70c6fdaa36e0231a95c44b9f7e9f..ae9eff6b1f100c9dbdb1364f23ac7c06a1345891 100755 (executable)
@@ -40,9 +40,10 @@ if [[ ! -f $RLConfFile || $1 == "--force" ]] ; then
       fi
    fi
    DefaultOptions="$GRUB_CMDLINE_LINUX $GRUB_CMDLINE_LINUX_DEFAULT"
-   echo "\"Boot with standard options\" \"ro root=$RootFS $DefaultOptions \"" > $RLConfFile
-   echo "\"Boot to single-user mode\"   \"ro root=$RootFS $DefaultOptions single\"" >> $RLConfFile
-   echo "\"Boot with minimal options\"  \"ro root=$RootFS\"" >> $RLConfFile
+   echo "\"Boot with standard options\"        \"ro root=$RootFS $DefaultOptions \"" > $RLConfFile
+   echo "\"Boot to single-user mode\"          \"ro root=$RootFS $DefaultOptions single\"" >> $RLConfFile
+   echo "\"Boot without EFI storage paranoia\" \"ro root=$RootFS $DefaultOptions efi_no_storage_paranoia\"" >> $RLConfFile
+   echo "\"Boot with minimal options\"         \"ro root=$RootFS\"" >> $RLConfFile
 else
    echo "Existing $RLConfFile found! Not overwriting!"
    echo "To force overwriting, pass the --force option."
index 5d86de251b628cae9b3b551c0a6b0330b378312b..71237d5032fefa82ea218ac29ec8be96794071f0 100644 (file)
@@ -143,7 +143,7 @@ timeout 20
 #  about           - an "about this program" option
 #  exit            - a tag to exit from rEFInd
 #  shutdown        - shuts down the computer (a bug causes this to reboot
-#                    EFI systems)
+#                    many UEFI systems)
 #  reboot          - a tag to reboot the computer
 #  firmware        - a tag to reboot the computer into the firmware's
 #                    user interface (ignored on older computers)
index ee9c818096a0c5de0d1eee0c90feb113430ce31f..c310e30043f4a93a31de2dba64b256262598d1e6 100644 (file)
@@ -305,8 +305,12 @@ VOID FreeTokenLine(IN OUT CHAR16 ***TokenList, IN OUT UINTN *TokenCount)
 // handle a parameter with a single integer argument
 static VOID HandleInt(IN CHAR16 **TokenList, IN UINTN TokenCount, OUT UINTN *Value)
 {
-    if (TokenCount == 2)
-       *Value = Atoi(TokenList[1]);
+    if (TokenCount == 2) {
+       if (StriCmp(TokenList[1], L"-1") == 0)
+          *Value = -1;
+       else
+          *Value = Atoi(TokenList[1]);
+    }
 }
 
 // handle a parameter with a single string argument
index f4bfd5736ba68d7bed195058b1405ef8989dc618..c2ad279baab2692f196eeed66d59cbc25825ac2a 100644 (file)
@@ -395,13 +395,15 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty
     // override the starting selection with the default index, if any
     if (*DefaultEntryIndex >= 0 && *DefaultEntryIndex <= State.MaxIndex) {
         State.CurrentSelection = *DefaultEntryIndex;
-        UpdateScroll(&State, SCROLL_NONE);
+        if (GlobalConfig.ScreensaverTime != -1)
+           UpdateScroll(&State, SCROLL_NONE);
     }
-    State.PaintAll = TRUE;
+    if (GlobalConfig.ScreensaverTime != -1)
+        State.PaintAll = TRUE;
 
     while (!MenuExit) {
         // update the screen
-        if (State.PaintAll) {
+        if (State.PaintAll && (GlobalConfig.ScreensaverTime != -1)) {
             StyleFunc(Screen, &State, MENU_FUNCTION_PAINT_ALL, NULL);
             State.PaintAll = FALSE;
         } else if (State.PaintSelection) {
@@ -413,7 +415,8 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty
             CurrentTime = (TimeoutCountdown + 5) / 10;
             if (CurrentTime != PreviousTime) {
                SPrint(TimeoutMessage, 255, L"%s in %d seconds", Screen->TimeoutText, CurrentTime);
-               StyleFunc(Screen, &State, MENU_FUNCTION_PAINT_TIMEOUT, TimeoutMessage);
+               if (GlobalConfig.ScreensaverTime != -1)
+                  StyleFunc(Screen, &State, MENU_FUNCTION_PAINT_TIMEOUT, TimeoutMessage);
                PreviousTime = CurrentTime;
             }
         }
@@ -449,6 +452,11 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty
             // the user pressed a key, cancel the timeout
             StyleFunc(Screen, &State, MENU_FUNCTION_PAINT_TIMEOUT, L"");
             HaveTimeout = FALSE;
+            if (GlobalConfig.ScreensaverTime == -1) { // cancel start-with-blank-screen coding
+               GlobalConfig.ScreensaverTime = 0;
+               if (!GlobalConfig.TextOnly)
+                 BltClearScreen(TRUE);
+            }
         }
 
         // react to key press
index 7907d36a471140b3c9008233714608880b22da43..1676cb6118eab111e61c6dada73af9057da14a48 100644 (file)
@@ -119,7 +119,7 @@ VOID InitScreen(VOID)
     PrepareBlankLine();
 
     // show the banner if in text mode
-    if (GlobalConfig.TextOnly)
+    if (GlobalConfig.TextOnly && (GlobalConfig.ScreensaverTime != -1))
        DrawScreenHeader(L"Initializing...");
 }
 
@@ -168,7 +168,11 @@ VOID SetupScreen(VOID)
         // clear screen and show banner
         // (now we know we'll stay in graphics mode)
         SwitchToGraphics();
-        BltClearScreen(TRUE);
+        if (GlobalConfig.ScreensaverTime != -1) {
+           BltClearScreen(TRUE);
+        } else { // start with screen blanked
+           GraphicsScreenDirty = TRUE;
+        }
     }
 } // VOID SetupScreen()
 
@@ -433,6 +437,7 @@ VOID BltClearScreen(IN BOOLEAN ShowBanner)
 {
     static EG_IMAGE *Banner = NULL, *CroppedBanner;
     INTN BannerPosX, BannerPosY;
+    EG_PIXEL Black = { 0x0, 0x0, 0x0, 0 };
 
     if (ShowBanner && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_BANNER)) {
         // load banner on first call
@@ -456,14 +461,19 @@ VOID BltClearScreen(IN BOOLEAN ShowBanner)
         }
 
         // clear and draw banner
-        egClearScreen(&MenuBackgroundPixel);
+        if (GlobalConfig.ScreensaverTime != -1)
+           egClearScreen(&MenuBackgroundPixel);
+        else
+           egClearScreen(&Black);
+
         if (Banner != NULL) {
             BannerPosX = (Banner->Width < UGAWidth) ? ((UGAWidth - Banner->Width) / 2) : 0;
             BannerPosY = (INTN) (ComputeRow0PosY() / 2) - (INTN) Banner->Height;
             if (BannerPosY < 0)
                BannerPosY = 0;
             GlobalConfig.BannerBottomEdge = BannerPosY + Banner->Height;
-            BltImage(Banner, (UINTN) BannerPosX, (UINTN) BannerPosY);
+            if (GlobalConfig.ScreensaverTime != -1)
+               BltImage(Banner, (UINTN) BannerPosX, (UINTN) BannerPosY);
         }
 
     } else {