Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fb16f664187f
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49a6964a4250
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 5, 2018

  1. grub-config.xml: handle a null font

    (cherry picked from commit 52de38f)
    grahamc committed Jun 5, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    4da554d View commit details
  2. install-grub: only try to loadfont if font is not null

    (cherry picked from commit ab889c1)
    grahamc committed Jun 5, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    49a6964 View commit details
Showing with 17 additions and 14 deletions.
  1. +3 −2 nixos/modules/system/boot/loader/grub/grub.nix
  2. +14 −12 nixos/modules/system/boot/loader/grub/install-grub.pl
5 changes: 3 additions & 2 deletions nixos/modules/system/boot/loader/grub/grub.nix
Original file line number Diff line number Diff line change
@@ -64,9 +64,10 @@ let
)) + ":" + (makeSearchPathOutput "bin" "sbin" [
pkgs.mdadm pkgs.utillinux
]);
font = if lib.last (lib.splitString "." cfg.font) == "pf2"
font = if cfg.font == null then ""
else (if lib.last (lib.splitString "." cfg.font) == "pf2"
then cfg.font
else "${convertedFont}";
else "${convertedFont}");
});

bootDeviceCounters = fold (device: attr: attr // { "${device}" = (attr."${device}" or 0) + 1; }) {}
26 changes: 14 additions & 12 deletions nixos/modules/system/boot/loader/grub/install-grub.pl
Original file line number Diff line number Diff line change
@@ -281,22 +281,24 @@ sub GrubFs {
else
insmod vbe
fi
insmod font
if loadfont " . $grubBoot->path . "/converted-font.pf2; then
insmod gfxterm
if [ \"\${grub_platform}\" = \"efi\" ]; then
set gfxmode=$gfxmodeEfi
set gfxpayload=keep
else
set gfxmode=$gfxmodeBios
set gfxpayload=text
fi
terminal_output gfxterm
fi
";

if ($font) {
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n";
$conf .= "
insmod font
if loadfont " . $grubBoot->path . "/converted-font.pf2; then
insmod gfxterm
if [ \"\${grub_platform}\" = \"efi\" ]; then
set gfxmode=$gfxmodeEfi
set gfxpayload=keep
else
set gfxmode=$gfxmodeBios
set gfxpayload=text
fi
terminal_output gfxterm
fi
";
}
if ($splashImage) {
# FIXME: GRUB 1.97 doesn't resize the background image if it