From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 23E4D12507; Wed, 20 Apr 2022 10:13:58 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 1A75C1247A; Wed, 20 Apr 2022 10:13:55 +0000 (UTC) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by atuin.qyliss.net (Postfix) with ESMTPS id 1D6B312474 for ; Wed, 20 Apr 2022 10:13:50 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id EE7B33202113; Wed, 20 Apr 2022 06:13:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 20 Apr 2022 06:13:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1650449626; x=1650536026; bh=UT B0zFtuKJXmpcI4rHiM1kCqQ98VtSRAyIioQLa7LOc=; b=eV8+mf/Y0ORCSFcL7G tP+XYWU2uxhEdcabULeQwufw+5IpCJJdcX83ApGdshcCotUu4PFqf33ve6a4nB9J odZU0YFPZ7MbKeDATRPS6fQJaWhTHsEcUYOdSfwrcj62au+5vF8h9drdCpbxGPwg uf302bFWGA2MsuQnpnoaxWXiwmG0LQss++eWsFaiqbuU2Q9Y68b+kCyf2tG7SRfs 3TMf9t+F6ixc4Q31kvAXbtRZbPLxPZ4LVATAtiVwfIvTVY5E27QKjB+TwyTxnzLJ WZMEezv6SESCIJwk39ttzKv9CESTC/NnrBpal/cW9gHnZhjLiTcbUJkkUL/Rds/R qBvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650449626; x=1650536026; bh=UTB0zFtuKJXmpcI4rHiM1kCqQ98VtSRAyIi oQLa7LOc=; b=JRIW3QplV/Xappkg1YyEUuJHtA0jw63Dfb8LWzarbHn3PjZnXWc RT17a5H2eagu6MVkAJ8Syo8Qbertw69uqzLMQvyPd2cus3KV5AZYGuTjzZmS9X6I C7x9IfGl6XZB1k/0STHA5FoMCWnJhx1hm95w9n/05BlvOP5jDhU/v6QK8+znDh1m CNGjmYx4dI324m15klb+vZ/qhnHdwSTSLOXQ5E8UTcThrJRyB9BYvoav4sbng0Zz C6KXUwDkpowQkcGWVmSdGYodJQ+MJYd2gBJENRy7M0qqxgBoywdGEwzf7F29s4cf Y2jPohnsPYsstJjCqlAB9cDAzSTGEM1ubbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtddtgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhs rgcutfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeeghe ejjefgudeuvdekieffgfetgeejjeetkeehjeevtdehkeeltdevgfekjeetkeenucffohhm rghinheptghfghdrihhnnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepqhihlhhishhssegvvhgvrdhqhihlihhsshdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Apr 2022 06:13:45 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id D4E0236F; Wed, 20 Apr 2022 10:13:43 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH 2/2] img/combined: avoid chainloading in GRUB Date: Wed, 20 Apr 2022 10:12:14 +0000 Message-Id: <20220420101214.1228221-3-hi@alyssa.is> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420101214.1228221-1-hi@alyssa.is> References: <20220420101214.1228221-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: D2MHU6GGGLPM3Z6WVLU64D3THDCSE3WX X-Message-ID-Hash: D2MHU6GGGLPM3Z6WVLU64D3THDCSE3WX X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Ville Ilvonen , Puck Meerburg X-Mailman-Version: 3.3.5 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 Cc: Puck Meerburg --- img/combined/default.nix | 10 ++++++++++ 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 +# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross 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" { -- 2.35.1