From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 36B66138200 for ; Sun, 9 Jun 2013 06:43:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 507F3E076D; Sun, 9 Jun 2013 06:43:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D6BCE07D1 for ; Sun, 9 Jun 2013 06:43:31 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A0E9633E2CF for ; Sun, 9 Jun 2013 06:43:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 44A9DE5461 for ; Sun, 9 Jun 2013 06:43:29 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1370759063.f60f1859fd778c5476bf152f0091957fb397927d.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:ryao commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: f60f1859fd778c5476bf152f0091957fb397927d X-VCS-Branch: ryao Date: Sun, 9 Jun 2013 06:43:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7808f03a-f06a-448e-be00-1d2b039e1247 X-Archives-Hash: 98227f2e1e698e530305d5ee09dd6b6b commit: f60f1859fd778c5476bf152f0091957fb397927d Author: Fabio Erculiani sabayon org> AuthorDate: Sun Jun 9 06:17:12 2013 +0000 Commit: Richard Yao gentoo 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 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'