public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Richard Yao" <ryao@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:ryao commit in: /
Date: Thu,  6 Jun 2013 05:57:10 +0000 (UTC)	[thread overview]
Message-ID: <1370498024.26dd05c7c47e06cd0d883714f41cc053209eb2cc.ryao@gentoo> (raw)

commit:     26dd05c7c47e06cd0d883714f41cc053209eb2cc
Author:     Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  6 05:53:44 2013 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Thu Jun  6 05:53:44 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=26dd05c7

Replace existing modules.* files with modules.dep.bb, bug #472312

Busybox has code that enables us to avoid using a modules.dep file at
the expense of some speed. It was found that it fails to get
dependencies correct, which prevents some modules from loading properly.
We switch to explicit generation of modules.dep.bb to resolve this. At
the same time, we remove various modules.* files that are not used by
busybox to save space. The inclusion of modules.dep.bb should make
module loading slightly faster. The removal of the modules.* should
make the initramfs slightly smaller.

Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

---
 gen_initramfs.sh | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 6ad51c1..7ff6ea0 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -796,7 +796,7 @@ create_initramfs() {
 		append_data 'overlay'
 	fi
 
-	# Finalize cpio by removing duplicate files
+	# Finalize cpio by removing duplicate files and generating modules.dep.bb
 	print_info 1 "        >> Finalizing cpio"
 	local TDIR="${TEMP}/initramfs-final"
 	mkdir -p "${TDIR}"
@@ -804,6 +804,23 @@ create_initramfs() {
 
 	cpio --quiet -i -F "${CPIO}" 2> /dev/null \
 		|| gen_die "extracting cpio for finalization"
+
+	# Remove unused modules.* files
+	rm "${TDIR}/lib/modules/${KV}/modules."*
+
+	# Hack to workaround broken `busybox depmod -b`
+	touch "${TDIR}/proc/modules"
+	if [ ${UID} -eq 0 ]
+	then
+		chroot "${TDIR}" /bin/busybox depmod "${KV}" \
+			|| gen_die "generating busybox modules.dep"
+
+	else
+			fakechroot fakeroot chroot "${TDIR}" /bin/busybox depmod "${KV}" \
+			|| gen_die "generating busybox modules.dep"
+	fi
+	rm "${TDIR}/proc/modules"
+
 	find . -print | cpio ${CPIO_ARGS} -F "${CPIO}" 2>/dev/null \
 		|| gen_die "recompressing cpio"
 


             reply	other threads:[~2013-06-06  5:57 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  5:57 Richard Yao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-02 12:43 [gentoo-commits] proj/genkernel:ryao commit in: / Richard Yao
2013-10-02 12:43 Richard Yao
2013-10-02 12:43 Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 10:05 Richard Yao
2013-06-09 10:05 Richard Yao
2013-06-09 10:02 Richard Yao
2013-06-09 10:02 Richard Yao
2013-06-09  9:58 Richard Yao
2013-06-09  9:58 Richard Yao
2013-06-09  9:57 Richard Yao
2013-06-09  9:53 Richard Yao
2013-06-09  9:51 Richard Yao
2013-06-09  9:49 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  8:16 Richard Yao
2013-06-09  7:58 Richard Yao
2013-06-09  6:43 Richard Yao
2013-06-06  6:09 Richard Yao
2013-06-06  5:54 Richard Yao
2013-06-06  3:52 Richard Yao
2013-06-06  3:36 Richard Yao
2013-06-06  3:36 Richard Yao
2013-06-06  3:36 Richard Yao
2013-06-06  3:36 Richard Yao
2013-06-03 23:49 [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-06  3:36 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-03 23:49 Richard Yao
2013-06-03 23:47 Richard Yao
2013-06-03 23:43 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:34 Richard Yao
2013-06-03 23:34 Richard Yao
2012-11-11 18:04 Richard Yao
2012-11-11 17:32 Richard Yao
2012-11-05 18:42 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-11-05 18:30 Richard Yao
2012-08-25  1:44 Richard Yao
2012-08-25  1:36 Richard Yao
2012-08-25  1:19 Richard Yao
2012-08-25  1:04 Richard Yao
2012-08-16 18:33 Richard Yao
2012-08-16 18:33 Richard Yao
2012-08-16 18:33 Richard Yao

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370498024.26dd05c7c47e06cd0d883714f41cc053209eb2cc.ryao@gentoo \
    --to=ryao@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox