From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: custom kernel config Date: Wed, 3 Apr 2019 23:27:58 +0300 Message-ID: <20190403202758.GC1203@macbook41> References: <20190401180434.GF21029@macbook41> <87wokb1pg1.fsf@gmail.com> <20190403190404.GB1203@macbook41> <871s2iuavs.fsf@mimimi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="O3RTKUHj+75w1tg5" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:38888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBmXQ-0002yh-Pj for guix-devel@gnu.org; Wed, 03 Apr 2019 16:31:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBmUM-0003oq-Qi for guix-devel@gnu.org; Wed, 03 Apr 2019 16:28:04 -0400 Received: from flashner.co.il ([178.62.234.194]:58420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBmUL-0003ic-T9 for guix-devel@gnu.org; Wed, 03 Apr 2019 16:28:02 -0400 Content-Disposition: inline In-Reply-To: <871s2iuavs.fsf@mimimi.i-did-not-set--mail-host-address--so-tickle-me> 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: Pierre Neidhardt Cc: guix-devel@gnu.org --O3RTKUHj+75w1tg5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2019 at 09:49:59PM +0200, Pierre Neidhardt wrote: > Thank you Efraim, this is awesome! >=20 > Efraim Flashner writes: >=20 > > For the first one I used the #:extra-options route and compiled a list. > > The second one I tried I created a custom kernel and left #:defconfig as > > #f and inherited that to add a kconfig to the native-inputs. >=20 > Oh, I think I had missed the #:defconfig option when I tried. >=20 > > Once I read a bit more of the kernel documentation it wasn't too bad to > > create a list of what I needed. >=20 > Which documentation in particular? Documentation/admin-guide/README.rst from inside the kernel tarball source. >=20 > > 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 >=20 > > and fix the formatting > > > > make localmodconfig >=20 > Why fixing the formatting? How? With a second `make localmodconfig'? >=20 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 > > if that works well enough then add "CONFIG_MODULES=3Dy" to .config and > > you're ready to try it out. >=20 > What does CONFIG_MODULES=3Dy change? (Not on my computer now, can't check > in my local linux checkout.) CONFIG_MODULES=3Dy lets the modules be loaded and installed separately, if I remember correctly. Either way, without it the build errors right at the beginning of the install phase: starting phase `install' The present kernel configuration has modules disabled. Type 'make config' and enable loadable module support. Then build a kernel with module support enabled. make: *** [Makefile:1318: modules_install] Error 1 >=20 > This walkthrough is invaluable in my opinion. So far I was under the > impression that many members of the Guix community were annoyed by > kernel compilation time and had tried to customize it, but it's really > hard. This process would make for an excellent blog article in my > opinion! :D I'll try to go ahead and write it up more nicely then. Custom compiling a kernel sounds really scary, but with Guix's rollbacks and declarative everything it's actually not too bad. Currently this doesn't take into account the initrd. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --O3RTKUHj+75w1tg5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlylF0gACgkQQarn3Mo9 g1HTwg//YKPDv/NW/QWMwl3Sn1zgFRTg/YKhNeZ3nbomc6DSccrhZ5TVMWWPhmO2 9YMHevBMBzX1v5ZrFKJw+6mpOD3wiUyqarTg3EUdneSD8tnpiEhkPCg5OHekg3T+ MHhIpxY05zJzDMUEIWfbMqHUnpQyUFQdPvHfR7BUuYSvdaJFNt7frpH9oKSV0zPB 4Xuoe8lX+B8NzUJKPrzKf/gNn3xu8HDF5cmq02c6NVddKv/mWCs7X3T1loyaI5lF ayGVaTxRz9Ohwh4xQgGvkkZmlBu/6GkuxDGXEUQTSH/VCutDitGEyJz4t9NL0r7R lj18EIArPhaDlZl1wfuFkdjqLvdObIdg5pGgBjITr/LW35rAR/r1ZzSqe3QjvG8Y 8X5ozQSOHk2gBdug83SKk2E5QKFmqYM52+Cd8ZVb5lIQagClAOWRkBu59Yf72cDp cQfrqcSFowsJehSJ279xR0DfefQLJ8/qYkOSsfA9weqatikUKE6ZuDjAGuw33ucA DP90qCs1Qq0hYasFRGOovrqCKna/xwNBUqNSuWBjTJZKYGUhQAo/MqgaAxJFHy0O mQSX0pSV/KRzw2Ee+3xku3x5hSPDbBLAD1UKMDrbyxi7ToH8fAZNLcXgiQbWuWrK sBNe9zjMeu5m9WX5se1mrB4fYo97GXuqvB6ymDdHbJWGG0l7AaM= =WJ5w -----END PGP SIGNATURE----- --O3RTKUHj+75w1tg5--