From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: custom kernel config Date: Thu, 04 Apr 2019 01:44:48 -0700 Message-ID: <87zhp6rwfz.fsf@gmail.com> References: <20190401180434.GF21029@macbook41> <87wokb1pg1.fsf@gmail.com> <20190403190404.GB1203@macbook41> <871s2iuavs.fsf@mimimi.i-did-not-set--mail-host-address--so-tickle-me> <20190403202758.GC1203@macbook41> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:59362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBxzb-00006k-IA for guix-devel@gnu.org; Thu, 04 Apr 2019 04:45:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBxzZ-0001NN-Ix for guix-devel@gnu.org; Thu, 04 Apr 2019 04:45:03 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:46011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBxzV-0001IQ-RO for guix-devel@gnu.org; Thu, 04 Apr 2019 04:45:01 -0400 Received: by mail-pf1-x433.google.com with SMTP id e24so994055pfi.12 for ; Thu, 04 Apr 2019 01:44:54 -0700 (PDT) In-Reply-To: <20190403202758.GC1203@macbook41> (Efraim Flashner's message of "Wed, 3 Apr 2019 23:27:58 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 >>=20 >> 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=3D(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=3Dm 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 =3D ("kconfig" "/gnu/store/cwghfr06cadj2ss1ya6whgczpcba58z3-guix-modul= e-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? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlylxAAACgkQ3UCaFdgi Rp0gtg//Yy5YmkaCY2cm9dFbYB1MObXEttjHVObjd4b+1lmfky6p0N366loeLAJS C+2yQ0Ban6Oj813npy6sBJzy9SJij1xFgTl+BzmhsIHULLFrd5Vs3/TvCoC4A6M4 KjZ+HnC1byvdWR219x0a34BJ3jQJ56dNswGZmMMdyfCrmvJqHHNa/PFzfkzLVHB2 VJ7fElU/5FdyqskyTOushTpqcR16uQo5ihW+JwtYyQegZrw5wnddux6RxPfSftS2 nIBQ4ChSCOwLgZCfYm7SEsSA4CMez3353ks3xnSgdcLZtCStRTBmF0k/LGLxhgKK 6wtdQNUCcZndP5kqf96/s4q6qVv+itW0tTROiFA85VSYsPAjtAS0wJA0/2ukR6Dk iTPKHjv40C5tsLZVv49DJHgBWUIZtfQLayMRMrYusZ/3g8D6izcLlBPk9UQB7sV9 60qPyA6X87VfmNlKcXOPlfWUuoT83k1yCZZxmshzvvuDLPzTp9lQaZC1nn/cPRi7 vjBTzwIno+IvDdXAidkBN7DeyTnFNVXbedmmQY1escYm7stny5fOxafyfIzO0yFG bXtwF5+XrR/ESG9vzIzn5zESBQU9/wWH9KW8jiurQw5z7wMylXRjtgH6L1EH1aJp RsFmYnYvu0CWo83hmVbRaMt5cq8b/vC6qGkZAmM8g77uFDY3OTc= =ydPK -----END PGP SIGNATURE----- --=-=-=--