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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 329A910D8A; Tue, 10 Jan 2023 21:20:41 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 26EC410D82; Tue, 10 Jan 2023 21:20:39 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by atuin.qyliss.net (Postfix) with ESMTPS id 1D24F10D5E for ; Tue, 10 Jan 2023 21:20:37 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4CD075C011D; Tue, 10 Jan 2023 16:20:36 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 10 Jan 2023 16:20:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1673385636; x=1673472036; bh=HLYlUdJUFO n3F4Y3gXh9WO4WLOsYObqPQo6gsFgKS6U=; b=PRLglMlctdBXxOe384cCibTuyX f/SPjbAe5HDS//KN3OvovwCZElOg9tgjhrgY3d/FhQ00XjVAqDsC95/pLwktL62Q VHIBhYodF5TvGQzu0ocNoWksEu4ZMMTLRubpxsna+J58Ha9dihgzJeipZizzmWZn BmHGO/t3ZsGLYlugcs4yfcI26fIJHLElZsgrgwpegG3d1lxmkqvk6N72Azqs/Kok +WYsZqRyfL6y86wvfJ43mN1xHs2okIb/vzC+o+BWcE8tzs3Q1WoLxxNACEfz961r v+ln8rMTJ82SQgGKHK4uMg/vfBjwEtDyWSPw8ImVPYkDeXtorChYv4NS7iyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id: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= fm3; t=1673385636; x=1673472036; bh=HLYlUdJUFOn3F4Y3gXh9WO4WLOsY ObqPQo6gsFgKS6U=; b=IxZ6tZQtOccwxXgkquJ07Xj+WeV+Eiqj/5cpf7Yqpoh7 UkzgvOdDIC+tv8Wi+LXrfEvqUBCR3nF8RSds86uHuvcd+hD7nLR52skBIQfSq+bz /RqLgcIXqLqb21KIoPxza/pL7LJ+xxpeLIhzaLloDcCCM9z+Nv3dj4oBgczKqH5A L286eEdBZWKqT4f36KRvDNj2ulK0ls37hLAQZI7LuvYa9ZAAbyrjh00gjI3+Y0e1 41cLCgCkYmE05fqSOtyOc1lzii+H3RFnk7St4mo/y/Z8TbjQFyDwlty3dWyJBc1D wj1dl19WDKPlDj/TnkCAC5iY6sTKa0mjyQc8rfLaVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrledvgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeetlhihshhs rgcutfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeelvd efkeelheejfeehffffledvfeelvefgvefhkefgtddtueetffefkedtfeffhfenucffohhm rghinhepshhpvggtthhruhhmqdhoshdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrdhish X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Jan 2023 16:20:35 -0500 (EST) Received: by x220.qyliss.net (Postfix, from userid 1000) id 4273127B; Tue, 10 Jan 2023 21:20:34 +0000 (UTC) Date: Tue, 10 Jan 2023 21:20:34 +0000 From: Alyssa Ross To: Ivan Nikolaenko Subject: Re: [PATCH] rootfs: make rootfs kernel configurable Message-ID: <20230110212034.fuakthzwluq5q25i@x220> References: <20230109143433.1136386-1-ivan.nikolaenko@unikie.com> <20230110203121.at6lkorbxuzdzqlb@x220> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nnr5thdalsacfhz3" Content-Disposition: inline In-Reply-To: <20230110203121.at6lkorbxuzdzqlb@x220> Message-ID-Hash: LG5SUAPSE47Q6VGAXPQG2C5NSJJEPMHL X-Message-ID-Hash: LG5SUAPSE47Q6VGAXPQG2C5NSJJEPMHL X-MailFrom: hi@alyssa.is 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; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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: --nnr5thdalsacfhz3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 10, 2023 at 08:31:21PM +0000, Alyssa Ross wrote: > On Mon, Jan 09, 2023 at 04:34:33PM +0200, Ivan Nikolaenko wrote: > > This patch makes it possible to use custom linux kernel. > > This is needed in case of porting Spectrum OS to the other > > hardware than generic-x86. > > > > To override rootfs kernel, define "spectrum_kernel" in the > > customization overlay. > > > > Signed-off-by: Ivan Nikolaenko > > --- > > host/rootfs/default.nix | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Did you change your mind from the approach you suggested in your > previous email? [1] I liked that approach, because it didn't require > adding something custom to the global Nixpkgs namespace that's only used > in one place, outside of Nixpkgs. Actually, I'm guessing the reason for doing it this way is that then even if you want to import e.g. release/live rather than host/rootfs, it's still easy to override the kernel. So to preserve that nice property, there are a couple of possibilities for how we could approach this: - Just override linux_latest in your overlay. The advantage to that is that it means Spectrum doesn't have to worry about the concept of a custom kernel, but the disadvantage is that it might mean unecessary rebuilds or other problems caused by packages that don't expect linux_latest to be something custom. - Add a "hostKernel" option to the config attribute set. This would work very similarly to what you have here. It just means that we're using our own namespace rather than the Nixpkgs one. The first option is best for me, because it means no changes to Spectrum are required, but if it's causing you problems, then I wouldn't mind adding the config option. > [1]: https://spectrum-os.org/lists/archives/spectrum-devel/4d41315a-05d2-747c-3708-37f7c8c34684@unikie.com/ > > > > > diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix > > index 0a84f55..b853250 100644 > > --- a/host/rootfs/default.nix > > +++ b/host/rootfs/default.nix > > @@ -81,7 +81,7 @@ let > > imports = [ (modulesPath + "/profiles/all-hardware.nix") ]; > > }); > > > > - kernel = pkgs.linux_latest; > > + kernel = pkgs.spectrum_kernel or pkgs.linux_latest; > > > > appvm = import ../../img/app { > > inherit config; > > -- > > 2.34.1 > > > > --nnr5thdalsacfhz3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmO91psACgkQ+dvtSFmy ccDQQA//UeyQi9+h62/WnYJpqzGkjGGILUna3B3cEaZ+g7RY9B1dTr5Fq+SSvSoQ Vjx+ANq21u0zH79+CUeRktifR9sw3ClceTBm5NOphLT60HQZJ0P/smqKJS58yyhU 0KgzdKx3kCGXYBSkTiFKIj71N8KJyQub+gL94YaLYae6vQlVt0seOpHYQXlGu2rE ulnaZ60QMjXU1YxugqFIvK3M3yEyupxs+iz8i25GWPvlLJr1a62EPTMiGxZlcFcs +ZtGB3ndj+olW/szXE316RljbWiookJ6IPkA+5Jj8ZDySy2M3wkdiTUN/d7Hrk1i 2128Ml9f3gRb8gvVrjyXG1JsSN+vfN1RFOTrx/U+DQ65R8aD+krWzx+Ox3JLc3wE 1Hnnvclj6XfQ9+iuF9OAqZ8kORygQ/v3MX/91euS7WaHrJXVss9t3cBU9GWbbKfj rgbXbBEjSVfqlo5lkPryyoHWlRRnzi0XGO+qaJU/MKfCEwsqZ1fcddNDeKaB5/cj uony15S4LmcEWb1uKn6edKJX6b8CgnmCtzU7JngC7COoeqodVb+gnuX4e82Y7d7U JP7jH4v71fH5ZaPamwtKdfDsXIk24aX8zIw4moQ3c6bA/fTd0ZYpDHSl93obhsnd uFX4ddjp5LksqhBW06xPkEjVit29xIz4u2OmIFBgCLoH4R6eh0o= =srP9 -----END PGP SIGNATURE----- --nnr5thdalsacfhz3--