mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

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: 3dba872a42c2be7d0865a30118984ab013850292) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
26 lines
574 B
Bash
26 lines
574 B
Bash
#!/bin/sh
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
set -e
|
|
|
|
case "${PREFERRED_PROVIDER_udev}" in
|
|
systemd)
|
|
UDEV_EXTRA_ARGS="--usr"
|
|
UDEVLIBDIR="${rootlibexecdir}"
|
|
UDEVADM="${base_bindir}/udevadm"
|
|
;;
|
|
|
|
*)
|
|
UDEV_EXTRA_ARGS=""
|
|
UDEVLIBDIR="${sysconfdir}"
|
|
UDEVADM="${bindir}/udevadm"
|
|
;;
|
|
esac
|
|
|
|
rm -f $D${UDEVLIBDIR}/udev/hwdb.bin
|
|
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
|