diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/busybox-static-nodes b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/busybox-static-nodes new file mode 100755 index 000000000..3f04d8061 --- /dev/null +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/busybox-static-nodes @@ -0,0 +1,25 @@ +#!/bin/sh +#=============================================================================== +# +# busybox-static-nodes +# +# Copyright (C) 2013 by Digi International Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# !Description: make static device nodes from device table +# +#=============================================================================== + +set -e + +MAKEDEVS="/sbin/makedevs" +DEVICE_TABLE_CFG="/etc/device_table" + +# Create static device nodes via configuration file. +if [ -f "${DEVICE_TABLE_CFG}" ]; then + ${MAKEDEVS} -d "${DEVICE_TABLE_CFG}" / >/dev/null 2>&1 +fi diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev index 2483be6ed..3a128ff08 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev @@ -21,8 +21,6 @@ if [ "${1}" != "start" ]; then fi MDEV="/sbin/mdev" -MAKEDEVS="/sbin/makedevs" -CONFIG="/etc/device_table" # Create shared memory mount point mkdir -p /dev/shm @@ -36,9 +34,6 @@ fi # Create all device nodes scanning /sys. ${MDEV} -s -# Create rest device nodes via configuration file. -[ -f "${CONFIG}" ] && ${MAKEDEVS} -d "${CONFIG}" / >/dev/null 2>&1 - # mount storage devices usbmount mmc-mount diff --git a/meta-digi-dey/recipes-core/busybox/busybox_1.20.2.bbappend b/meta-digi-dey/recipes-core/busybox/busybox_1.20.2.bbappend index 936893a86..5ac9ee62c 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox_1.20.2.bbappend +++ b/meta-digi-dey/recipes-core/busybox/busybox_1.20.2.bbappend @@ -23,6 +23,7 @@ SRC_URI += "file://0001-del-baudrates.patch \ file://acpid.map \ file://pswitch-press \ file://pswitch-release \ + file://busybox-static-nodes \ " # Add device handlers to 'mdev' package @@ -56,6 +57,13 @@ FILES_${PN}-acpid = " ${sysconfdir}/init.d/busybox-acpid \ INITSCRIPT_PACKAGES =+ "${PN}-acpid" INITSCRIPT_NAME_${PN}-acpid = "busybox-acpid" +# static-nodes package (create static nodes from /etc/device_table) +PACKAGES =+ "${PN}-static-nodes" +FILES_${PN}-static-nodes = "${sysconfdir}/init.d/busybox-static-nodes" +INITSCRIPT_PACKAGES =+ "${PN}-static-nodes" +INITSCRIPT_NAME_${PN}-static-nodes = "busybox-static-nodes" +INITSCRIPT_PARAMS_${PN}-static-nodes = "start 07 S ." + do_install_append() { if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then @@ -86,4 +94,7 @@ do_install_append() { install -m 0755 ${WORKDIR}/pswitch-press ${D}${sysconfdir}/acpi/ install -m 0755 ${WORKDIR}/pswitch-release ${D}${sysconfdir}/acpi/ fi + if grep "CONFIG_MAKEDEVS=y" ${WORKDIR}/defconfig; then + install -m 0755 ${WORKDIR}/busybox-static-nodes ${D}${sysconfdir}/init.d/ + fi } diff --git a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb index 0f0c1732d..e0f0b143c 100644 --- a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb +++ b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb @@ -32,6 +32,7 @@ RDEPENDS_${PN} = "\ base-files \ base-passwd \ busybox \ + busybox-static-nodes \ ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \ ${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ ${@base_contains("MACHINE_FEATURES", "touchscreen", "${VIRTUAL-RUNTIME_touchscreen}", "",d)} \