From patchwork Tue May 21 05:54:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kim_B=C3=B8ndergaard?= X-Patchwork-Id: 245186 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 86E0D2C00B5 for ; Tue, 21 May 2013 15:54:56 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 2805A3FDDF for ; Tue, 21 May 2013 07:54:52 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id BEAA93F990 for ; Tue, 21 May 2013 07:54:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2857; q=dns/txt; s=ironport2; t=1369115689; x=1400651689; h=from:to:subject:date:message-id:in-reply-to:references: mime-version; bh=bUmOclb/ZrUf+grtwRm8XIGf7B4YyEPbBudt5IZ1bVs=; b=Le6hfIdkEUm249qfMCO370icizwGcB+Q3AOKEU3E8bPDoF/8ttBbbjlB 6EbiYBkpcdnnC83USYVoMAOhl39A7y3BmoXC8oMp6/Hr1JiSpQogzXnR+ bobM7wRAQMAXLJoNFb9JP2BYmB+gkQ4dM4fmJjD9d01oisTFRFdSQVt8D E=; X-IronPort-AV: E=Sophos;i="4.87,712,1363129200"; d="scan'208";a="2722161" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 21 May 2013 07:54:48 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.342.3; Tue, 21 May 2013 07:54:48 +0200 Received: by localhost (Postfix, from userid 30019) id 5C5C5681586; Tue, 21 May 2013 05:54:48 +0000 (UTC) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/1] busybox, mdev: Added option for disabling mdev -s in sysv-init Date: Tue, 21 May 2013 05:54:45 +0000 Message-ID: X-Mailer: git-send-email 1.8.0.3 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- recipes/busybox/busybox-configure.inc | 2 ++ recipes/busybox/busybox-install.inc | 25 +++++++++++++++++++++++++ recipes/busybox/files/busybox-mdev | 8 ++------ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc index 6caaf3e..0cfb779 100644 --- a/recipes/busybox/busybox-configure.inc +++ b/recipes/busybox/busybox-configure.inc @@ -118,6 +118,8 @@ DEFAULT_USE_busybox_mdev_sysvinit_start = "10" RECIPE_FLAGS += "busybox_mdev_splashutils_progress busybox_mdev_splashutils_msg" SPLASHUTILS_INITSCRIPTS:>USE_busybox_mdev += " busybox_mdev" DEFAULT_USE_busybox_mdev_splashutils_msg = "\"Starting Mdev\"" +RECIPE_FLAGS += "busybox_mdev_dash_s" +DEFAULT_USE_busybox_mdev_dash_s = "1" RECIPE_FLAGS += "busybox_klogd \ busybox_klogd_sysvinit_start busybox_klogd_conlevel" diff --git a/recipes/busybox/busybox-install.inc b/recipes/busybox/busybox-install.inc index bfb0c11..9e4f78c 100644 --- a/recipes/busybox/busybox-install.inc +++ b/recipes/busybox/busybox-install.inc @@ -135,3 +135,28 @@ do_install () { sysvinit_install_script ${SRCDIR}/busybox-httpd fi } + +do_install[postfuncs] += "${BUSYBOX_INSTALL_POSTFUNCS}" +BUSYBOX_INSTALL_POSTFUNCS = "" +BUSYBOX_INSTALL_POSTFUNCS:>USE_busybox_mdev = " do_install_fix_mdev" + +python do_install_fix_mdev () { + import os, fileinput + path = d.get("D") + os.chdir(path) + sysconfdir=d.get("sysconfdir") + for line in fileinput.FileInput("." + sysconfdir + "/init.d/busybox-mdev", inplace=1): + if d.get("USE_busybox_mdev_dash_s"): + line=line.replace("mdev_dash_s PLACEHOLDER_1", + "# Create tmpfs for /dev\n" + + "echo \"Creating tmpfs at /dev\"\n" + + "mount -t tmpfs tmpfs /dev -o size=64k,mode=0755") + line=line.replace("mdev_dash_s PLACEHOLDER_2", + "# Populate /dev from /sys info\n" + + "echo \"Populating /dev/ using mdev\"\n" + + "$MDEV -s") + else: + line=line.replace("mdev_dash_s PLACEHOLDER_1", "") + line=line.replace("mdev_dash_s PLACEHOLDER_2", "") + print line, +} diff --git a/recipes/busybox/files/busybox-mdev b/recipes/busybox/files/busybox-mdev index c068b94..5d307dd 100755 --- a/recipes/busybox/files/busybox-mdev +++ b/recipes/busybox/files/busybox-mdev @@ -34,16 +34,12 @@ if mountpoint -q /dev/shm/; then umount -l /dev/shm/ fi -# Create tmpfs for /dev -echo "Creating tmpfs at /dev" -mount -t tmpfs tmpfs /dev -o size=64k,mode=0755 +mdev_dash_s PLACEHOLDER_1 # Register mdev as hotplug event helper echo "$MDEV" > /proc/sys/kernel/hotplug -# Populate /dev from /sys info -echo "Populating /dev using mdev" -$MDEV -s +mdev_dash_s PLACEHOLDER_2 # Touch .udev to inform scripts that /dev needs no further setup touch /dev/.udev