diff options
author | Kai Kang <kai.kang@windriver.com> | 2022-04-15 22:38:03 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-19 14:14:12 +0100 |
commit | 72bb57ed0ba0b2c0e6ebf4b14289fdef8e4d05c2 (patch) | |
tree | 43953a9b88b199b794eb99aaf64f9c7d3f4bfcc6 /scripts/postinst-intercepts | |
parent | 73cdd40c9e3c70e91b6140362bc9a92713ffd707 (diff) | |
download | poky-72bb57ed0ba0b2c0e6ebf4b14289fdef8e4d05c2.tar.gz |
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: 3dba872a42c2be7d0865a30118984ab013850292)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/update_udev_hwdb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb index 8076b8ae6f..8b3f5de791 100644 --- a/scripts/postinst-intercepts/update_udev_hwdb +++ b/scripts/postinst-intercepts/update_udev_hwdb | |||
@@ -9,14 +9,17 @@ case "${PREFERRED_PROVIDER_udev}" in | |||
9 | systemd) | 9 | systemd) |
10 | UDEV_EXTRA_ARGS="--usr" | 10 | UDEV_EXTRA_ARGS="--usr" |
11 | UDEVLIBDIR="${rootlibexecdir}" | 11 | UDEVLIBDIR="${rootlibexecdir}" |
12 | UDEVADM="${base_bindir}/udevadm" | ||
12 | ;; | 13 | ;; |
13 | 14 | ||
14 | *) | 15 | *) |
15 | UDEV_EXTRA_ARGS="" | 16 | UDEV_EXTRA_ARGS="" |
16 | UDEVLIBDIR="${sysconfdir}" | 17 | UDEVLIBDIR="${sysconfdir}" |
18 | UDEVADM="${bindir}/udevadm" | ||
17 | ;; | 19 | ;; |
18 | esac | 20 | esac |
19 | 21 | ||
20 | rm -f $D${UDEVLIBDIR}/udev/hwdb.bin | 22 | rm -f $D${UDEVLIBDIR}/udev/hwdb.bin |
21 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS} | 23 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} || |
24 | PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} | ||
22 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin | 25 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |