From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1Srx5R-0001q1-I8 for garchives@archives.gentoo.org; Thu, 19 Jul 2012 20:12:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8CA7EE0268; Thu, 19 Jul 2012 20:12:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5FCADE0268 for ; Thu, 19 Jul 2012 20:12:30 +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 C67EB1B40B8 for ; Thu, 19 Jul 2012 20:12:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8DFD8E5434 for ; Thu, 19 Jul 2012 20:12:28 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1342728197.2bf6b9045db63e8163ac6a83137077eb8b9ecade.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/linuxrc defaults/modprobe X-VCS-Directories: defaults/ X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: 2bf6b9045db63e8163ac6a83137077eb8b9ecade X-VCS-Branch: master Date: Thu, 19 Jul 2012 20:12:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9b6bf14a-1162-40ba-8c92-a2203d72aa91 X-Archives-Hash: 80879d12b95b6597d3273561f2ff7011 commit: 2bf6b9045db63e8163ac6a83137077eb8b9ecade Author: Dzianis Kahanovich eu by> AuthorDate: Wed Jan 5 15:31:00 2011 +0000 Commit: Richard Yao gentoo org> CommitDate: Thu Jul 19 20:03:17 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git= ;a=3Dcommit;h=3D2bf6b904 Adding modules cmdline options for genkernel (module.option[=3Dvalue]). Effective for genkernel's modprobe script or busybox "not small" modprobe. Signed-off-by: Dzianis Kahanovich eu.by> Updated-by: Richard Yao cs.stonybrook.edu> --- defaults/linuxrc | 18 ++++++++++++++++++ defaults/modprobe | 5 ++++- 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index 0403b4d..91a3396 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -39,6 +39,7 @@ FAKE_ROOT=3D'' REAL_ROOTFLAGS=3D'' ROOTFSTYPE=3D'auto' CRYPT_SILENT=3D0 +mkdir -p /etc/cmdline /etc/modprobe.d for x in ${CMDLINE} do case "${x}" in @@ -240,6 +241,23 @@ do nounionfs) USE_UNIONFS_NORMAL=3D0 ;; + ## for "module.param[=3Dval]" we creating + ## /etc/modprobe.d/module.param.conf: "options module param[=3Dval]" + ## /etc/cmdline/module.param:"param[=3Dval]" + ## first for CONFIG_MODPROBE_SMALL=3Dn, next for script modprobe + *=3D*) + case "${x%%=3D*}" in + *.*) + y=3D"${x%%[=3D/]*}" + echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/$y.conf" + echo "${x#*.}" >"/etc/cmdline/$y" + ;; + esac + ;; + *.*) + echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/${x%%/*}.conf" + echo "${x#*.}" >"/etc/cmdline/${x%%/*}" + ;; esac done =20 diff --git a/defaults/modprobe b/defaults/modprobe index ba2d890..1f606bd 100755 --- a/defaults/modprobe +++ b/defaults/modprobe @@ -110,7 +110,10 @@ modprobe2() { filler=3D1 fi done - ${INSMOD} ${real_path} > /dev/null 2>&1 + # placing options into x + x=3D"${real_path##*/}" + x=3D"`cat "/etc/cmdline/${x%.ko*}".* 2>/dev/null`" + ${INSMOD} ${real_path} ${x} > /dev/null 2>&1 ret=3D$? if [ ${ret} -eq 0 ] then