summaryrefslogtreecommitdiff
path: root/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/fs-init/fs-init.bb4
-rw-r--r--recipes-core/set-hostname/files/set-hostname.service2
-rw-r--r--recipes-core/set-hostname/files/sethostname2
-rw-r--r--recipes-core/set-hostname/set-hostname_1.1.bb (renamed from recipes-core/set-hostname/set-hostname_1.0.bb)6
-rw-r--r--recipes-core/systemd/systemd-conf/journald.conf3
-rw-r--r--recipes-core/systemd/systemd-conf_%.bbappend2
-rw-r--r--recipes-core/systemd/systemd_%.bbappend4
-rw-r--r--recipes-core/udev/files/10-toradex-wifi-ifnames.link2
-rw-r--r--recipes-core/udev/files/apalis-imx6/99-toradex.rules37
-rwxr-xr-xrecipes-core/udev/files/apalis-imx6/toradex-adc.sh4
-rw-r--r--recipes-core/udev/files/apalis-imx8/99-toradex.rules25
-rwxr-xr-xrecipes-core/udev/files/apalis-imx8/toradex-adc.sh4
-rw-r--r--recipes-core/udev/files/apalis-imx8x/99-toradex.rules15
-rwxr-xr-xrecipes-core/udev/files/apalis-imx8x/toradex-adc.sh21
-rw-r--r--recipes-core/udev/files/apalis-tk1/99-toradex.rules3
-rw-r--r--recipes-core/udev/files/bootpart-automount.rules6
-rw-r--r--recipes-core/udev/files/colibri-imx6/99-toradex.rules27
-rw-r--r--recipes-core/udev/files/colibri-imx6ull-emmc/99-toradex.rules20
-rwxr-xr-xrecipes-core/udev/files/colibri-imx6ull-emmc/toradex-adc.sh21
-rw-r--r--recipes-core/udev/files/colibri-imx6ull/99-toradex.rules26
-rwxr-xr-xrecipes-core/udev/files/colibri-imx6ull/toradex-adc.sh2
-rw-r--r--recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules22
-rw-r--r--recipes-core/udev/files/colibri-imx7/99-toradex.rules25
-rw-r--r--recipes-core/udev/files/colibri-imx8x/99-toradex.rules17
-rw-r--r--recipes-core/udev/files/hotplug.rules2
-rw-r--r--recipes-core/udev/files/hotplug.sh44
-rw-r--r--recipes-core/udev/files/mount.blacklist6
-rw-r--r--recipes-core/udev/files/mount.sh90
-rwxr-xr-xrecipes-core/udev/files/toradex-mount-bootpart.sh33
-rw-r--r--recipes-core/udev/files/verdin-am62/10-toradex-can0-ifname.link6
-rw-r--r--recipes-core/udev/files/verdin-am62/10-toradex-can1-ifname.link6
-rw-r--r--recipes-core/udev/files/verdin-am62/99-toradex.rules17
-rwxr-xr-xrecipes-core/udev/files/verdin-am62/toradex-adc.sh21
-rw-r--r--recipes-core/udev/files/verdin-imx8mm/10-toradex-can0-ifname.link6
-rw-r--r--recipes-core/udev/files/verdin-imx8mm/99-toradex.rules21
-rwxr-xr-xrecipes-core/udev/files/verdin-imx8mm/toradex-adc.sh10
-rw-r--r--recipes-core/udev/files/verdin-imx8mp/10-toradex-can0-ifname.link6
-rw-r--r--recipes-core/udev/files/verdin-imx8mp/10-toradex-can1-ifname.link6
-rw-r--r--recipes-core/udev/files/verdin-imx8mp/99-toradex.rules23
-rw-r--r--recipes-core/udev/udev-extraconf_%.bbappend14
-rw-r--r--recipes-core/udev/udev-toradex-rules.bb31
-rw-r--r--recipes-core/util-linux/util-linux/fstrim.service7
-rw-r--r--recipes-core/util-linux/util-linux/fstrim.timer11
-rw-r--r--recipes-core/util-linux/util-linux_%.bbappend18
44 files changed, 385 insertions, 293 deletions
diff --git a/recipes-core/fs-init/fs-init.bb b/recipes-core/fs-init/fs-init.bb
index 023f347..bb9b1b8 100644
--- a/recipes-core/fs-init/fs-init.bb
+++ b/recipes-core/fs-init/fs-init.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Script to expand the rootfs to the full size of its partion, star
LICENSE = "PD"
PR = "r3"
-RRECOMMENDS_${PN} = "e2fsprogs-resize2fs"
+RRECOMMENDS:${PN} = "e2fsprogs-resize2fs"
SRC_URI = " \
file://resizefs.sh \
@@ -22,6 +22,6 @@ do_install () {
}
SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "resizefs.service"
+SYSTEMD_SERVICE:${PN} = "resizefs.service"
inherit allarch systemd
diff --git a/recipes-core/set-hostname/files/set-hostname.service b/recipes-core/set-hostname/files/set-hostname.service
index 306528b..9bd2a63 100644
--- a/recipes-core/set-hostname/files/set-hostname.service
+++ b/recipes-core/set-hostname/files/set-hostname.service
@@ -1,5 +1,5 @@
[Unit]
-ConditionPathExists=|!/etc/hostname
+ConditionFileNotEmpty=|!/etc/hostname
Wants=network-pre.target
Before=network-pre.target
After=local-fs.target
diff --git a/recipes-core/set-hostname/files/sethostname b/recipes-core/set-hostname/files/sethostname
index 87e6320..aacb7ab 100644
--- a/recipes-core/set-hostname/files/sethostname
+++ b/recipes-core/set-hostname/files/sethostname
@@ -13,7 +13,7 @@ fi
hostname=@@MACHINE@@"-"${serial}
if [ -f /usr/bin/hostnamectl ]; then
- /usr/bin/hostnamectl set-hostname ${hostname}
+ /usr/bin/hostnamectl set-hostname @@HOSTNAMECTL_OPT@@ ${hostname}
else
hostname ${hostname}
fi
diff --git a/recipes-core/set-hostname/set-hostname_1.0.bb b/recipes-core/set-hostname/set-hostname_1.1.bb
index 15fa66b..e9c3878 100644
--- a/recipes-core/set-hostname/set-hostname_1.0.bb
+++ b/recipes-core/set-hostname/set-hostname_1.1.bb
@@ -10,12 +10,12 @@ SRC_URI += " \
file://set-hostname.service \
"
-FILES_${PN} = " \
+FILES:${PN} = " \
${bindir} \
${systemd_system_unitdir} \
"
-SYSTEMD_SERVICE_${PN} = " \
+SYSTEMD_SERVICE:${PN} = " \
set-hostname.service \
"
@@ -23,6 +23,8 @@ do_install () {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/sethostname ${D}${bindir}
sed -i "s/@@MACHINE@@/${MACHINE}/g" ${D}${bindir}/sethostname
+ sed -i "s/@@HOSTNAMECTL_OPT@@/${@bb.utils.contains('IMAGE_FEATURES','read-only-rootfs','--transient','',d)}/g" \
+ ${D}${bindir}/sethostname
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/set-hostname.service ${D}${systemd_system_unitdir}
diff --git a/recipes-core/systemd/systemd-conf/journald.conf b/recipes-core/systemd/systemd-conf/journald.conf
new file mode 100644
index 0000000..ed945e1
--- /dev/null
+++ b/recipes-core/systemd/systemd-conf/journald.conf
@@ -0,0 +1,3 @@
+[Journal]
+ForwardToSyslog=yes
+RuntimeMaxUse=16M
diff --git a/recipes-core/systemd/systemd-conf_%.bbappend b/recipes-core/systemd/systemd-conf_%.bbappend
index 77ab59d..34e18d6 100644
--- a/recipes-core/systemd/systemd-conf_%.bbappend
+++ b/recipes-core/systemd/systemd-conf_%.bbappend
@@ -1 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/systemd-conf:"
+FILESEXTRAPATHS:prepend:tdx := "${THISDIR}/systemd-conf:"
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index ea40849..5bd3016 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1,4 +1,4 @@
# This allows for udevd automounting with mounts accessible to all.
-do_configure_prepend () {
+do_configure:prepend:tdx () {
sed -i '/PrivateMounts=yes/d' ${S}/units/systemd-udevd.service.in
-} \ No newline at end of file
+}
diff --git a/recipes-core/udev/files/10-toradex-wifi-ifnames.link b/recipes-core/udev/files/10-toradex-wifi-ifnames.link
index 35d5d20..b00071a 100644
--- a/recipes-core/udev/files/10-toradex-wifi-ifnames.link
+++ b/recipes-core/udev/files/10-toradex-wifi-ifnames.link
@@ -1,5 +1,5 @@
[Match]
-Driver=mwifiex_pcie
+Driver=mwifiex_pcie mwifiex_sdio
[Link]
NamePolicy=keep kernel
diff --git a/recipes-core/udev/files/apalis-imx6/99-toradex.rules b/recipes-core/udev/files/apalis-imx6/99-toradex.rules
index f29daae..26b240f 100644
--- a/recipes-core/udev/files/apalis-imx6/99-toradex.rules
+++ b/recipes-core/udev/files/apalis-imx6/99-toradex.rules
@@ -1,16 +1,29 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="apalis-i2c1"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="apalis-i2c2"
-ACTION=="add", SUBSYSTEM=="i2c-dev", KERNELS=="120000.hdmi", SYMLINK+="apalis-i2c2"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="apalis-i2c3"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="apalis-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="apalis-uart1"
-ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="apalis-uart2"
-ACTION=="add", ATTRS{iomem_base}=="0x21F0000", SYMLINK+="apalis-uart3"
-ACTION=="add", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="apalis-uart4"
-ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="apalis-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="2008000.*spi", SYMLINK+="apalis-spi1-cs%n"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="200c000.*spi", SYMLINK+="apalis-spi2-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="apalis-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="apalis-i2c2"
+ACTION=="add|change", SUBSYSTEM=="i2c-dev", KERNELS=="120000.hdmi", SYMLINK+="apalis-i2c2"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="apalis-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="apalis-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x2020000", SYMLINK+="apalis-uart1"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="apalis-uart2"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21F0000", SYMLINK+="apalis-uart3"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="apalis-uart4"
+ACTION=="add|change", KERNELS=="20bc000.wdog", SYMLINK+="apalis-watchdog"
+ACTION=="add|change", KERNELS=="20bc000.watchdog", SYMLINK+="apalis-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="apalis-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2008000.*spi", SYMLINK+="apalis-spi1-cs%n"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="200c000.*spi", SYMLINK+="apalis-spi2-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2198000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2198000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2194000.usdhc", SYMLINK+="apalis-sd4bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2194000.mmc", SYMLINK+="apalis-sd4bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2194000.usdhc", SYMLINK+="apalis-sd4bit-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2194000.mmc", SYMLINK+="apalis-sd4bit-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.usdhc", SYMLINK+="apalis-mmc8bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.mmc", SYMLINK+="apalis-mmc8bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.usdhc", SYMLINK+="apalis-mmc8bit-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.mmc", SYMLINK+="apalis-mmc8bit-part%n"
diff --git a/recipes-core/udev/files/apalis-imx6/toradex-adc.sh b/recipes-core/udev/files/apalis-imx6/toradex-adc.sh
index 9776fda..6d0a68a 100755
--- a/recipes-core/udev/files/apalis-imx6/toradex-adc.sh
+++ b/recipes-core/udev/files/apalis-imx6/toradex-adc.sh
@@ -11,11 +11,11 @@ START=4
if [ "$ACTION" = "add" ]; then
for idx in `seq 0 $((LINES-1))`; do
- ln -s "/sys$DEVPATH/in_voltage$((START+idx))_raw" /dev/apalis-ain$idx
+ ln -s "/sys$DEVPATH/in_voltage$((START+idx))_raw" /dev/apalis-adc$idx
done
elif [ "$ACTION" = "remove" ]; then
for idx in `seq 0 $((LINES-1))`; do
- rm -f /dev/apalis-ain$idx
+ rm -f /dev/apalis-adc$idx
done
fi
diff --git a/recipes-core/udev/files/apalis-imx8/99-toradex.rules b/recipes-core/udev/files/apalis-imx8/99-toradex.rules
index 266acc3..566f57d 100644
--- a/recipes-core/udev/files/apalis-imx8/99-toradex.rules
+++ b/recipes-core/udev/files/apalis-imx8/99-toradex.rules
@@ -1,14 +1,19 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a820000.i2c", SYMLINK+="apalis-i2c1"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a830000.i2c", SYMLINK+="apalis-i2c3"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="apalis-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x5A070010", SYMLINK+="apalis-uart1"
-ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="apalis-uart2"
-ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="apalis-uart3"
-ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="apalis-uart4"
-ACTION=="add", KERNELS=="watchdog", SYMLINK+="apalis-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="5a000000.spi", SYMLINK+="apalis-spi1-cs%n"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="5a020000.spi", SYMLINK+="apalis-spi2-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a820000.i2c", SYMLINK+="apalis-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a830000.i2c", SYMLINK+="apalis-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="apalis-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A070010", SYMLINK+="apalis-uart1"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="apalis-uart2"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="apalis-uart3"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="apalis-uart4"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="apalis-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="scu*", SYMLINK+="apalis-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="5a000000.spi", SYMLINK+="apalis-spi1-cs%n"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="5a020000.spi", SYMLINK+="apalis-spi2-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="5b010000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="5b030000.mmc", SYMLINK+="apalis-sd4bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="5b030000.mmc", SYMLINK+="apalis-sd4bit-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="5b020000.mmc", SYMLINK+="apalis-mmc8bit"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="5b020000.mmc", SYMLINK+="apalis-mmc8bit-part%n"
diff --git a/recipes-core/udev/files/apalis-imx8/toradex-adc.sh b/recipes-core/udev/files/apalis-imx8/toradex-adc.sh
index fdc5365..f71a10e 100755
--- a/recipes-core/udev/files/apalis-imx8/toradex-adc.sh
+++ b/recipes-core/udev/files/apalis-imx8/toradex-adc.sh
@@ -11,11 +11,11 @@ START=0
if [ "$ACTION" = "add" ]; then
for idx in `seq 0 $((LINES-1))`; do
- ln -s "/sys$DEVPATH/in_voltage$((START+idx))_raw" /dev/apalis-ain$idx
+ ln -s "/sys$DEVPATH/in_voltage$((START+idx))_raw" /dev/apalis-adc$idx
done
elif [ "$ACTION" = "remove" ]; then
for idx in `seq 0 $((LINES-1))`; do
- rm -f /dev/apalis-ain$idx
+ rm -f /dev/apalis-adc$idx
done
fi
diff --git a/recipes-core/udev/files/apalis-imx8x/99-toradex.rules b/recipes-core/udev/files/apalis-imx8x/99-toradex.rules
deleted file mode 100644
index 20e4533..0000000
--- a/recipes-core/udev/files/apalis-imx8x/99-toradex.rules
+++ /dev/null
@@ -1,15 +0,0 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="apalis-i2c1"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="56246000.i2c", SYMLINK+="apalis-i2c2"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a830000.i2c", SYMLINK+="apalis-i2c3"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a800000.i2c", SYMLINK+="apalis-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x5A070010", SYMLINK+="apalis-uart1"
-ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="apalis-uart2"
-ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="apalis-uart3"
-ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="apalis-uart4"
-ACTION=="add", KERNELS=="watchdog", SYMLINK+="apalis-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="5a000000.spi", SYMLINK+="apalis-spi1-cs%n"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="5a020000.spi", SYMLINK+="apalis-spi2-cs%n"
-KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc"
-KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc-boot%n"
-KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="5b010000.mmc", SYMLINK+="emmc-part%n"
-SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
diff --git a/recipes-core/udev/files/apalis-imx8x/toradex-adc.sh b/recipes-core/udev/files/apalis-imx8x/toradex-adc.sh
deleted file mode 100755
index 43aae6d..0000000
--- a/recipes-core/udev/files/apalis-imx8x/toradex-adc.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env sh
-#
-# Called from udev. Compatible to apalis-imx8x.
-#
-# Create/remove symlinks to/from the files with raw ain data.
-
-# Map the ADC lines:
-# apalis-adc{0..3} -> ADMA.ADC.IN{0,1,4,5}
-
-if [ "$ACTION" = "add" ]; then
- ln -s "/sys$DEVPATH/in_voltage0_raw" /dev/apalis-adc0
- ln -s "/sys$DEVPATH/in_voltage1_raw" /dev/apalis-adc1
- ln -s "/sys$DEVPATH/in_voltage4_raw" /dev/apalis-adc2
- ln -s "/sys$DEVPATH/in_voltage5_raw" /dev/apalis-adc3
-elif [ "$ACTION" = "remove" ]; then
- rm -f /dev/apalis-adc0
- rm -f /dev/apalis-adc1
- rm -f /dev/apalis-adc2
- rm -f /dev/apalis-adc3
-fi
-
diff --git a/recipes-core/udev/files/apalis-tk1/99-toradex.rules b/recipes-core/udev/files/apalis-tk1/99-toradex.rules
deleted file mode 100644
index 68cd9a8..0000000
--- a/recipes-core/udev/files/apalis-tk1/99-toradex.rules
+++ /dev/null
@@ -1,3 +0,0 @@
-KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="700b0600.sdhci", SYMLINK+="emmc"
-KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="700b0600.sdhci", SYMLINK+="emmc-boot%n"
-KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="700b0600.sdhci", SYMLINK+="emmc-part%n"
diff --git a/recipes-core/udev/files/bootpart-automount.rules b/recipes-core/udev/files/bootpart-automount.rules
new file mode 100644
index 0000000..8b02dec
--- /dev/null
+++ b/recipes-core/udev/files/bootpart-automount.rules
@@ -0,0 +1,6 @@
+# Toradex specific, to bind mount boot partition to /boot.
+#
+# To be noticed: Be careful if you want to change the rule file name, it must be loaded
+# by udevd after automount.rules, otherwise, the original mount point might be not present.
+#
+ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]*", RUN+="/etc/udev/scripts/toradex-mount-bootpart.sh"
diff --git a/recipes-core/udev/files/colibri-imx6/99-toradex.rules b/recipes-core/udev/files/colibri-imx6/99-toradex.rules
index 59cf815..7ac9fda 100644
--- a/recipes-core/udev/files/colibri-imx6/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx6/99-toradex.rules
@@ -1,13 +1,22 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="colibri-i2c"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="colibri-i2c-ddc"
-ACTION=="add", SUBSYSTEM=="i2c-dev", KERNELS=="120000.hdmi", SYMLINK+="colibri-i2c-ddc"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-uarta"
-ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-uartb"
-ACTION=="add", ATTRS{iomem_base}=="0x21EC000", SYMLINK+="colibri-uartc"
-ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="2014000.*spi", SYMLINK+="colibri-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="colibri-i2c-ddc"
+ACTION=="add|change", SUBSYSTEM=="i2c-dev", KERNELS=="120000.hdmi", SYMLINK+="colibri-i2c-ddc"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21EC000", SYMLINK+="colibri-uartc"
+ACTION=="add|change", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", KERNELS=="20bc000.watchdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2014000.*spi", SYMLINK+="colibri-spi-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2198000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2198000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2198000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd-part%n"
diff --git a/recipes-core/udev/files/colibri-imx6ull-emmc/99-toradex.rules b/recipes-core/udev/files/colibri-imx6ull-emmc/99-toradex.rules
new file mode 100644
index 0000000..b97986c
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx6ull-emmc/99-toradex.rules
@@ -0,0 +1,20 @@
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="colibri-uartc"
+ACTION=="add|change", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", KERNELS=="20bc000.watchdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2008000.*spi", SYMLINK+="colibri-spi-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.mmc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.mmc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2194000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2194000.mmc", SYMLINK+="emmc-part%n"
+SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd-part%n"
diff --git a/recipes-core/udev/files/colibri-imx6ull-emmc/toradex-adc.sh b/recipes-core/udev/files/colibri-imx6ull-emmc/toradex-adc.sh
new file mode 100755
index 0000000..123e798
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx6ull-emmc/toradex-adc.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env sh
+#
+# Called from udev. Compatible to colibri-imx6ull.
+#
+# Create/remove symlinks to/from the files with raw ain data.
+
+# Map the ADC lines:
+# colibri-ain{0..3} -> ADCx_IN{0,1,8,9}
+
+if [ "$ACTION" = "add" ]; then
+ ln -s "/sys$DEVPATH/in_voltage0_raw" /dev/colibri-ain0
+ ln -s "/sys$DEVPATH/in_voltage1_raw" /dev/colibri-ain1
+ ln -s "/sys$DEVPATH/in_voltage8_raw" /dev/colibri-ain2
+ ln -s "/sys$DEVPATH/in_voltage9_raw" /dev/colibri-ain3
+elif [ "$ACTION" = "remove" ]; then
+ rm -f /dev/colibri-ain0
+ rm -f /dev/colibri-ain1
+ rm -f /dev/colibri-ain2
+ rm -f /dev/colibri-ain3
+fi
+
diff --git a/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules b/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules
index c91f750..b97986c 100644
--- a/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules
@@ -1,8 +1,20 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="colibri-i2c"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-uarta"
-ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-uartb"
-ACTION=="add", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="colibri-uartc"
-ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="2008000.*spi", SYMLINK+="colibri-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="colibri-uartc"
+ACTION=="add|change", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", KERNELS=="20bc000.watchdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2008000.*spi", SYMLINK+="colibri-spi-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.mmc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="2194000.mmc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2194000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="2194000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.usdhc", SYMLINK+="colibri-sd-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="2190000.mmc", SYMLINK+="colibri-sd-part%n"
diff --git a/recipes-core/udev/files/colibri-imx6ull/toradex-adc.sh b/recipes-core/udev/files/colibri-imx6ull/toradex-adc.sh
index b56593f..123e798 100755
--- a/recipes-core/udev/files/colibri-imx6ull/toradex-adc.sh
+++ b/recipes-core/udev/files/colibri-imx6ull/toradex-adc.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
#
-# Called from udev. Compatible to colibri-imx8x.
+# Called from udev. Compatible to colibri-imx6ull.
#
# Create/remove symlinks to/from the files with raw ain data.
diff --git a/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules b/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules
index 707920e..2d8aff4 100644
--- a/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules
@@ -1,11 +1,19 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-uarta"
-ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-uartb"
-ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-uartc"
-ACTION=="add", KERNEL=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="30840000.*spi", SYMLINK+="colibri-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-uartc"
+ACTION=="add|change", SUBSYSTEM=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog", SYMLINK+="colibri-watchdog-som"
+ACTION=="add|change", SUBSYSTEM=="watchdog", DRIVERS=="imx2-wdt", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="30840000.*spi", SYMLINK+="colibri-spi-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b40000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b40000.mmc", SYMLINK+="colibri-sd-part%n"
diff --git a/recipes-core/udev/files/colibri-imx7/99-toradex.rules b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
index c0f8f23..2d8aff4 100644
--- a/recipes-core/udev/files/colibri-imx7/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
@@ -1,8 +1,19 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-uarta"
-ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-uartb"
-ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-uartc"
-ACTION=="add", KERNEL=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="30840000.*spi", SYMLINK+="colibri-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-uartc"
+ACTION=="add|change", SUBSYSTEM=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog", SYMLINK+="colibri-watchdog-som"
+ACTION=="add|change", SUBSYSTEM=="watchdog", DRIVERS=="imx2-wdt", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="30840000.*spi", SYMLINK+="colibri-spi-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-part%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b40000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd-part%n"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b40000.mmc", SYMLINK+="colibri-sd-part%n"
diff --git a/recipes-core/udev/files/colibri-imx8x/99-toradex.rules b/recipes-core/udev/files/colibri-imx8x/99-toradex.rules
index 11a1e37..b7afa14 100644
--- a/recipes-core/udev/files/colibri-imx8x/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx8x/99-toradex.rules
@@ -1,11 +1,14 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="colibri-i2c"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a800000.i2c", SYMLINK+="colibri-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="colibri-uarta"
-ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="colibri-uartb"
-ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="colibri-uartc"
-ACTION=="add", KERNELS=="watchdog", SYMLINK+="colibri-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="5a020000.spi", SYMLINK+="colibri-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a800000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="colibri-uarta"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="colibri-uartb"
+ACTION=="add|change", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="colibri-uartc"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="colibri-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="scu*", SYMLINK+="colibri-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="5a020000.spi", SYMLINK+="colibri-spi-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="5b010000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="5b010000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="5b020000.mmc", SYMLINK+="colibri-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="5b020000.mmc", SYMLINK+="colibri-sd-part%n"
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/files/mount.blacklist b/recipes-core/udev/files/mount.blacklist
deleted file mode 100644
index cf2c9bf..0000000
--- a/recipes-core/udev/files/mount.blacklist
+++ /dev/null
@@ -1,6 +0,0 @@
-/dev/loop
-/dev/ram
-/dev/mtdblock
-/dev/md
-/dev/mmcblk0boot0
-/dev/mmcblk0boot1
diff --git a/recipes-core/udev/files/mount.sh b/recipes-core/udev/files/mount.sh
deleted file mode 100644
index 323458d..0000000
--- a/recipes-core/udev/files/mount.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-#
-# Called from udev
-#
-# Attempt to mount any added block devices and umount any removed devices
-
-
-MOUNT="/bin/mount"
-PMOUNT="/usr/bin/pmount"
-UMOUNT="/bin/umount"
-for line in `grep -v ^# /etc/udev/mount.blacklist`
-do
- if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
- then
- logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
- exit 0
- fi
-done
-
-automount() {
- name="`basename "$DEVNAME"`"
-
- ! test -d "/media/$name" && mkdir -p "/media/$name"
- # Silent util-linux's version of mounting auto
- if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
- then
- MOUNT="$MOUNT -o silent"
- fi
-
- # If filesystem type is vfat, change the ownership group to 'disk', and
- # grant it with w/r/x permissions.
- case $ID_FS_TYPE in
- vfat|fat)
- MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
- ;;
- # TODO
- *)
- ;;
- esac
-
- if ! $MOUNT -t auto $DEVNAME "/media/$name"
- then
- #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
- rm_dir "/media/$name"
- else
- logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
- touch "/tmp/.automount-$name"
- fi
-}
-
-rm_dir() {
- # We do not want to rm -r populated directories
- if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
- then
- ! test -z "$1" && rm -r "$1"
- else
- logger "mount.sh/automount" "Not removing non-empty directory [$1]"
- fi
-}
-
-# No ID_FS_TYPE for cdrom device, yet it should be mounted
-name="`basename "$DEVNAME"`"
-[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
-
-if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then
- if [ -x "$PMOUNT" ]; then
- $PMOUNT $DEVNAME 2> /dev/null
- elif [ -x $MOUNT ]; then
- $MOUNT $DEVNAME 2> /dev/null
- fi
-
- # If the device isn't mounted at this point, it isn't
- # configured in fstab (note the root filesystem can show up as
- # /dev/root in /proc/mounts, so check the device number too)
- if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
- grep -q "^$DEVNAME " /proc/mounts || automount
- fi
-fi
-
-
-if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
- for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
- do
- $UMOUNT $mnt
- done
-
- # Remove empty directories from auto-mounter
- name="`basename "$DEVNAME"`"
- test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
-fi
diff --git a/recipes-core/udev/files/toradex-mount-bootpart.sh b/recipes-core/udev/files/toradex-mount-bootpart.sh
new file mode 100755
index 0000000..8e2e596
--- /dev/null
+++ b/recipes-core/udev/files/toradex-mount-bootpart.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env sh
+#
+# Bind mount boot partition /boot -> /${MOUNT_BASE}/BOOT-PARTITION-MOUNTPOINT
+# in which:
+# MOUNT_BASE is defined in /etc/udev/scripts/mount.sh
+# BOOT-PARTITION-MOUNTPOINT is the mount point of boot partition.
+
+BASEUUID=$(sed -r 's/^.*\broot=PARTUUID=([0-9a-f]+)-02.*$/\1/' /proc/cmdline)
+BOOTPART=$(readlink -f /dev/disk/by-partuuid/"${BASEUUID}-01")
+if [ x"$DEVNAME" = x"$BOOTPART" ]; then
+ MOUNTNAME="$(/sbin/blkid | grep "$DEVNAME:" | grep -o 'LABEL=".*"' | cut -d '"' -f2)-$(basename "$DEVNAME")"
+ MOUNTPOINT="$(sed -n 's/MOUNT_BASE=\"\(.*\)\"/\1/p' /etc/udev/scripts/mount.sh)/$MOUNTNAME"
+ BASE_INIT="$(readlink -f "@base_sbindir@/init")"
+ INIT_SYSTEMD="@systemd_unitdir@/systemd"
+
+ if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
+ # systemd as init uses systemd-mount to mount block devices
+ MOUNT="/usr/bin/systemd-mount --no-block -o silent"
+ UMOUNT="/usr/bin/systemd-umount"
+ else
+ MOUNT="/bin/mount"
+ UMOUNT="/bin/umount"
+
+ # Silent util-linux's version of mounting auto
+ if [ "x$(readlink $MOUNT)" = "x/bin/mount.util-linux" ]; then
+ MOUNT="$MOUNT -o silent"
+ fi
+ fi
+
+ if [ -e /tmp/.automount-"$MOUNTNAME" ]; then
+ $MOUNT -o bind "$MOUNTPOINT" /boot
+ fi
+fi
diff --git a/recipes-core/udev/files/verdin-am62/10-toradex-can0-ifname.link b/recipes-core/udev/files/verdin-am62/10-toradex-can0-ifname.link
new file mode 100644
index 0000000..335da87
--- /dev/null
+++ b/recipes-core/udev/files/verdin-am62/10-toradex-can0-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-4e08000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=verdin-can2
diff --git a/recipes-core/udev/files/verdin-am62/10-toradex-can1-ifname.link b/recipes-core/udev/files/verdin-am62/10-toradex-can1-ifname.link
new file mode 100644
index 0000000..8364480
--- /dev/null
+++ b/recipes-core/udev/files/verdin-am62/10-toradex-can1-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-20701000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=verdin-can1
diff --git a/recipes-core/udev/files/verdin-am62/99-toradex.rules b/recipes-core/udev/files/verdin-am62/99-toradex.rules
new file mode 100644
index 0000000..61714e9
--- /dev/null
+++ b/recipes-core/udev/files/verdin-am62/99-toradex.rules
@@ -0,0 +1,17 @@
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="20010000.i2c", SYMLINK+="verdin-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="20020000.i2c", SYMLINK+="verdin-i2c2"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="20030000.i2c", SYMLINK+="verdin-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="4900000.i2c", SYMLINK+="verdin-i2c4"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="20000000.i2c", SYMLINK+="verdin-i2c-on-module"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2810000.serial", SYMLINK+="verdin-uart1"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2b300000.serial", SYMLINK+="verdin-uart2"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2800000.serial", SYMLINK+="verdin-uart3"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="4a00000.serial", SYMLINK+="verdin-uart4"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="verdin-watchdog", SYMLINK+="verdin-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="20110000.*spi", SYMLINK+="verdin-spi-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="fa10000.mmc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="fa10000.mmc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="fa10000.mmc", SYMLINK+="emmc-part%n"
+SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="fa00000.mmc", SYMLINK+="verdin-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="fa00000.mmc", SYMLINK+="verdin-sd-part%n"
diff --git a/recipes-core/udev/files/verdin-am62/toradex-adc.sh b/recipes-core/udev/files/verdin-am62/toradex-adc.sh
new file mode 100755
index 0000000..89c1c92
--- /dev/null
+++ b/recipes-core/udev/files/verdin-am62/toradex-adc.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env sh
+#
+# Called from udev. Compatible to verdin-imx8mm.
+#
+# Create/remove symlinks to/from the files with raw adc data.
+
+# Map the ADC lines:
+# verdin-adc{1..4} -> TLA2024 ADC{3,2,1,0}
+
+if [ "$ACTION" = "add" ]; then
+ ln -s "/sys$DEVPATH/in_voltage0_raw" /dev/verdin-adc4
+ ln -s "/sys$DEVPATH/in_voltage1_raw" /dev/verdin-adc3
+ ln -s "/sys$DEVPATH/in_voltage2_raw" /dev/verdin-adc2
+ ln -s "/sys$DEVPATH/in_voltage3_raw" /dev/verdin-adc1
+elif [ "$ACTION" = "remove" ]; then
+ rm -f /dev/verdin-adc1
+ rm -f /dev/verdin-adc2
+ rm -f /dev/verdin-adc3
+ rm -f /dev/verdin-adc4
+fi
+
diff --git a/recipes-core/udev/files/verdin-imx8mm/10-toradex-can0-ifname.link b/recipes-core/udev/files/verdin-imx8mm/10-toradex-can0-ifname.link
new file mode 100644
index 0000000..f72ad8a
--- /dev/null
+++ b/recipes-core/udev/files/verdin-imx8mm/10-toradex-can0-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-30840000.spi-cs-0
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=verdin-can1
diff --git a/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules b/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules
index 2885e16..bd82b12 100644
--- a/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules
+++ b/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules
@@ -1,13 +1,16 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="verdin-i2c1"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a30000.i2c", SYMLINK+="verdin-i2c2"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a40000.i2c", SYMLINK+="verdin-i2c4"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="verdin-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="verdin-uart1"
-ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="verdin-uart2"
-ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="verdin-uart3"
-ACTION=="add", KERNELS=="watchdog", SYMLINK+="verdin-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="30830000.ecspi", SYMLINK+="verdin-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="verdin-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a30000.i2c", SYMLINK+="verdin-i2c2"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a40000.i2c", SYMLINK+="verdin-i2c4"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="verdin-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30890000", SYMLINK+="verdin-uart1"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30880000", SYMLINK+="verdin-uart2"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30860000", SYMLINK+="verdin-uart3"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="verdin-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="verdin-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="30830000.*spi", SYMLINK+="verdin-spi-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b40000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b40000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b40000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b50000.mmc", SYMLINK+="verdin-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b50000.mmc", SYMLINK+="verdin-sd-part%n"
diff --git a/recipes-core/udev/files/verdin-imx8mm/toradex-adc.sh b/recipes-core/udev/files/verdin-imx8mm/toradex-adc.sh
index 0f5f878..89c1c92 100755
--- a/recipes-core/udev/files/verdin-imx8mm/toradex-adc.sh
+++ b/recipes-core/udev/files/verdin-imx8mm/toradex-adc.sh
@@ -5,13 +5,13 @@
# Create/remove symlinks to/from the files with raw adc data.
# Map the ADC lines:
-# verdin-adc{1..4} -> MAX11607 ADC{0,1,2,3}
+# verdin-adc{1..4} -> TLA2024 ADC{3,2,1,0}
if [ "$ACTION" = "add" ]; then
- ln -s "/sys$DEVPATH/in_voltage0_raw" /dev/verdin-adc1
- ln -s "/sys$DEVPATH/in_voltage1_raw" /dev/verdin-adc2
- ln -s "/sys$DEVPATH/in_voltage2_raw" /dev/verdin-adc3
- ln -s "/sys$DEVPATH/in_voltage3_raw" /dev/verdin-adc4
+ ln -s "/sys$DEVPATH/in_voltage0_raw" /dev/verdin-adc4
+ ln -s "/sys$DEVPATH/in_voltage1_raw" /dev/verdin-adc3
+ ln -s "/sys$DEVPATH/in_voltage2_raw" /dev/verdin-adc2
+ ln -s "/sys$DEVPATH/in_voltage3_raw" /dev/verdin-adc1
elif [ "$ACTION" = "remove" ]; then
rm -f /dev/verdin-adc1
rm -f /dev/verdin-adc2
diff --git a/recipes-core/udev/files/verdin-imx8mp/10-toradex-can0-ifname.link b/recipes-core/udev/files/verdin-imx8mp/10-toradex-can0-ifname.link
new file mode 100644
index 0000000..0db2fc6
--- /dev/null
+++ b/recipes-core/udev/files/verdin-imx8mp/10-toradex-can0-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-308c0000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=verdin-can1
diff --git a/recipes-core/udev/files/verdin-imx8mp/10-toradex-can1-ifname.link b/recipes-core/udev/files/verdin-imx8mp/10-toradex-can1-ifname.link
new file mode 100644
index 0000000..a9a410f
--- /dev/null
+++ b/recipes-core/udev/files/verdin-imx8mp/10-toradex-can1-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-308d0000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=verdin-can2
diff --git a/recipes-core/udev/files/verdin-imx8mp/99-toradex.rules b/recipes-core/udev/files/verdin-imx8mp/99-toradex.rules
index f1554e2..a37ff67 100644
--- a/recipes-core/udev/files/verdin-imx8mp/99-toradex.rules
+++ b/recipes-core/udev/files/verdin-imx8mp/99-toradex.rules
@@ -1,13 +1,18 @@
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="verdin-i2c1"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a30000.i2c", SYMLINK+="verdin-i2c2"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a40000.i2c", SYMLINK+="verdin-i2c4"
-ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="verdin-i2c-on-module"
-ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="verdin-uart1"
-ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="verdin-uart2"
-ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="verdin-uart3"
-ACTION=="add", KERNELS=="watchdog", SYMLINK+="verdin-watchdog"
-ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="30820000.ecspi", SYMLINK+="verdin-spi-cs%n"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="verdin-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a30000.i2c", SYMLINK+="verdin-i2c2"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30ad0000.i2c", SYMLINK+="verdin-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="DesignWare HDMI", SYMLINK+="verdin-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a40000.i2c", SYMLINK+="verdin-i2c4"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="verdin-i2c-on-module"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30860000", SYMLINK+="verdin-uart1"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30890000", SYMLINK+="verdin-uart2"
+ACTION=="add|change", ATTRS{iomem_base}=="0x30880000", SYMLINK+="verdin-uart3"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="verdin-watchdog"
+ACTION=="add|change", SUBSYSTEM=="watchdog", KERNELS=="soc*", SYMLINK+="verdin-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="30820000.*spi", SYMLINK+="verdin-spi-cs%n"
KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.mmc", SYMLINK+="emmc-boot%n"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.mmc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="30b50000.mmc", SYMLINK+="verdin-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="30b50000.mmc", SYMLINK+="verdin-sd-part%n"
diff --git a/recipes-core/udev/udev-extraconf_%.bbappend b/recipes-core/udev/udev-extraconf_%.bbappend
index 7b03d77..d746f6b 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 = " file://hotplug.rules \
- file://hotplug.sh \
-"
-
-do_install_append() {
- 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
-}
+MOUNT_BASE = "/media"
diff --git a/recipes-core/udev/udev-toradex-rules.bb b/recipes-core/udev/udev-toradex-rules.bb
index a4833ca..b1cf46b 100644
--- a/recipes-core/udev/udev-toradex-rules.bb
+++ b/recipes-core/udev/udev-toradex-rules.bb
@@ -1,17 +1,44 @@
+DESCRIPTION = "udev rules for Toradex SOCs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
- file://99-toradex.rules \
file://10-toradex-wifi-ifnames.link \
+ file://99-toradex.rules \
+ file://bootpart-automount.rules \
file://toradex-adc.sh \
+ file://toradex-mount-bootpart.sh \
+"
+
+SRC_URI:append:verdin-am62 = " \
+ file://10-toradex-can0-ifname.link \
+ file://10-toradex-can1-ifname.link \
+"
+SRC_URI:append:verdin-imx8mm = " \
+ file://10-toradex-can0-ifname.link \
+"
+SRC_URI:append:verdin-imx8mp = " \
+ file://10-toradex-can0-ifname.link \
+ file://10-toradex-can1-ifname.link \
"
do_install () {
install -d ${D}${sysconfdir}/udev/rules.d
install -d ${D}${sysconfdir}/udev/scripts
install -d ${D}${sysconfdir}/systemd/network
+ # 10-toradex-can*-ifname.link files are only available for the Verdin family
+ if [ -f ${WORKDIR}/10-toradex-can0-ifname.link ]; then
+ install -m 0644 ${WORKDIR}/10-toradex-can0-ifname.link ${D}${sysconfdir}/systemd/network/
+ fi
+ if [ -f ${WORKDIR}/10-toradex-can1-ifname.link ]; then
+ install -m 0644 ${WORKDIR}/10-toradex-can1-ifname.link ${D}${sysconfdir}/systemd/network/
+ fi
+ install -m 0644 ${WORKDIR}/10-toradex-wifi-ifnames.link ${D}${sysconfdir}/systemd/network/
install -m 0644 ${WORKDIR}/99-toradex.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 0644 ${WORKDIR}/bootpart-automount.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0755 ${WORKDIR}/toradex-adc.sh ${D}${sysconfdir}/udev/scripts/
- install -m 0644 ${WORKDIR}/10-toradex-wifi-ifnames.link ${D}${sysconfdir}/systemd/network/
+ install -m 0755 ${WORKDIR}/toradex-mount-bootpart.sh ${D}${sysconfdir}/udev/scripts/
+
+ sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/toradex-mount-bootpart.sh
+ sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/toradex-mount-bootpart.sh
}
diff --git a/recipes-core/util-linux/util-linux/fstrim.service b/recipes-core/util-linux/util-linux/fstrim.service
new file mode 100644
index 0000000..5c89027
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/fstrim.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Discard unused blocks
+ConditionVirtualization=!container
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/fstrim -av
diff --git a/recipes-core/util-linux/util-linux/fstrim.timer b/recipes-core/util-linux/util-linux/fstrim.timer
new file mode 100644
index 0000000..df6bef2
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/fstrim.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Discard unused blocks once a week
+ConditionVirtualization=!container
+
+[Timer]
+OnCalendar=weekly
+AccuracySec=1h
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend
new file mode 100644
index 0000000..61b8489
--- /dev/null
+++ b/recipes-core/util-linux/util-linux_%.bbappend
@@ -0,0 +1,18 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI:append = " file://fstrim.service file://fstrim.timer"
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "fstrim.service fstrim.timer"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install:append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/fstrim.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/fstrim.timer ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_unitdir}/system/*.service
+}
+