From patchwork Fri Dec 14 08:56:53 2012 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: 206371 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [130.225.254.102]) by ozlabs.org (Postfix) with ESMTP id 85B672C008F for ; Fri, 14 Dec 2012 19:57:11 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 1B9483FC89 for ; Fri, 14 Dec 2012 09:57:01 +0100 (CET) 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 D95583FB42 for ; Fri, 14 Dec 2012 09:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2906; q=dns/txt; s=ironport2; t=1355475417; x=1387011417; h=from:to:subject:date:message-id:in-reply-to:references: mime-version; bh=6/ys3TViRCAM7hMi1vGk3/xfnoWGlZPJUI23JUEsVsE=; b=fuqFr/rrxx8NR6BxOAYzubM9Jut7ma5E7Y/RkkTvXXRDIp20dze7frEG nMFCxvFjEetwQeZ6jPj4f5d5VqUYuU6/hspzQBUbXovAxs0TQW4/lrZLz 8LD/Wh6o0xAnGIT8bEzrE5I/iXwFsLVBBjlJuU542+yna0PK0tC5WyWCL Q=; X-IronPort-AV: E=Sophos;i="4.84,279,1355094000"; d="scan'208";a="1934515" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 14 Dec 2012 09:56:56 +0100 Received: from fire (172.16.10.61) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.318.4; Fri, 14 Dec 2012 09:56:56 +0100 Received: by fire (Postfix, from userid 30019) id ACE3DC0417; Fri, 14 Dec 2012 09:56:56 +0100 (CET) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/2] busybox, mdev: Added option for disabling mdev -s in sysv-init Date: Fri, 14 Dec 2012 09:56:53 +0100 Message-ID: <39a86e2323951ca6d7f269f8d1de2d65be3e7287.1355474720.git.kibo@prevas.dk> X-Mailer: git-send-email 1.8.0 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 | 26 ++++++++++++++++++++++++++ recipes/busybox/files/busybox-mdev | 8 ++------ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc index 037cd97..7032257 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..b94e8c2 100644 --- a/recipes/busybox/busybox-install.inc +++ b/recipes/busybox/busybox-install.inc @@ -135,3 +135,29 @@ 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" +#do_install[postfuncs] += "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