diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-04-20 10:01:27 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-04-21 11:47:07 +0000 |
commit | b1ff26eb27ea905357f8bf217d0f0cfbea33c37b (patch) | |
tree | 187498f607ea57b0e5218793ae281f1f3d4c5978 /img/combined | |
parent | b72a136e9ae265f61f5c6dbbd37367c8e659ae49 (diff) | |
download | spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar.gz spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar.bz2 spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar.lz spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar.xz spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.tar.zst spectrum-b1ff26eb27ea905357f8bf217d0f0cfbea33c37b.zip |
img/combined: avoid chainloading in GRUB
Some UEFI implementations (like the one on Ville's Thinkpad P43s) failed to chainload Spectrum from GRUB. Now that Spectrum has a proper bootloader, we can avoid that chainloading entirely, which will hopefully make the broken firmware happier. Reported-by: Ville Ilvonen <ville.ilvonen@unikie.com> Cc: Puck Meerburg <puck@puckipedia.com> Message-Id: <20220420101214.1228221-3-hi@alyssa.is> Tested-by: Ville Ilvonen <ville.ilvonen@unikie.com>
Diffstat (limited to 'img/combined')
-rw-r--r-- | img/combined/default.nix | 10 | ||||
-rw-r--r-- | img/combined/grub.cfg.in | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/img/combined/default.nix b/img/combined/default.nix index 86e07e2..16cd506 100644 --- a/img/combined/default.nix +++ b/img/combined/default.nix @@ -35,6 +35,16 @@ let grubCfg = substituteAll { src = ./grub.cfg.in; + + nativeBuildInputs = [ mtools ]; + + preInstall = '' + export spectrumKernelParams="$( + mcopy -i ${eosimages.image}@@1M ::/loader/entries/spectrum.conf - | + grep '^options ' | + sed 's/^options //')" + ''; + linux = removePrefix storeDir installer.kernel; initrd = removePrefix storeDir installer.initramfs; inherit (installer) kernelParams; diff --git a/img/combined/grub.cfg.in b/img/combined/grub.cfg.in index 1a91a75..31b09d6 100644 --- a/img/combined/grub.cfg.in +++ b/img/combined/grub.cfg.in @@ -1,5 +1,5 @@ # SPDX-License-Identifier: EUPL-1.2 -# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is> +# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is> insmod efi_gop insmod efi_uga @@ -13,7 +13,8 @@ terminal_output gfxterm menuentry "Try Spectrum" { loopback live (hd0,gpt3)/Spectrum-0.0-x86_64-generic.0.Live.img - chainloader (live,gpt1)/efi/boot/bootx64.efi + linux (live,gpt1)/spectrum/linux @spectrumKernelParams@ + initrd (live,gpt1)/spectrum/initrd } menuentry "Install Spectrum" { |