mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
update_udev_hwdb: fix multilib issue with systemd
It duplicates udevadm in systemd recipe to make it could run
update_udev_hwdb with multilib enabled. Since systemd last update,
it deploys a shared library libsystemd-shared-250.so in /lib/systemd/.
The library will be overwritten when multilib enabled. Then if both
udev-hwdb and lib32-udev-hwdb are installed, it fails to run the
multilib version postinstall intercept update_udev_hwdb:
| /path/to/build/tmp-glibc/work/intel_x86_64-wrs-linux/wrlinux-image-small/1.0-r1/rootfs/usr/libexec/lib32-udevadm:
error while loading shared libraries: libsystemd-shared-250.so: wrong ELF class: ELFCLASS64
`udevadm hwdb --update` just concatenates .hwdb files in dirs
/etc/udev/hwdb.d and /lib/udev/hwdb.d. The output file hwdb.bin is
identical with the one created by lib32-udevadm. So do NOT duplicate
lib32-udevadm in systemd and eudev. And update intercept script
update_udev_hwdb that re-run udevadm with same arch qemuwrapper if run
${binprefix}qemuwrapper failed.
(From OE-Core rev: 74fe1b5af064f644a7d555b61527bb7d02cc30b8)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3dba872a42c2be7d0865a30118984ab013850292)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -337,10 +337,6 @@ do_install() {
|
|||||||
# create link for existing udev rules
|
# create link for existing udev rules
|
||||||
ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
|
ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
|
||||||
|
|
||||||
# duplicate udevadm for postinst script
|
|
||||||
install -d ${D}${libexecdir}
|
|
||||||
ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
|
|
||||||
|
|
||||||
# install default policy for presets
|
# install default policy for presets
|
||||||
# https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
|
# https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
|
||||||
install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
|
install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
|
||||||
@@ -718,7 +714,6 @@ FILES:udev += "${base_sbindir}/udevd \
|
|||||||
${base_bindir}/systemd-hwdb \
|
${base_bindir}/systemd-hwdb \
|
||||||
${base_bindir}/udevadm \
|
${base_bindir}/udevadm \
|
||||||
${base_sbindir}/udevadm \
|
${base_sbindir}/udevadm \
|
||||||
${libexecdir}/${MLPREFIX}udevadm \
|
|
||||||
${datadir}/bash-completion/completions/udevadm \
|
${datadir}/bash-completion/completions/udevadm \
|
||||||
${systemd_system_unitdir}/systemd-hwdb-update.service \
|
${systemd_system_unitdir}/systemd-hwdb-update.service \
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ do_install:append() {
|
|||||||
|
|
||||||
# hid2hci has moved to bluez4. removed in udev as of version 169
|
# hid2hci has moved to bluez4. removed in udev as of version 169
|
||||||
rm -f ${D}${base_libdir}/udev/hid2hci
|
rm -f ${D}${base_libdir}/udev/hid2hci
|
||||||
|
|
||||||
# duplicate udevadm for postinst script
|
|
||||||
install -d ${D}${libexecdir}
|
|
||||||
ln ${D}${bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install:prepend:class-target () {
|
do_install:prepend:class-target () {
|
||||||
|
|||||||
@@ -9,14 +9,17 @@ case "${PREFERRED_PROVIDER_udev}" in
|
|||||||
systemd)
|
systemd)
|
||||||
UDEV_EXTRA_ARGS="--usr"
|
UDEV_EXTRA_ARGS="--usr"
|
||||||
UDEVLIBDIR="${rootlibexecdir}"
|
UDEVLIBDIR="${rootlibexecdir}"
|
||||||
|
UDEVADM="${base_bindir}/udevadm"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
UDEV_EXTRA_ARGS=""
|
UDEV_EXTRA_ARGS=""
|
||||||
UDEVLIBDIR="${sysconfdir}"
|
UDEVLIBDIR="${sysconfdir}"
|
||||||
|
UDEVADM="${bindir}/udevadm"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
|
rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
|
||||||
PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
|
PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} ||
|
||||||
|
PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS}
|
||||||
chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
|
chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
|
||||||
|
|||||||
Reference in New Issue
Block a user