From patchwork Thu Dec 23 05:56:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 35598 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9542E27BBEA; Thu, 23 Dec 2021 05:57:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1878E27BBE9 for ; Thu, 23 Dec 2021 05:57:33 +0000 (GMT) Received: from localhost ([::1]:57460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0H6a-0007QK-8f for patchwork@mira.cbaines.net; Thu, 23 Dec 2021 00:57:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0H67-0007Ph-HD for guix-patches@gnu.org; Thu, 23 Dec 2021 00:57:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0H66-0001aT-Qc for guix-patches@gnu.org; Thu, 23 Dec 2021 00:57:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0H66-0005U5-KB for guix-patches@gnu.org; Thu, 23 Dec 2021 00:57:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52750] [PATCH] doc: cookbook: Update custom kernel guide. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Dec 2021 05:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52750@debbugs.gnu.org Cc: efraim@flashner.co.il X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164023902121071 (code B ref -1); Thu, 23 Dec 2021 05:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Dec 2021 05:57:01 +0000 Received: from localhost ([127.0.0.1]:60234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0H64-0005Tn-K1 for submit@debbugs.gnu.org; Thu, 23 Dec 2021 00:57:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:59112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0H62-0005Tf-VU for submit@debbugs.gnu.org; Thu, 23 Dec 2021 00:56:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0H62-0007P5-Ch for guix-patches@gnu.org; Thu, 23 Dec 2021 00:56:58 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:35359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0H5y-0001Zd-HH for guix-patches@gnu.org; Thu, 23 Dec 2021 00:56:56 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 311F95C0102; Thu, 23 Dec 2021 00:56:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 23 Dec 2021 00:56:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=n3C9SKfbKTlYLKzF4c67aXf 82Xk8FpM0rSCDpKlq51M=; b=YR9D0ChuWMFnEieKlr7cXYapH2UIdAw563uE3vO ivydBN+umUZ75NKzjtIwjRkZfuKdsXdTOI3TaRLM9wY55eyWPIpzH/S3lYp39gZ6 y5lESUllBZ4W/haYeXXVS0ITnHr/jd7vuO0cj7FFePr4j2jc8QSaS3nx0b6UrLAu WkjM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=n3C9SKfbKTlYLKzF4 c67aXf82Xk8FpM0rSCDpKlq51M=; b=VOgDAhsLRrFNuT7B0c8KXhDAQto3/mk5i NIpsmJzVwn0ND53W8nSPJU/Mr1g4OcBg8pKNHx1qw601xDAgrQm1rUzG1p7UY+CC ist5gmt1zwOBHiP0rrE+kGJwePGOsVAXr2kiVq/i/LYiYIXcidVJ9enqgKfT6mdy RFu52JMOdSaKRTby9itLCJegouTtF7n7NtjeEeW1qAa9Au19iAQ+IAkw2tVCY2i6 3bmBhjRywh0rJYyfUgVtR0mq9H7ajTTFMAvBOvYp2FlwDdUULM8EUCwJpMBSPQ4I nTqZt78Rop1tz6vwlfqWc+My3D1Z8tFN0aLaUcMr71vpzAl20D6HA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtjedgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepteeuiefgleehkeevffevteffueegueduvd egieffveekuefffeetuddvhffhudfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Dec 2021 00:56:50 -0500 (EST) From: Leo Famulari Date: Thu, 23 Dec 2021 00:56:45 -0500 Message-Id: <80da5b3b4c1bbdd2b0a54357aeb7ac4af685df66.1640239005.git.leo@famulari.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@famulari.name; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * doc/guix-cookbook.texi (Customizing the Kernel): Adjust to new interface. --- doc/guix-cookbook.texi | 54 ++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index e19ab9c51b..d2ce525998 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1430,37 +1430,34 @@ The @code{linux-libre} kernel package definition is actually a procedure which creates a package. @lisp -(define* (make-linux-libre version hash supported-systems - #:key - ;; A function that takes an arch and a variant. - ;; See kernel-config for an example. - (extra-version #false) - (configuration-file #false) - (defconfig "defconfig") - (extra-options %default-extra-linux-options) - (patches (list %boot-logo-patch))) +(define* (make-linux-libre* version gnu-revision source supported-systems + #:key + (extra-version #f) + ;; A function that takes an arch and a variant. + ;; See kernel-config for an example. + (configuration-file #f) + (defconfig "defconfig") + (extra-options %default-extra-linux-options)) ...) @end lisp -The current @code{linux-libre} package is for the 5.1.x series, and is +The current @code{linux-libre} package is for the 5.15.x series, and is declared like this: @lisp -(define-public linux-libre - (make-linux-libre %linux-libre-version - %linux-libre-hash - '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux") - #:patches %linux-libre-5.1-patches - #:configuration-file kernel-config)) +(define-public linux-libre-5.15 + (make-linux-libre* linux-libre-5.15-version + linux-libre-5.15-gnu-revision + linux-libre-5.15-source + '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux") + #:configuration-file kernel-config)) @end lisp Any keys which are not assigned values inherit their default value from the @code{make-linux-libre} definition. When comparing the two snippets above, -you may notice that the code comment in the first doesn't actually refer to -the @code{#:extra-version} keyword; it is actually for -@code{#:configuration-file}. Because of this, it is not actually easy to -include a custom kernel configuration from the definition, but don't worry, -there are other ways to work with what we do have. +notice the code comment that refers to @code{#:configuration-file}. Because of +this, it is not actually easy to include a custom kernel configuration from the +definition, but don't worry, there are other ways to work with what we do have. There are two ways to create a kernel with a custom kernel configuration. The first is to provide a standard @file{.config} file during the build process by @@ -1560,14 +1557,15 @@ custom kernel: (@@@@ (gnu packages linux) %default-extra-linux-options))) (define-public linux-libre-macbook41 - ;; XXX: Access the internal 'make-linux-libre' procedure, which is + ;; XXX: Access the internal 'make-linux-libre*' procedure, which is ;; private and unexported, and is liable to change in the future. - ((@@@@ (gnu packages linux) make-linux-libre) (@@@@ (gnu packages linux) %linux-libre-version) - (@@@@ (gnu packages linux) %linux-libre-hash) - '("x86_64-linux") - #:extra-version "macbook41" - #:patches (@@@@ (gnu packages linux) %linux-libre-5.1-patches) - #:extra-options %macbook41-config-options)) + ((@@@@ (gnu packages linux) make-linux-libre*) + (@@@@ (gnu packages linux) linux-libre-version) + (@@@@ (gnu packages linux) linux-libre-gnu-revision) + (@@@@ (gnu packages linux) linux-libre-source) + '("x86_64-linux") + #:extra-version "macbook41" + #:extra-options %macbook41-config-options)) @end lisp In the above example @code{%file-systems} is a collection of flags enabling