From: Danny Milosavljevic <dannym@scratchpost.org>
To: 43332@debbugs.gnu.org
Cc: Danny Milosavljevic <dannym@scratchpost.org>
Subject: [bug#43332] [PATCH v2] build-system: linux-module: Delete some huge items that we probably don't need.
Date: Fri, 11 Sep 2020 13:46:43 +0200 [thread overview]
Message-ID: <20200911114643.19958-1-dannym@scratchpost.org> (raw)
In-Reply-To: <20200911110735.8208-1-dannym@scratchpost.org>
* 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 | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 1077215671..14ff774fca 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -68,9 +68,37 @@
(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
+ ;"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
+ ;; Reinstate arch/**/dts since "scripts/dtc" depends on it.
+ ;; Reinstate arch/**/include directories.
+ ;; Reinstate arch/**/Makefile.
+ (for-each
+ (lambda (name)
+ (mkdir-p (dirname (string-append out-lib-build "/" name)))
+ (copy-recursively name
+ (string-append out-lib-build "/" name)))
+ (append (find-files "arch" "^(dts|include)$" #:directories? #t)
+ (find-files "arch" "Makefile")))
(let* ((linux (assoc-ref inputs "linux")))
(install-file (string-append linux "/System.map")
out-lib-build)
next prev parent reply other threads:[~2020-09-11 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Danny Milosavljevic [this message]
2020-09-11 11:51 ` [bug#43332] [PATCH v2] " Danny Milosavljevic
2020-09-13 21:25 ` [bug#43332] [PATCH] " Ludovic Courtès
2020-09-14 8:30 ` bug#43332: " Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200911114643.19958-1-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=43332@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).