From 5d946c7cfe1e5d97dbe72cbb9d82750a854433e4 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 22 Jan 2013 18:32:50 +0100 Subject: [PATCH] meta-digi-del: add override 'mdev' bootscript https://jira.digi.com/browse/DEL-159 #resolve Signed-off-by: Javier Viguera --- .../recipes-core/busybox/busybox-1.20.2/mdev | 51 +++++++++++++++++++ .../busybox/busybox_1.20.2.bbappend | 2 - 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100755 meta-digi-del/recipes-core/busybox/busybox-1.20.2/mdev diff --git a/meta-digi-del/recipes-core/busybox/busybox-1.20.2/mdev b/meta-digi-del/recipes-core/busybox/busybox-1.20.2/mdev new file mode 100755 index 000000000..ec6e74e5c --- /dev/null +++ b/meta-digi-del/recipes-core/busybox/busybox-1.20.2/mdev @@ -0,0 +1,51 @@ +#!/bin/sh +#=============================================================================== +# +# mdev +# +# 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: Device nodes bootscript +# +#=============================================================================== + +set -e + +if [ "${1}" != "start" ]; then + exit 0 +fi + +MDEV="/sbin/mdev" +# MAKEDEVS="/sbin/makedevs" +# CONFIG="/etc/makedevs.d/${DEL_PLATFORM}" + +# Register mdev as hotplug to create devices. +if [ -f /proc/sys/kernel/hotplug ]; then + echo > /dev/mdev.seq + echo "${MDEV}" > /proc/sys/kernel/hotplug +fi + +# Create all device nodes scanning /sys. +${MDEV} -s + +# Create rest device nodes via configuration file. +# if [ -f "${CONFIG}" ]; then +# [ -z "${quietboot}" ] && echo -n "Creating nodes via configuration file... " +# ${MAKEDEVS} -d "${CONFIG}" / >/dev/null 2>&1 +# [ -z "${quietboot}" ] && echo "done" +# fi + +# mount storage devices +usbmount +mmc-mount + +# fire *add* event for ADC so the nodes are created in case of built-in driver +for i in $(echo /sys/bus/platform/drivers/*adc*/uevent); do + [ "${i}" = "/sys/bus/platform/drivers/*adc*/uevent" ] && continue + echo add > $i +done diff --git a/meta-digi-del/recipes-core/busybox/busybox_1.20.2.bbappend b/meta-digi-del/recipes-core/busybox/busybox_1.20.2.bbappend index 10091f6c4..7c698d8ac 100644 --- a/meta-digi-del/recipes-core/busybox/busybox_1.20.2.bbappend +++ b/meta-digi-del/recipes-core/busybox/busybox_1.20.2.bbappend @@ -6,8 +6,6 @@ DEPENDS += "libdigi" SRC_URI += "file://0001-del-baudrates.patch \ file://0002-del-mdev_regulatory.patch \ file://0003-del-flash_eraseall.patch \ - file://defconfig \ - file://mdev.conf \ file://adc \ file://mmc \ file://sd \