--- /dev/null
+KERNEL=="cmt_speech", MODE="0777"
--- /dev/null
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 iface newmac"
+ echo " newmac is only saved if /etc/<iface>MAC is not found"
+ exit 1
+fi
+
+iface="$1"
+newmac="$2"
+macfile=/etc/"$iface"mac
+
+# If no MAC is found, save the one given as argument
+if [ ! -e $macfile ]; then
+ /bin/echo "$newmac" > $macfile
+# Otherwise load MAC from file
+else
+ newmac=`/bin/cat $macfile`
+fi
+
+# Configure interface
+/sbin/ifconfig "$iface" down
+/sbin/ifconfig "$iface" hw ether $newmac
--- /dev/null
+# MAC address hack
+# forces n900 to always use the same MAC address that is generated in the first boot
+SUBSYSTEM=="net",KERNEL=="wlan0", RUN+="/lib/udev/nokia-n900-mac-hack.sh %k $attr{address}"
+
+# Create inputdev symlinks for kbslider contextkit plugin
+SUBSYSTEM=="input" ATTRS{name}=="TWL4030 Keypad" SYMLINK+="input/keypad"
+SUBSYSTEM=="input" ATTRS{name}=="gpio-keys" SYMLINK+="input/gpio-keys"
+
--- /dev/null
+# ALSA devices
+KERNEL=="controlC[0-9]*", NAME="snd/%k"
+KERNEL=="hwC[D0-9]*", NAME="snd/%k"
+KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
+KERNEL=="midiC[D0-9]*", NAME="snd/%k"
+KERNEL=="timer", NAME="snd/%k"
+KERNEL=="seq", NAME="snd/%k"
+
+KERNEL=="snd", SUBSYSTEM=="module", ACTION=="add", \
+ RUN+="/bin/ln -sf /proc/asound/oss/sndstat $root/sndstat"
the hotplug package and requires a kernel not older than 2.6.12."
LICENSE = "GPLv2+"
-PR = "r19"
+PR = "r20"
# Untested
DEFAULT_PREFERENCE = "-1"
file://10-mx31.rules \
file://bmi_eventpipe.sh "
+SRC_URI_append_nokia900 = " \
+ file://10-cmt_speech.rules \
+ file://udev-rules-nokia-n900-hacks.rules \
+ file://udev-rules-nokia-n900-snd.rules \
+ file://nokia-n900-mac-hack.sh \
+"
+
PACKAGE_ARCH_bug = "bug"
inherit update-rc.d autotools
install -m 0644 ${WORKDIR}/bmi_eventpipe.sh ${D}${sysconfdir}/udev/scripts/bmi_eventpipe.sh
}
+do_install_append_nokia900() {
+ install -m 0644 ${WORKDIR}/10-cmt_speech.rules ${D}${sysconfdir}/udev/rules.d/10-cmt_speech.rules
+ install -m 0644 ${WORKDIR}/udev-rules-nokia-n900-hacks.rules ${D}${sysconfdir}/udev/rules.d/udev-rules-nokia-n900-hacks.rules
+ install -m 0644 ${WORKDIR}/udev-rules-nokia-n900-snd.rules ${D}${sysconfdir}/udev/rules.d/udev-rules-nokia-n900-snd.rules
+ install -m 0755 ${WORKDIR}/nokia-n900-mac-hack.sh ${D}${sysconfdir}/udev/scripts/nokia-n900-mac-hack.sh
+}
+
# Create the cache after checkroot has run
pkg_postinst_udev_append() {
if test "x$D" != "x"; then