Hi, Hilton! Thank you for the message, I tried using it in my package definition ``` (define-public my-linux-package (package (inherit (customize-linux #:linux linux-libre #:defconfig (local-file "linux-libre-config"))))) ``` But unfortunately it didn't work for me ``` error: in phase 'configure': uncaught exception: misc-error #f "~A ~S" ("Mismatching configurations in .config and arch/x86/configs/guix_defconfig" (("CONFIG_RTW89" (#f "n")) ("CONFIG_RTW89_CORE" (#f "n")) ("CONFIG_RTW89_PCI" (#f "n")) ("CONFIG_RTW89_8851B" (#f "n")) ("CONFIG_RTW89_8852A" (#f "n")) ("CONFIG_RTW89_8852B_COMMON" (#f "n")) ("CONFIG_RTW89_8852B" (#f "n")) ("CONFIG_RTW89_8852BT" (#f "n")) ("CONFIG_RTW89_8852C" (#f "n")) ("CONFIG_RTW89_8922A" (#f "n")) ("CONFIG_RTW89_8851BE" (#f "n")) ("CONFIG_RTW89_8852AE" (#f "n")) ("CONFIG_RTW89_8852BE" (#f "n")) ("CONFIG_RTW89_8852BTE" (#f "n")) ("CONFIG_RTW89_8852CE" (#f "n")) ("CONFIG_RTW89_8922AE" (#f "n")))) #f phase `configure' failed after 18.4 seconds ``` Which is strange because if I download the source using "guix build linux-libre --source", unpack it, put my config and run "make" within "guix shell --development linux-libre" - it builds the source code successfully. I guess, #:defconfig in customize-linux does not use my kernel config but tries to generate the config using it? Anyway, it didn't work for me. So, I guess my question remains - is there a way to use a custom kernel config to build one?
On Sat, Mar 15, 2025 at 11:49 PM Hilton Chain <hako@ultrarare.space> wrote: > > Hi Adam, > > On Sun, 16 Mar 2025 10:02:42 +0800, > Adam wrote: > > > > Hello Guix! > > Recently I've read about customizing the kernel on this page > > https://guix.gnu.org/cookbook/en/html_node/Customizing-the-Kernel.html > > After reading I decided to try one of described there ways of > > providing my own kernel configuration. > > Long story short, in my configuration I disabled everything related to > > rtw89 driver > > ``` > > ... > > CONFIG_RTW89=n > > CONFIG_RTW89_CORE=n > > CONFIG_RTW89_PCI=n > > CONFIG_RTW89_8851B=n > > CONFIG_RTW89_8852A=n > > CONFIG_RTW89_8852B=n > > CONFIG_RTW89_8852C=n > > CONFIG_RTW89_8851BE=n > > CONFIG_RTW89_8852AE=n > > CONFIG_RTW89_8852BE=n > > CONFIG_RTW89_8852CE=n > > ... > > ``` > > And I used this code snippet to define my custom kernel package > > ``` > > (define-public my-linux-package > > (package > > (inherit linux-libre) > > (native-inputs > > `(("kconfig" ,(local-file "config")) > > ,@(alist-delete "kconfig" > > (package-native-inputs linux-libre)))))) > > ``` > > After building my package I checked the config file which is stored in > > the derivation. Unfortunately, that file had these options > > ``` > > CONFIG_RTW89=m > > CONFIG_RTW89_CORE=m > > CONFIG_RTW89_PCI=m > > CONFIG_RTW89_8851B=m > > CONFIG_RTW89_8852A=m > > CONFIG_RTW89_8852B_COMMON=m > > CONFIG_RTW89_8852B=m > > CONFIG_RTW89_8852BT=m > > CONFIG_RTW89_8852C=m > > ``` > > I assume that guix used default kernel configuration instead. So my > > question is - is there any way to provide my own .config file to build > > a kernel package? > > kconfig inputs is not a thing now, that Cookbook entry should be updated. > > Currently a ‘customize-linux’ procedure is defined in (gnu packages linux) and > should be used to define a kernel variant, you can save a defconfig and pass > it > to the procedure: > --8<---------------cut here---------------start------------->8--- > (customize-linux > #:linux linux-libre > #:defconfig > (local-file "config")) > --8<---------------cut here---------------end--------------->8--- > > Please see its docstring for details. > > Thanks