From e7d2ba01fbd087f4a6a46d59b501f2a3c6e215ad Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 9 Mar 2013 15:32:01 +0000 Subject: udev-extraconf: move rules from udev and netbase Signed-off-by: Ting Liu --- .../files/71-fsl-dpaa-persistent-networking.rules | 17 --------- recipes-append/netbase/netbase_5.0.bbappend | 10 +----- recipes-append/udev/files/local.rules | 42 ---------------------- recipes-append/udev/udev_182.bbappend | 3 +- .../71-fsl-dpaa-persistent-networking.rules | 17 +++++++++ recipes-core/udev/udev-extraconf/local.rules | 42 ++++++++++++++++++++++ recipes-core/udev/udev-extraconf_1.0.bbappend | 11 ++++++ 7 files changed, 72 insertions(+), 70 deletions(-) delete mode 100644 recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules delete mode 100644 recipes-append/udev/files/local.rules create mode 100644 recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules create mode 100644 recipes-core/udev/udev-extraconf/local.rules create mode 100644 recipes-core/udev/udev-extraconf_1.0.bbappend diff --git a/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules b/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules deleted file mode 100644 index 356c172..0000000 --- a/recipes-append/netbase/files/71-fsl-dpaa-persistent-networking.rules +++ /dev/null @@ -1,17 +0,0 @@ -# Rules for handling naming the DPAA FMan ethernet ports in a consistent way -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" - -# P1023 has its Fman @ different offsets -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" -SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" diff --git a/recipes-append/netbase/netbase_5.0.bbappend b/recipes-append/netbase/netbase_5.0.bbappend index dc0fd0a..8445337 100644 --- a/recipes-append/netbase/netbase_5.0.bbappend +++ b/recipes-append/netbase/netbase_5.0.bbappend @@ -1,10 +1,2 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PRINC := "${@int(PRINC) + 1}" -SRC_URI_append_fsl += "file://71-fsl-dpaa-persistent-networking.rules" - -do_install_append_fsl () { - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d -} - -PR_fsl .= "+${DISTRO}" diff --git a/recipes-append/udev/files/local.rules b/recipes-append/udev/files/local.rules deleted file mode 100644 index 43034b8..0000000 --- a/recipes-append/udev/files/local.rules +++ /dev/null @@ -1,42 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -KERNEL=="nbd*", GOTO="persistent_storage_end" - -SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -# Handle network interface setup -SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" -SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" - -# The first framebuffer is symlinked to /dev/fb -KERNEL=="fb0", SYMLINK+="fb" - -# The first rtc device is symlinked to /dev/rtc -KERNEL=="rtc0", SYMLINK+="rtc" - -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - -# Create a symlink to any touchscreen input device -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" - -LABEL="persistent_storage_end" - -LABEL="nomountblock" diff --git a/recipes-append/udev/udev_182.bbappend b/recipes-append/udev/udev_182.bbappend index f15533b..8445337 100644 --- a/recipes-append/udev/udev_182.bbappend +++ b/recipes-append/udev/udev_182.bbappend @@ -1,3 +1,2 @@ -FILESEXTRAPATHS_prepend_fsl := "${THISDIR}/files:" +PRINC := "${@int(PRINC) + 1}" -PR_fsl .= "+${DISTRO}.1" diff --git a/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules new file mode 100644 index 0000000..356c172 --- /dev/null +++ b/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules @@ -0,0 +1,17 @@ +# Rules for handling naming the DPAA FMan ethernet ports in a consistent way +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g" + +# P1023 has its Fman @ different offsets +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0" +SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1" diff --git a/recipes-core/udev/udev-extraconf/local.rules b/recipes-core/udev/udev-extraconf/local.rules new file mode 100644 index 0000000..43034b8 --- /dev/null +++ b/recipes-core/udev/udev-extraconf/local.rules @@ -0,0 +1,42 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +KERNEL=="nbd*", GOTO="persistent_storage_end" + +SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", GOTO="nomountblock" + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +# Handle network interface setup +SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" +SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" + +# The first framebuffer is symlinked to /dev/fb +KERNEL=="fb0", SYMLINK+="fb" + +# The first rtc device is symlinked to /dev/rtc +KERNEL=="rtc0", SYMLINK+="rtc" + +# Try and modprobe for drivers for new hardware +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + +# Create a symlink to any touchscreen input device +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" + +LABEL="persistent_storage_end" + +LABEL="nomountblock" diff --git a/recipes-core/udev/udev-extraconf_1.0.bbappend b/recipes-core/udev/udev-extraconf_1.0.bbappend new file mode 100644 index 0000000..3b66250 --- /dev/null +++ b/recipes-core/udev/udev-extraconf_1.0.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PRINC := "${@int(PRINC) + 1}" + +SRC_URI_append = " file://71-fsl-dpaa-persistent-networking.rules" + +do_install_append () { + install -d ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/71-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d +} + -- cgit v1.2.3-54-g00ecf