diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
| commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
| tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-kernel/modutils-initscripts | |
| download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz | |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-kernel/modutils-initscripts')
3 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-kernel/modutils-initscripts/files/PD.patch b/meta/recipes-kernel/modutils-initscripts/files/PD.patch new file mode 100644 index 0000000000..21ac49cbd8 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/PD.patch | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | Index: modutils-initscripts-1.0/LICENSE | ||
| 4 | =================================================================== | ||
| 5 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 6 | +++ modutils-initscripts-1.0/LICENSE 2010-12-06 14:26:03.570339002 -0800 | ||
| 7 | @@ -0,0 +1 @@ | ||
| 8 | +Public Domain | ||
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh new file mode 100755 index 0000000000..a78adf5729 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | ### BEGIN INIT INFO | ||
| 3 | # Provides: module-init-tools | ||
| 4 | # Required-Start: | ||
| 5 | # Required-Stop: | ||
| 6 | # Should-Start: checkroot | ||
| 7 | # Should-stop: | ||
| 8 | # Default-Start: S | ||
| 9 | # Default-Stop: | ||
| 10 | # Short-Description: Process /etc/modules. | ||
| 11 | # Description: Load the modules listed in /etc/modules. | ||
| 12 | ### END INIT INFO | ||
| 13 | |||
| 14 | LOAD_MODULE=modprobe | ||
| 15 | [ -f /proc/modules ] || exit 0 | ||
| 16 | [ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0 | ||
| 17 | [ -e /sbin/modprobe ] || LOAD_MODULE=insmod | ||
| 18 | |||
| 19 | if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then | ||
| 20 | [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." | ||
| 21 | depmod -Ae | ||
| 22 | fi | ||
| 23 | |||
| 24 | loaded_modules=" " | ||
| 25 | |||
| 26 | process_file() { | ||
| 27 | file=$1 | ||
| 28 | |||
| 29 | (cat $file; echo; ) | | ||
| 30 | while read module args | ||
| 31 | do | ||
| 32 | case "$module" in | ||
| 33 | \#*|"") continue ;; | ||
| 34 | esac | ||
| 35 | [ -n "$(echo $loaded_modules | grep " $module ")" ] && continue | ||
| 36 | [ "$VERBOSE" != no ] && echo -n "$module " | ||
| 37 | eval "$LOAD_MODULE $module $args >/dev/null 2>&1" | ||
| 38 | loaded_modules="${loaded_modules}${module} " | ||
| 39 | done | ||
| 40 | } | ||
| 41 | |||
| 42 | [ "$VERBOSE" != no ] && echo -n "Loading modules: " | ||
| 43 | [ -f /etc/modules ] && process_file /etc/modules | ||
| 44 | |||
| 45 | [ -d /etc/modules-load.d ] || exit 0 | ||
| 46 | |||
| 47 | for f in /etc/modules-load.d/*.conf; do | ||
| 48 | process_file $f | ||
| 49 | done | ||
| 50 | [ "$VERBOSE" != no ] && echo | ||
| 51 | |||
| 52 | exit 0 | ||
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb new file mode 100644 index 0000000000..125f5fb073 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | SUMMARY = "Initscript for auto-loading kernel modules on boot" | ||
| 2 | SECTION = "base" | ||
| 3 | LICENSE = "PD" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098" | ||
| 5 | SRC_URI = "file://modutils.sh \ | ||
| 6 | file://PD.patch" | ||
| 7 | PR = "r7" | ||
| 8 | |||
| 9 | INITSCRIPT_NAME = "modutils.sh" | ||
| 10 | INITSCRIPT_PARAMS = "start 05 S ." | ||
| 11 | |||
| 12 | inherit update-rc.d | ||
| 13 | |||
| 14 | do_compile () { | ||
| 15 | } | ||
| 16 | |||
| 17 | do_install () { | ||
| 18 | install -d ${D}${sysconfdir}/init.d/ | ||
| 19 | install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ | ||
| 20 | } | ||
