unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43332] [PATCH] build-system: linux-module: Delete some huge items that we probably don't need.
@ 2020-09-11 11:07 Danny Milosavljevic
  2020-09-11 11:46 ` [bug#43332] [PATCH v2] " Danny Milosavljevic
  2020-09-13 21:25 ` [bug#43332] [PATCH] " Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Danny Milosavljevic @ 2020-09-11 11:07 UTC (permalink / raw)
  To: 43332; +Cc: Danny Milosavljevic

* guix/build-system/linux-module.scm (make-linux-module-builder): Delete
some huge items that we probably don't need.
---
 guix/build-system/linux-module.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 1077215671..ba47817596 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -68,9 +68,27 @@
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (out-lib-build (string-append out "/lib/modules/build")))
+                ;; Delete some huge items that we probably don't need.
                 ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig,
                 ;; scripts, include, ".config".
                 (copy-recursively "." out-lib-build)
+                (for-each
+                 (lambda (name)
+                   (if (file-exists? name)
+                       (delete-file-recursively name)))
+                 (map
+                  (lambda (name)
+                    (string-append out-lib-build "/" name))
+                  '(;"arch" ; 137 MB ; Note: "scripts/dtc" depends on "arch".
+                    ;"tools" ; 44 MB ; Note: is built by our 'build phase.
+                    "tools/testing" ; 14 MB
+                    "tools/perf" ; 17 MB
+                    "drivers" ; 600 MB
+                    "Documentation" ; 52 MB
+                    "fs" ; 43 MB
+                    "net" ; 33 MB
+                    "samples" ; 2 MB
+                    "sound"))) ; 40 MB
                 (let* ((linux (assoc-ref inputs "linux")))
                   (install-file (string-append linux "/System.map")
                                 out-lib-build)




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-14  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 11:07 [bug#43332] [PATCH] build-system: linux-module: Delete some huge items that we probably don't need Danny Milosavljevic
2020-09-11 11:46 ` [bug#43332] [PATCH v2] " Danny Milosavljevic
2020-09-11 11:51   ` Danny Milosavljevic
2020-09-13 21:25 ` [bug#43332] [PATCH] " Ludovic Courtès
2020-09-14  8:30   ` bug#43332: " Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).