Efraim Flashner writes: > On Wed, Apr 03, 2019 at 09:49:59PM +0200, Pierre Neidhardt wrote: >> Thank you Efraim, this is awesome! I second this remark! It's really helpful to see how you're doing it. Thank you for taking the time to share with us! >> > tar xf $(guix build linux-libre -S) >> > cd linux-libre >> > touch .config >> > guix environment linux-libre >> > make localmodconfig >> > >> > copy that into .config >> >> Copy what into .config? > > the .config you just created at the root of the source tarball I think there is some confusion here. When I run "touch .config" and then run "make localmodconfig", the .config file is not modified. Perhaps you meant that we need to take the stdout from "make localmodconfig", save it, and copy it (after massaging it) back into the .config file? > running make localconfig spits out a bunch of pseudo-error messages > about modules that are missing in .config. If you copy that whole > message, minus the lines starting with 'WARING', into .config and > then format it as UPERCASE_OPTION=(y|m) it gives the kernel a config > that is usable for it. > > so turning lines that look like: > module nouveau did not have configs CONFIG_DRM_NOUVEAU > > into lines that look like: > CONFIG_DRM_NOUVEAU=m I read up a little on the various targets. The documentation you mentioned was helpful, "make help" was helpful, the Makefile source was somewhat helpful, and the contents of ./scripts/kconfig/streamline_config.pl were helpful for understanding the intent of the "localmodconfig" target. It sounds like the intended use of "localmodconfig" target is to modify an existing, non-empty .config file. With that in mind, how does the procedure you describe compare to something like the following? 1) Invoke "guix repl". Then run this to determine the config that would normally be used to configure the default linux-libre kernel: scheme@(guix-user)> (assoc "kconfig" (package-native-inputs linux-libre)) $1 = ("kconfig" "/gnu/store/cwghfr06cadj2ss1ya6whgczpcba58z3-guix-module-union/share/guile/site/2.2/gnu/packages/aux-files/linux-libre/5.0-x86_64.conf") 2) Copy that file out of the store into .config. 3) Run "make olddefconfig" to non-interactively update the .config file. 4) Run "make localmodconfig" to streamline the .config based on what's currently loaded. I expected this target to also be non-interactive, but to my surprise it still asked me to choose what to set for a few options. If you do it this way, you don't have to fix up formatting. However, maybe it doesn't produce the same kind of configuration you had in mind. What do you think? > Currently this doesn't take into account the initrd. Do you mean that there are modules or configuration which the initrd might need, which this procedure might accidentally disable? -- Chris