diff options
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/udev/files/hotplug.rules | 2 | ||||
-rw-r--r-- | recipes-core/udev/files/hotplug.sh | 44 | ||||
-rw-r--r-- | recipes-core/udev/udev-extraconf_%.bbappend | 12 |
3 files changed, 0 insertions, 58 deletions
diff --git a/recipes-core/udev/files/hotplug.rules b/recipes-core/udev/files/hotplug.rules deleted file mode 100644 index a36a47d..0000000 --- a/recipes-core/udev/files/hotplug.rules +++ /dev/null @@ -1,2 +0,0 @@ -# SD card hotplug configuration of read_ahead cache size -KERNEL=="mmcblk?", ACTION=="add" RUN+="/etc/udev/scripts/hotplug.sh" diff --git a/recipes-core/udev/files/hotplug.sh b/recipes-core/udev/files/hotplug.sh deleted file mode 100644 index 9d9fd89..0000000 --- a/recipes-core/udev/files/hotplug.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# Called from udev -# -# Set the read_ahead cache size of SD card on hotplug - -SYSNAME=$(uname -n) -DISKNUM=$(echo $DEVNAME | sed -e 's/\(^.*\)\(.$\)/\2/') -DISKNAME=$(echo $DEVNAME | sed 's/.*\///g;s/p.*//g') -CORES=$(cat /proc/cpuinfo | grep processor | wc -l) - -set_read_ahead_size () { - if [ $DISKNUM == "0" ]; then #eMMC - echo $1 > /sys/block/$DISKNAME/queue/read_ahead_kb - else #SD card - echo $2 > /sys/block/$DISKNAME/queue/read_ahead_kb - fi -} - -if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ "$DEVTYPE" = "disk" ]; then - #Set read_ahead cache of mmcblk? SD card - if test -e /sys/block/$DISKNAME/queue/read_ahead_kb - then - if [ $SYSNAME == "colibri-imx6" ]; then - if [ $CORES -eq 1 ]; then #imx6s - set_read_ahead_size 512 512 - else #imx6dl - set_read_ahead_size 1024 512 - fi - elif [ $SYSNAME == "apalis-imx6" ]; then - if [ $CORES -eq 2 ]; then #imx6d - set_read_ahead_size 1024 512 - else #imx6q - set_read_ahead_size 1024 512 - fi - elif [ $SYSNAME == "apalis-tk1" ]; then - set_read_ahead_size 4096 1024 - else - logger "sd_hotplug.sh" "System name not compatible" - fi - else - logger "sd_hotplug" "No read_ahead_kb configuration file found" - fi -fi diff --git a/recipes-core/udev/udev-extraconf_%.bbappend b/recipes-core/udev/udev-extraconf_%.bbappend index 0a380a8..fe459da 100644 --- a/recipes-core/udev/udev-extraconf_%.bbappend +++ b/recipes-core/udev/udev-extraconf_%.bbappend @@ -1,13 +1 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" - -SRC_URI:append:tdx = " file://hotplug.rules \ - file://hotplug.sh \ -" - -do_install:append:tdx () { - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/hotplug.rules ${D}${sysconfdir}/udev/rules.d/hotplug.rules - - install -d ${D}${sysconfdir}/udev/scripts/ - install -m 0755 ${WORKDIR}/hotplug.sh ${D}${sysconfdir}/udev/scripts/hotplug.sh -} |