GNU bug report logs -
#77061
[PATCH] update doc/guix-cookbook.texi Update instructions for building a custom kernel.
Previous Next
To reply to this bug, email your comments to 77061 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#77061
; Package
guix-patches
.
(Sun, 16 Mar 2025 23:22:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Adam <>" <adam.quandour <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 16 Mar 2025 23:22:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Adam Quandour <adam.quandour <at> gmail.com>
---
doc/guix-cookbook.texi | 46 ++++++++++++++----------------------------
1 file changed, 15 insertions(+), 31 deletions(-)
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index d9b98a2..51e30d1 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -1722,43 +1722,27 @@ 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
-including an actual @file{.config} file as a native input to our custom
-kernel. The following is a snippet from the custom @code{'configure} phase of
-the @code{make-linux-libre} package definition:
+first is to provide a standard @file{defconfig} to @code{customize-linux}
+procedure. To produce such file you need to obtain Linux source code, create a
+@file{.config} file (using @code{make menuconfig} command, for example) or
+provide one you already have. After that you will need to run
+@code{make savedefconfig} command within the kernel source tree - this will
+produce the @file{defconfig} file which we can be used to build a custom kernel.
-@lisp
-(let ((build (assoc-ref %standard-phases 'build))
- (config (assoc-ref (or native-inputs inputs) "kconfig")))
-
- ;; Use a custom kernel configuration file or a default
- ;; configuration file.
- (if config
- (begin
- (copy-file config ".config")
- (chmod ".config" #o666))
- (invoke "make" ,defconfig)))
-@end lisp
-
-Below is a sample kernel package. The @code{linux-libre} package is nothing
-special and can be inherited from and have its fields overridden like any
-other package:
+Below is a sample kernel package.
@lisp
-(define-public linux-libre/E2140
+(define-public my-linux-libre
(package
- (inherit linux-libre)
- (native-inputs
- `(("kconfig" ,(local-file "E2140.config"))
- ,@@(alist-delete "kconfig"
- (package-native-inputs linux-libre))))))
+ (inherit (customize-linux
+ #:linux linux-libre
+ #:defconfig
+ (local-file "defconfig")))))
@end lisp
-In the same directory as the file defining @code{linux-libre-E2140} is a file
-named @file{E2140.config}, which is an actual kernel configuration file. The
-@code{defconfig} keyword of @code{make-linux-libre} is left blank here, so the
-only kernel configuration in the package is the one which was included in the
-@code{native-inputs} field.
+In the same directory as the file defining @code{my-linux-libre} is a file
+named @file{defconfig}. This way you way you can provide kernel options
+you want to have in the result kernel.
The second way to create a custom kernel is to pass a new value to the
@code{extra-options} keyword of the @code{make-linux-libre} procedure. The
--
2.43.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sun, 06 Apr 2025 09:50:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Adam <>" <adam.quandour <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 06 Apr 2025 09:50:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 77061-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Applied with the changes below, thanks!
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index e298eb988a..6296156855 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -1725,11 +1725,11 @@ Customizing the Kernel
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{defconfig} to @code{customize-linux}
-procedure. To produce such file you need to obtain Linux source code, create a
-@file{.config} file (using @code{make menuconfig} command, for example) or
-provide one you already have. After that you will need to run
-@code{make savedefconfig} command within the kernel source tree - this will
+first is to provide a standard @file{defconfig} to @code{customize-linux}
+procedure. To produce such file you need to obtain Linux source code, create a
+@file{.config} file (using @code{make menuconfig} command, for example) or
+provide one you already have. After that you will need to run
+@code{make savedefconfig} command within the kernel source tree---this will
produce the @file{defconfig} file which we can be used to build a custom kernel.
Below is a sample kernel package.
@@ -1740,7 +1740,8 @@ Customizing the Kernel
(inherit (customize-linux
#:linux linux-libre
#:defconfig
- (local-file "defconfig")))))
+ (local-file "defconfig")))
+ (name "my-linux-libre")))
@end lisp
In the same directory as the file defining @code{my-linux-libre} is a file
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.