diff options
Diffstat (limited to 'recipes-core/nv-conf/files')
-rw-r--r-- | recipes-core/nv-conf/files/nv-conf.service | 12 | ||||
-rw-r--r-- | recipes-core/nv-conf/files/nv-conf.sh | 35 |
2 files changed, 47 insertions, 0 deletions
diff --git a/recipes-core/nv-conf/files/nv-conf.service b/recipes-core/nv-conf/files/nv-conf.service new file mode 100644 index 0000000..3226c6b --- /dev/null +++ b/recipes-core/nv-conf/files/nv-conf.service @@ -0,0 +1,12 @@ +[Unit] +Description=Enable NVIDIA T30 CPU Hot-Plugging +DefaultDependencies=no +After=sysinit.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/nv-conf.sh + +[Install] +WantedBy=sysinit.target diff --git a/recipes-core/nv-conf/files/nv-conf.sh b/recipes-core/nv-conf/files/nv-conf.sh new file mode 100644 index 0000000..6376c5d --- /dev/null +++ b/recipes-core/nv-conf/files/nv-conf.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# NVIDIA specific init script + +# power state +if [ -e /sys/power/state ]; then + chmod 0666 /sys/power/state +fi + +# turn off low-power core migration for now +if [ -e /sys/module/cpu_tegra3/parameters/no_lp ] ; then + echo Y > /sys/module/cpu_tegra3/parameters/no_lp +fi + +# enable CPU hot-plugging +if [ -e /sys/module/cpu_tegra3/parameters/auto_hotplug ] ; then + echo 1 > /sys/module/cpu_tegra3/parameters/auto_hotplug +fi + +# lp2 idle state +if [ -e /sys/module/cpuidle/parameters/lp2_in_idle ] ; then + echo "Y" > /sys/module/cpuidle/parameters/lp2_in_idle +fi + +# mmc read ahead size +if [ -e /sys/block/mmcblk0/queue/read_ahead_kb ]; then + echo 2048 > /sys/block/mmcblk0/queue/read_ahead_kb +fi +if [ -e /sys/block/mmcblk1/queue/read_ahead_kb ]; then + echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb +fi +if [ -e /sys/block/mmcblk2/queue/read_ahead_kb ]; then + echo 2048 > /sys/block/mmcblk2/queue/read_ahead_kb +fi + +exit 0 |