* Custom kernel config is not taken by guix
@ 2023-03-22 16:07 eisbaer
2023-04-01 11:35 ` Guillaume Le Vaillant
[not found] ` <5d0a15e9ab3f8ce31577650959327c950d215fec@tilde.team>
0 siblings, 2 replies; 5+ messages in thread
From: eisbaer @ 2023-03-22 16:07 UTC (permalink / raw)
To: help-guix
Hello,
I'm having problems compiling the linux-libre kernel with a custom config. I'm aiming at enabeling the debug info.
The problem I am troubled with is that the configuration I am telling guix to use in my /etc/config.scm (guix system reconfigure /etc/config.scm) is not taken by guix for compiling the kernel. Instead some other configuration file is used wich hasn't the options set I want it to have. The config file I want to use is in the same folder as the /etc/config.scm and is named debug_config2. I am checking /proc/config.gz if the options I changed in debug_config2 are changed and they are not.
greetings :)
================================
/etc/config.scm
================================
;; Diese Betriebssystemkonfiguration wurde vom
;; grafischen Installationsprogramm erzeugt.
;;
;; Sobald die Installation abgeschlossen ist, kann man die
;; Systemkonfiguration einsehen, verstehen und modifizieren. Übergeben
;; Sie die modifizierte Systemkonfiguration an den Befehl
;; 'guix system reconfigure', damit die Veränderungen wirksam werden.
;; Gibt an, welche Module importiert werden müssen, um auf die
;; benutzten Variablen dieser Konfiguration zugreifen zu können.
(use-modules (gnu)
(gnu packages linux))
(use-service-modules cups desktop networking ssh xorg)
;(define %custom-linux-config
; (append `(("CONFIG_DEBUG_INFO" . #t))
; (@@ (gnu packages linux) %default-extra-linux-options)))
;(define linux-libre-debug
; ((@@ (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 "debug"
; #:extra-options %custom-linux-config))
(use-modules (guix packages)
(gnu)
(gnu packages linux)
(srfi srfi-1))
(define-public linux-libreDEBUG
(package
(inherit linux-libre)
(name "linux-libreDEBUG")
(native-inputs
`(("kconfig" ,(local-file "debug_config2"))
,@(alist-delete "kconfig"
(package-native-inputs linux-libre))))
))
(operating-system
(locale "de_DE.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "de"))
(host-name "guix-test")
(kernel linux-libreDEBUG)
;(kernel linux-libre)
;; Die Liste der Benutzerkonten ('root' ist mit eingeschlossen).
(users (cons* (user-account
(name "user")
(comment "User")
(group "users")
(home-directory "/home/user")
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (list (specification->package "nss-certs"))
%base-packages))
;; Unterhalb ist die Liste von Systemdiensten. Um nach verfügbaren
;; Systemdiensten zu suchen, führen Sie den Befehl
;; 'guix system search SCHLÜSSELWORT' in einem Terminal aus.
(services
(append (list
;; Zum Konfigurieren des "OpenSSH"-Dienstes muss unterhalb ein
;; 'openssh-configuration'-Verbundsobjekt als zweites Argument
;; für 'service' angegeben werden.
(service openssh-service-type)
(service dhcp-client-service-type)
(service ntp-service-type))
;; Dies ist die Standardliste von Diensten, zu der wir
;; Einträge hinzufügen.
%base-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))
(keyboard-layout keyboard-layout)))
(swap-devices (list (swap-space
(target (uuid
"abfd6b5f-c834-4bf4-9885-51573e9aad17")))))
;; Die Liste der Dateisysteme, die "eingehängt" werden. Die, zu den
;; Dateisystemen einzigartigen, Identifikatoren ("UUIDs") können durch das
;; Ausführen des Befehls "blkid" in einem Terminal erhalten werden.
(file-systems (cons* (file-system
(mount-point "/")
(device (uuid
"740edb31-cd49-444d-b243-21699f9d76a3"
'ext4))
(type "ext4")) %base-file-systems)))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Custom kernel config is not taken by guix
2023-03-22 16:07 Custom kernel config is not taken by guix eisbaer
@ 2023-04-01 11:35 ` Guillaume Le Vaillant
[not found] ` <5d0a15e9ab3f8ce31577650959327c950d215fec@tilde.team>
1 sibling, 0 replies; 5+ messages in thread
From: Guillaume Le Vaillant @ 2023-04-01 11:35 UTC (permalink / raw)
To: eisbaer; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 5493 bytes --]
eisbaer@tilde.team skribis:
> Hello,
> I'm having problems compiling the linux-libre kernel with a custom config. I'm aiming at enabeling the debug info.
> The problem I am troubled with is that the configuration I am telling guix to use in my /etc/config.scm (guix system reconfigure /etc/config.scm) is not taken by guix for compiling the kernel. Instead some other configuration file is used wich hasn't the options set I want it to have. The config file I want to use is in the same folder as the /etc/config.scm and is named debug_config2. I am checking /proc/config.gz if the options I changed in debug_config2 are changed and they are not.
>
> greetings :)
>
> ================================
> /etc/config.scm
> ================================
> ;; Diese Betriebssystemkonfiguration wurde vom
> ;; grafischen Installationsprogramm erzeugt.
> ;;
> ;; Sobald die Installation abgeschlossen ist, kann man die
> ;; Systemkonfiguration einsehen, verstehen und modifizieren. Übergeben
> ;; Sie die modifizierte Systemkonfiguration an den Befehl
> ;; 'guix system reconfigure', damit die Veränderungen wirksam werden.
>
>
> ;; Gibt an, welche Module importiert werden müssen, um auf die
> ;; benutzten Variablen dieser Konfiguration zugreifen zu können.
> (use-modules (gnu)
> (gnu packages linux))
> (use-service-modules cups desktop networking ssh xorg)
>
>
> ;(define %custom-linux-config
> ; (append `(("CONFIG_DEBUG_INFO" . #t))
> ; (@@ (gnu packages linux) %default-extra-linux-options)))
>
> ;(define linux-libre-debug
> ; ((@@ (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 "debug"
> ; #:extra-options %custom-linux-config))
>
> (use-modules (guix packages)
> (gnu)
> (gnu packages linux)
> (srfi srfi-1))
>
> (define-public linux-libreDEBUG
> (package
> (inherit linux-libre)
> (name "linux-libreDEBUG")
> (native-inputs
> `(("kconfig" ,(local-file "debug_config2"))
> ,@(alist-delete "kconfig"
> (package-native-inputs linux-libre))))
>
>
> ))
>
>
> (operating-system
> (locale "de_DE.utf8")
> (timezone "Europe/Berlin")
> (keyboard-layout (keyboard-layout "de"))
> (host-name "guix-test")
>
> (kernel linux-libreDEBUG)
> ;(kernel linux-libre)
> [...]
Hi.
There's a 'customize-linux' function (in the (gnu packages linux)
module) to make Linux kernels with custom configurations. I have not
tested, but maybe something like the following could do what you want:
--8<---------------cut here---------------start------------->8---
(define linux-libre-debug
(customize-linux #:linux linux-libre
#:configs '("CONFIG_DEBUG_INFO=y")))
(operating-system
(kernel linux-libre-debug)
...)
--8<---------------cut here---------------end--------------->8---
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Custom kernel config is not taken by guix
[not found] ` <5d0a15e9ab3f8ce31577650959327c950d215fec@tilde.team>
@ 2023-04-04 13:54 ` Guillaume Le Vaillant
2023-04-04 18:34 ` eisbaer
1 sibling, 0 replies; 5+ messages in thread
From: Guillaume Le Vaillant @ 2023-04-04 13:54 UTC (permalink / raw)
To: eisbaer; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
eisbaer@tilde.team skribis:
> Thanks a lot for your reply. Your example did not work on my machine. I adjusted my config.scm as you said but the guix systemc reconfigure did not run through...
>
>
> ========================
> error in /var/log/guix/drvs/jr/88fpnzh0kc7w7vwjz78b501sdy2jcg-linux-libre-6.1.15.drv.gz
> ========================
> [...]
> error: in phase 'configure': uncaught exception:
> misc-error #f "~A ~S" ("Mismatching configurations in .config and arch/x86/configs/guix_defconfig" (("CONFIG_DEBUG_INFO" (#f "y")))) #f
> phase `configure' failed after 14.2 seconds
> Backtrace:
> 8 (primitive-load "/gnu/store/a2kzfabrb2qrj85xq5z8fnkg9z5…")
> In guix/build/gnu-build-system.scm:
> 906:2 7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
> In ice-9/boot-9.scm:
> 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _)
> In srfi/srfi-1.scm:
> 634:9 5 (for-each #<procedure 7ffff6107740 at guix/build/gnu-b…> …)
> In ice-9/boot-9.scm:
> 1752:10 4 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/build/gnu-build-system.scm:
> 927:23 3 (_)
> In guix/build/kconfig.scm:
> 174:6 2 (verify-config ".config" "arch/x86/configs/guix_defconf…")
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Mismatching configurations in .config and arch/x86/configs/guix_defconfig (("CONFIG_DEBUG_INFO" (#f "y")))
Hi.
Using the 'customize-linux' function with the '#:configs' keyword just
adds the specified options to the config file. In this case it
looks like there are other options in the config file that are not
compatible with the added CONFIG_DEBUG_INFO option.
So I think you will have to make a kernel config file with the options
you want using a regular kernel configurator (e.g. "make menuconfig",
"make xconfig" etc in the kernel source tree). Then you should be able
to use this custom config file with the '#:defconfig' keyword:
--8<---------------cut here---------------start------------->8---
(define linux-libre-debug
(customize-linux #:linux linux-libre
#:defconfig (local-file "/path/to/custom/config")))
(operating-system
(kernel linux-libre-debug)
...)
--8<---------------cut here---------------end--------------->8---
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Custom kernel config is not taken by guix
[not found] ` <5d0a15e9ab3f8ce31577650959327c950d215fec@tilde.team>
2023-04-04 13:54 ` Guillaume Le Vaillant
@ 2023-04-04 18:34 ` eisbaer
2023-04-05 12:14 ` Guillaume Le Vaillant
1 sibling, 1 reply; 5+ messages in thread
From: eisbaer @ 2023-04-04 18:34 UTC (permalink / raw)
To: Guillaume Le Vaillant, help-guix
Am 4. April 2023 um 15:54 schrieb "Guillaume Le Vaillant" <glv@posteo.net>:
>
> skribis:
> eisbaer@tilde.team
>
> >
> > Thanks a lot for your reply. Your example did not work on my machine. I adjusted my config.scm as you said but the guix systemc reconfigure did not run through...
> >
> > ========================
> >
> > error in /var/log/guix/drvs/jr/88fpnzh0kc7w7vwjz78b501sdy2jcg-linux-libre-6.1.15.drv.gz
> >
> > ========================
> >
> > [...]
> >
> > error: in phase 'configure': uncaught exception:
> >
> > misc-error #f "~A ~S" ("Mismatching configurations in .config and arch/x86/configs/guix_defconfig" (("CONFIG_DEBUG_INFO" (#f "y")))) #f
> >
> > phase `configure' failed after 14.2 seconds
> >
> > Backtrace:
> >
> > 8 (primitive-load "/gnu/store/a2kzfabrb2qrj85xq5z8fnkg9z5…")
> >
> > In guix/build/gnu-build-system.scm:
> >
> > 906:2 7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
> >
> > In ice-9/boot-9.scm:
> >
> > 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _)
> >
> > In srfi/srfi-1.scm:
> >
> > 634:9 5 (for-each #<procedure 7ffff6107740 at guix/build/gnu-b…> …)
> >
> > In ice-9/boot-9.scm:
> >
> > 1752:10 4 (with-exception-handler _ _ #:unwind? _ # _)
> >
> > In guix/build/gnu-build-system.scm:
> >
> > 927:23 3 (_)
> >
> > In guix/build/kconfig.scm:
> >
> > 174:6 2 (verify-config ".config" "arch/x86/configs/guix_defconf…")
> >
> > In ice-9/boot-9.scm:
> >
> > 1685:16 1 (raise-exception _ #:continuable? _)
> >
> > 1685:16 0 (raise-exception _ #:continuable? _)
> >
> > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> >
> > Mismatching configurations in .config and arch/x86/configs/guix_defconfig (("CONFIG_DEBUG_INFO" (#f "y")))
> >
>
> Hi.
>
> Using the 'customize-linux' function with the '#:configs' keyword just
>
> adds the specified options to the config file. In this case it
>
> looks like there are other options in the config file that are not
>
> compatible with the added CONFIG_DEBUG_INFO option.
>
> So I think you will have to make a kernel config file with the options
>
> you want using a regular kernel configurator (e.g. "make menuconfig",
>
> "make xconfig" etc in the kernel source tree). Then you should be able
>
> to use this custom config file with the '#:defconfig' keyword:
>
> --8<---------------cut here---------------start------------->8---
>
> (define linux-libre-debug
>
> (customize-linux #:linux linux-libre
>
> #:defconfig (local-file "/path/to/custom/config")))
>
> (operating-system
>
> (kernel linux-libre-debug)
>
> ...)
>
> --8<---------------cut here---------------end--------------->8---
>
Ok. Thank you! That worked. At least it compiles now... However I happen to get the following error during the compilation process:
====================
zcat /var/log/guix/drvs/1l/3q5c3d89fv3dibynv55v3jqa4cdmxl-linux-libre-6.2.9.drv.gz
====================
AR arch/x86/pci/built-in.a
CC arch/x86/power/cpu.o
CC arch/x86/power/hibernate_64.o
AS arch/x86/power/hibernate_asm_64.o
CC arch/x86/power/hibernate.o
AR arch/x86/power/built-in.a
AR built-in.a
AR vmlinux.a
LD vmlinux.o
make[1]: *** [scripts/Makefile.vmlinux_o:61: vmlinux.o] Error 137
make[1]: *** Deleting file 'vmlinux.o'
make: *** [Makefile:1245: vmlinux_o] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "1") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 1951.1 seconds
command "make" "-j" "1" failed with status 2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Custom kernel config is not taken by guix
2023-04-04 18:34 ` eisbaer
@ 2023-04-05 12:14 ` Guillaume Le Vaillant
0 siblings, 0 replies; 5+ messages in thread
From: Guillaume Le Vaillant @ 2023-04-05 12:14 UTC (permalink / raw)
To: eisbaer; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]
eisbaer@tilde.team skribis:
> Ok. Thank you! That worked. At least it compiles now... However I happen to get the following error during the compilation process:
>
> ====================
> zcat /var/log/guix/drvs/1l/3q5c3d89fv3dibynv55v3jqa4cdmxl-linux-libre-6.2.9.drv.gz
> ====================
> AR arch/x86/pci/built-in.a
> CC arch/x86/power/cpu.o
> CC arch/x86/power/hibernate_64.o
> AS arch/x86/power/hibernate_asm_64.o
> CC arch/x86/power/hibernate.o
> AR arch/x86/power/built-in.a
> AR built-in.a
> AR vmlinux.a
> LD vmlinux.o
> make[1]: *** [scripts/Makefile.vmlinux_o:61: vmlinux.o] Error 137
> make[1]: *** Deleting file 'vmlinux.o'
> make: *** [Makefile:1245: vmlinux_o] Error 2
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-j" "1") exit-status: 2 term-signal: #f stop-signal: #f>
> phase `build' failed after 1951.1 seconds
> command "make" "-j" "1" failed with status 2
I think "Error 137" is the "out of memory" error for gcc and ld.
How much RAM do you have on this machine? Maybe it's not enough to
compile the Linux kernel...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-05 12:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 16:07 Custom kernel config is not taken by guix eisbaer
2023-04-01 11:35 ` Guillaume Le Vaillant
[not found] ` <5d0a15e9ab3f8ce31577650959327c950d215fec@tilde.team>
2023-04-04 13:54 ` Guillaume Le Vaillant
2023-04-04 18:34 ` eisbaer
2023-04-05 12:14 ` Guillaume Le Vaillant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).