summaryrefslogtreecommitdiff
path: root/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core')
-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)8
-rw-r--r--recipes-core/udev/files/10-toradex-wifi-ifnames.link2
-rw-r--r--recipes-core/udev/files/aquila-am69/10-toradex-can0-ifname.link6
-rw-r--r--recipes-core/udev/files/aquila-am69/10-toradex-can1-ifname.link6
-rw-r--r--recipes-core/udev/files/aquila-am69/10-toradex-can10-ifname.link6
-rw-r--r--recipes-core/udev/files/aquila-am69/10-toradex-can13-ifname.link6
-rw-r--r--recipes-core/udev/files/aquila-am69/99-toradex.rules21
-rw-r--r--recipes-core/udev/udev-extraconf_%.bbappend1
-rw-r--r--recipes-core/udev/udev-toradex-rules.bb20
-rw-r--r--recipes-core/util-linux/util-linux_%.bbappend7
11 files changed, 68 insertions, 17 deletions
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 b39abdb..ffd8abd 100644
--- a/recipes-core/set-hostname/set-hostname_1.0.bb
+++ b/recipes-core/set-hostname/set-hostname_1.1.bb
@@ -10,6 +10,8 @@ SRC_URI += " \
file://set-hostname.service \
"
+S = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"
+
FILES:${PN} = " \
${bindir} \
${systemd_system_unitdir} \
@@ -21,10 +23,12 @@ SYSTEMD_SERVICE:${PN} = " \
do_install () {
install -d ${D}${bindir}
- install -m 0755 ${WORKDIR}/sethostname ${D}${bindir}
+ install -m 0755 ${S}/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}
+ install -m 0644 ${S}/set-hostname.service ${D}${systemd_system_unitdir}
fi
}
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/aquila-am69/10-toradex-can0-ifname.link b/recipes-core/udev/files/aquila-am69/10-toradex-can0-ifname.link
new file mode 100644
index 0000000..7058581
--- /dev/null
+++ b/recipes-core/udev/files/aquila-am69/10-toradex-can0-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-40528000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=aquila-can2
diff --git a/recipes-core/udev/files/aquila-am69/10-toradex-can1-ifname.link b/recipes-core/udev/files/aquila-am69/10-toradex-can1-ifname.link
new file mode 100644
index 0000000..284ba25
--- /dev/null
+++ b/recipes-core/udev/files/aquila-am69/10-toradex-can1-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-40568000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=aquila-can4
diff --git a/recipes-core/udev/files/aquila-am69/10-toradex-can10-ifname.link b/recipes-core/udev/files/aquila-am69/10-toradex-can10-ifname.link
new file mode 100644
index 0000000..03d124f
--- /dev/null
+++ b/recipes-core/udev/files/aquila-am69/10-toradex-can10-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-27a1000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=aquila-can1
diff --git a/recipes-core/udev/files/aquila-am69/10-toradex-can13-ifname.link b/recipes-core/udev/files/aquila-am69/10-toradex-can13-ifname.link
new file mode 100644
index 0000000..12502d7
--- /dev/null
+++ b/recipes-core/udev/files/aquila-am69/10-toradex-can13-ifname.link
@@ -0,0 +1,6 @@
+[Match]
+Property=ID_PATH=platform-27d1000.can
+
+[Link]
+AlternativeNamesPolicy=
+AlternativeName=aquila-can3
diff --git a/recipes-core/udev/files/aquila-am69/99-toradex.rules b/recipes-core/udev/files/aquila-am69/99-toradex.rules
new file mode 100644
index 0000000..a40a5a2
--- /dev/null
+++ b/recipes-core/udev/files/aquila-am69/99-toradex.rules
@@ -0,0 +1,21 @@
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="40b00000.i2c", SYMLINK+="aquila-i2c1"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="40b10000.i2c", SYMLINK+="aquila-i2c2"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="2000000.i2c", SYMLINK+="aquila-i2c3"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="2010000.i2c", SYMLINK+="aquila-i2c4"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="2020000.i2c", SYMLINK+="aquila-i2c5"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="2050000.i2c", SYMLINK+="aquila-i2c6"
+ACTION=="add|change", KERNEL=="i2c-[0-9]*", KERNELS=="42120000.i2c", SYMLINK+="aquila-i2c-on-module"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2810000.serial", SYMLINK+="aquila-uart1"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="42300000.serial", SYMLINK+="aquila-uart2"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2880000.serial", SYMLINK+="aquila-uart3"
+ACTION=="add|change", KERNEL=="ttyS[0-9]*", KERNELS=="2800000.serial", SYMLINK+="aquila-uart4"
+ACTION=="add|change", KERNELS=="watchdog", SYMLINK+="aquila-watchdog", SYMLINK+="aquila-watchdog-soc"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2120000.*spi", SYMLINK+="aquila-spi1-cs%n"
+ACTION=="add|change", SUBSYSTEM=="spidev", KERNELS=="2100000.*spi", SYMLINK+="aquila-spi2-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="4f80000.mmc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="4f80000.mmc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="4f80000.mmc", SYMLINK+="emmc-part%n"
+#TODO ADC
+#SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", KERNELS=="4fb0000.mmc", SYMLINK+="aquila-sd"
+ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", KERNELS=="4fb0000.mmc", SYMLINK+="aquila-sd-part%n"
diff --git a/recipes-core/udev/udev-extraconf_%.bbappend b/recipes-core/udev/udev-extraconf_%.bbappend
deleted file mode 100644
index d746f6b..0000000
--- a/recipes-core/udev/udev-extraconf_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-MOUNT_BASE = "/media"
diff --git a/recipes-core/udev/udev-toradex-rules.bb b/recipes-core/udev/udev-toradex-rules.bb
index b1cf46b..926e1cf 100644
--- a/recipes-core/udev/udev-toradex-rules.bb
+++ b/recipes-core/udev/udev-toradex-rules.bb
@@ -22,22 +22,24 @@ SRC_URI:append:verdin-imx8mp = " \
file://10-toradex-can1-ifname.link \
"
+S = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"
+
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/
+ if [ -f ${S}/10-toradex-can0-ifname.link ]; then
+ install -m 0644 ${S}/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/
+ if [ -f ${S}/10-toradex-can1-ifname.link ]; then
+ install -m 0644 ${S}/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 0755 ${WORKDIR}/toradex-mount-bootpart.sh ${D}${sysconfdir}/udev/scripts/
+ install -m 0644 ${S}/10-toradex-wifi-ifnames.link ${D}${sysconfdir}/systemd/network/
+ install -m 0644 ${S}/99-toradex.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 0644 ${S}/bootpart-automount.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 0755 ${S}/toradex-adc.sh ${D}${sysconfdir}/udev/scripts/
+ install -m 0755 ${S}/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_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend
index 61b8489..3427101 100644
--- a/recipes-core/util-linux/util-linux_%.bbappend
+++ b/recipes-core/util-linux/util-linux_%.bbappend
@@ -3,16 +3,17 @@ SRC_URI:append = " file://fstrim.service file://fstrim.timer"
inherit systemd
+OURFILEPATH = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"
+
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/
+ install -m 0644 ${OURFILEPATH}/fstrim.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${OURFILEPATH}/fstrim.timer ${D}${systemd_unitdir}/system/
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
${D}${systemd_unitdir}/system/*.service
}
-