From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE 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 4D15A75517; Tue, 27 Sep 2022 11:18:32 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id ED75F75505; Tue, 27 Sep 2022 11:18:29 +0000 (UTC) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by atuin.qyliss.net (Postfix) with ESMTPS id 0D4D6754E7 for ; Tue, 27 Sep 2022 11:18:26 +0000 (UTC) Received: by mail-ed1-x536.google.com with SMTP id z13so12661728edb.13 for ; Tue, 27 Sep 2022 04:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie.com; s=google; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=C/CTutUDvve7kOBZGCsnWoH+dSmKUXCrMawYYroNsBw=; b=Tg5wPlTL+HfJKLWWqBXGQe3BGWUXP1oP8xZvGVeDc6Oc3gqshpmEzkfM8UdUmgBTId iV/gwSA/DhpMRx6kMZx1vGPK8fVtVHDP429kerOhneRjBIs4sIERYCSCzk519ICmaQ6p 8RePFQ3/QdX8OzDVXdv2JnRbYfw5cTToGQHvCiPIBKhRFlUcCqGNxz+fq/lKmN4sDIXp q31Cf1cVY97nSASi7pMc436SIiB1pfHgxEW4VSRMEU2uaPSfYSiDpMbwVn5Ul2TADxqa jjU8DWc8HEK+PZZqtsQ5cfUnEOwrLUPVpOXrD8iTLaoMLLDnjKq5jmXHyUnpx/+MRtW4 G3Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=C/CTutUDvve7kOBZGCsnWoH+dSmKUXCrMawYYroNsBw=; b=wEvDeBxbAR/A4kBgalFmcBhtbPR4IqXHpIZfpLP3Y4d7oUXVPbNmMLqicflcasdcde Es+XdOLo3ODiFpJvC5DCV7KtVQDo+LEOZC2KGYRRaGTYSdxOYZYI97FTJJYjqkCnB8nt EqIaILeS51ilAoaHJaeVqtMnV1DhbN6o68Znzidi4anawcXolVbL6ji8W/WJ2CTd1zy6 Hk1IWdiFSOxs3IGdA1EM3AwT0ECpgQfEIB6zoT7twX1dzk+mCmUdICOhmHT0d+9+9dVr mM5lULVyC/2ryEPYh09wgl74h+Za6e02pqW+MRRPf2hgiQ8bS7qe/w5jeXWjnmpLcrWA cpPQ== X-Gm-Message-State: ACrzQf0D2IAAYaQfsC809sZ6UhCYQPfEYXNGjxwlWkykcfp5O2SAjv5o 18IA5OzDhp6szWU9L2sblnbi74fgW1AQV68w X-Google-Smtp-Source: AMsMyM417i5yuRKRPepvlGWawzwnTOrcm5qf0J7YTUGQYOjLeJHEFySRKBMj1NyCL0fsQVcBO8up8Q== X-Received: by 2002:a05:6402:11c8:b0:451:7220:6343 with SMTP id j8-20020a05640211c800b0045172206343mr26712563edw.184.1664277503534; Tue, 27 Sep 2022 04:18:23 -0700 (PDT) Received: from x220.qyliss.net (p4feb786f.dip0.t-ipconnect.de. [79.235.120.111]) by smtp.gmail.com with ESMTPSA id v8-20020a056402174800b0044bfdbd8a33sm1044709edx.88.2022.09.27.04.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 04:18:22 -0700 (PDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id A43D4199C; Tue, 27 Sep 2022 11:18:21 +0000 (UTC) From: Alyssa Ross To: Ivan Nikolaenko Subject: Re: [PATCH] EFI Loader: use correct arch suffix In-Reply-To: <20220927105649.2265480-1-ivan.nikolaenko@unikie.com> References: <20220927105649.2265480-1-ivan.nikolaenko@unikie.com> Date: Tue, 27 Sep 2022 11:17:58 +0000 Message-ID: <87h70t83rt.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Message-ID-Hash: JKZU7RQB4Z4VYSSR3Q4QNIRCRGYXIYCU X-Message-ID-Hash: JKZU7RQB4Z4VYSSR3Q4QNIRCRGYXIYCU X-MailFrom: alyssa.ross@unikie.com X-Mailman-Rule-Hits: header-match-devel.spectrum-os.org-0 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1 CC: devel@spectrum-os.org 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: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ivan Nikolaenko writes: > Previously there were hardcoded "x64" in EFI loaders' filenames. > > Signed-off-by: Ivan Nikolaenko > --- > img/combined/default.nix | 5 +++-- > img/live/Makefile | 2 +- > img/live/default.nix | 5 +++-- > nix/eval-config.nix | 11 ++++++++++- > 4 files changed, 17 insertions(+), 6 deletions(-) Thanks for looking at this. I knew this would come up at some point! Your patch looks good, except: > diff --git a/nix/eval-config.nix b/nix/eval-config.nix > index 467f877..4234321 100644 > --- a/nix/eval-config.nix > +++ b/nix/eval-config.nix > @@ -8,6 +8,15 @@ > else {} > }: >=20=20 > -({ pkgs ? import {} }: { > +({ pkgs ? import {} }: with pkgs; { > inherit pkgs; > + > + archSuffix =3D > + if pkgs.stdenv.isx86_64 then > + "x64" > + else if pkgs.stdenv.isAarch64 then > + "aa64" > + else > + throw "Unsupported architecture"; > + > }) config > --=20 > 2.25.1 I don't really want this file to turn into an unstructured list of global constants, but I think there might be a better way: Nixpkgs already has an unexposed mapping of Nixpkgs platforms to EFI architecture names[1], so it would be a shame to have to duplicate it ourselves. What if instead, we moved that list somewhere accessible in Nixpkgs, like how Nixpkgs already exposes the Linux and QEMU names for architectures[2]? Then we could just access stdenv.hostPlatform.efiArch or whatever in our Nix expressions, and so could Nixpkgs. I imagine that'd be a welcome (and small) Nixpkgs refactoring, and I'd gladly backport it to Spectrum's Nixpkgs immediately after it was accepted upstream. [1]: https://github.com/NixOS/nixpkgs/blob/68770d269df8d7d8c7deba87156f66b0= f997c071/nixos/modules/installer/cd-dvd/iso-image.nix#L434-L445 [2]: https://github.com/NixOS/nixpkgs/blob/68770d269df8d7d8c7deba87156f66b0= f997c071/lib/systems/default.nix#L118 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmMy2+cACgkQ+dvtSFmy ccDXchAAm2neB+K9+82iBWmnLb4s5iW7p4UeB6nQS3l2t994G9gATXiob1Gm3fHd S6FeM5YTvOEAH/zaUo2toBcHgE4j7Rl1UzkkJiMnNU4wDKRB41BmaygxR1Az28XY vY4mmeArxxj9TStSjbTXF2MvLGLNolkcBE/GyN39XMuTa0KCysdBwyzEvku9nups wJOtvkGY87+ugA7dSv2zXfx5jp3lIBbUUJpeSR/pLD+amNU+jBr3EEiZSiNIjK2h 8uhrjtshY3/UTzBnYZV7TsdEsjXlXq3uBhyQVFZLJD4a6jLkoBQncxBpYrG55o7t 3vc2WGD8VUbEW0p36uoCS/ssdkcUbHSEuaaMQKTJ/l47hczV4BbOp+8rxLrf+u3I OKExjJhPt/GjVW0Hx7fqLoKbDfJSNLn/+WpM20w0NsqoPYUeq7+fotBXqzp15iAR hu885FnfhGKa2JRLkBvZhjftfvoDPTCxenA/9eeBYMN9cEVr2gabpw0kBxhyK5H5 +DlaqTvxSe2Jqh2XN1VF+w21kYrVENPrhygp1CewKzn9Z4G+yaJz9tEd9Zv4ZTZ1 YBgIqMcUByIRs+vltMOKdERl49sjms2tVSmm09mnIpGizinOQiuwL4mhlQK6jtSk b6OexIq+dy0+gNf4fqdC6GVwZgdEmQXHba+7BIFyCApLLR9SbgU= =xBvC -----END PGP SIGNATURE----- --=-=-=--