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: defaults/
Date: Sun,  9 Jun 2013 06:43:29 +0000 (UTC)	[thread overview]
Message-ID: <1370759063.f60f1859fd778c5476bf152f0091957fb397927d.ryao@gentoo> (raw)

commit:     f60f1859fd778c5476bf152f0091957fb397927d
Author:     Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
AuthorDate: Sun Jun  9 06:17:12 2013 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sun Jun  9 06:24:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=f60f1859

linuxrc: call depmod as workaround for bug #472312

busybox modprobe does not properly handle dependencies without
modules.dep.bb, so commit 3a054014e880e5b1ff28e3d87767c45a073da6b5 broke
module loading (bug #472312). Calling `busybox depmod -b` is required to
generate modules.dep.bb at build time, but `busybox depmod -b` is
broken, so we call it in the initramfs. Testing by Fabio Erculiani has
shown that the time penalty for this is approximately 0.05 ms, so this
is an acceptable workaround from a performance standpoint.

This is a squashed version of commits from Sabayon's genkernel-next
repository on github, with a new commit message by Richard Yao:

https://github.com/Sabayon/genkernel-next/commit/ece907ea64c3655854cd4044ed33c5d22d8ca463
https://github.com/Sabayon/genkernel-next/commit/f3570c39577573b3dcd8c77720a292fa6b89a022

The workaround implemented was suggested by Ben Kohler.

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

---
 defaults/initrd.scripts | 11 +++++++++++
 defaults/linuxrc        |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 9b0e899..ef58b5b 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -2,6 +2,17 @@
 
 . /etc/initrd.defaults
 
+# We should ship the initramfs with modules.dep.bb
+# But current busybox depmod has broken -b support
+# so we can't do that at build time, unless we want
+# to chroot into the initramfs root, which is much more
+# fragile. See bug #472312
+busybox_depmod_workaround() {
+       local depmod_args
+       [ -n "${QUIET}" ] && depmod_args="-q"
+       depmod ${depmod_args}
+}
+
 modules_load() {
 	for module in $*
 	do

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 9ea305b..ad6af4b 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -320,6 +320,13 @@ mount_devfs
 # Mount sysfs
 mount_sysfs
 
+# We should ship the initramfs with modules.dep.bb
+# But current busybox depmod has broken -b support
+# so we can't do that at build time, unless we want
+# to chroot into the initramfs root, which is much more
+# fragile. See bug #472312
+busybox_depmod_workaround
+
 # Initialize mdev
 good_msg 'Activating mdev'
 


             reply	other threads:[~2013-06-09  6:43 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09  6:43 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: defaults/ Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 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:57 [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:48 [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:40 Richard Yao
2013-06-09 13:37 Richard Yao
2013-06-09 13:37 Richard Yao
2013-06-09 13:37 Richard Yao
2013-06-09 13:36 Richard Yao
2013-06-09 13:36 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:33 Richard Yao
2013-06-09 13:21 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 13:17 Richard Yao
2013-06-09 13:15 Richard Yao
2013-06-09 13:15 Richard Yao
2013-06-09 12:29 Richard Yao
2013-06-09 12:11 Richard Yao
2013-06-09 11:56 Richard Yao
2013-06-09 11:51 Richard Yao
2013-06-09 11:47 Richard Yao
2013-06-09 11:43 Richard Yao
2013-06-09 10:28 Richard Yao
2013-06-09 10:05 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:58 Richard Yao
2013-06-09  9:53 Richard Yao
2013-06-09  9:49 Richard Yao
2013-06-09  9:49 Richard Yao
2013-06-09  9:46 Richard Yao
2013-06-09  9:44 Richard Yao
2013-06-09  9:44 Richard Yao
2013-06-09  8:32 Richard Yao
2013-06-09  7:45 Richard Yao
2013-06-06  3:36 Richard Yao
2013-06-03 23:49 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-01-01 16:53 Richard Yao
2012-11-22 22:20 [gentoo-commits] proj/genkernel:master " Richard Yao
2013-01-01 16:53 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2012-11-22 22:20 Richard Yao
2012-11-11 17:04 [gentoo-commits] proj/genkernel:master " Richard Yao
2012-11-11 17:32 ` [gentoo-commits] proj/genkernel:ryao " Richard Yao
2012-11-05 18:30 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=1370759063.f60f1859fd778c5476bf152f0091957fb397927d.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