mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 16:01:54 -09:00
package/dracut: use host-cross-ldd instead of host-prelink-cross
This commit reworks the dracut package to use the cross-ldd installed by host-cross-ldd instead of prelink-rtld installed by host-prelink-cross. Indeed, prelink-cross is not maintained upstream, and its dependency on host-libiberty causes problems in Buildroot with other packages. The only change needed is that the dracut_wrapper script needs to be generated, as we now need to know the prefix of the cross-compilation tool (TARGET_CROSS). Tested by running the dracut tests of the test suite. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
2528672d39
commit
b171b7bd78
@@ -10,12 +10,14 @@ DRACUT_LICENSE = GPL-2.0
|
||||
DRACUT_LICENSE_FILES = COPYING
|
||||
DRACUT_CPE_ID_VALID = YES
|
||||
|
||||
HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-prelink-cross
|
||||
HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-cross-ldd
|
||||
|
||||
define HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT
|
||||
mv $(HOST_DIR)/bin/dracut $(HOST_DIR)/bin/dracut.real
|
||||
install -D -m 0755 $(HOST_DRACUT_PKGDIR)/dracut_wrapper \
|
||||
$(HOST_DIR)/bin/dracut
|
||||
sed -e "s%@@TARGET_CROSS@@%$(TARGET_CROSS)%" \
|
||||
$(HOST_DRACUT_PKGDIR)/dracut_wrapper.in > \
|
||||
$(@D)/dracut_wrapper
|
||||
install -D -m 0755 $(@D)/dracut_wrapper $(HOST_DIR)/bin/dracut
|
||||
endef
|
||||
HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ topdir="$(dirname "$(realpath "$(dirname "${0}")")")"
|
||||
DRACUT_LDD="$(mktemp /tmp/dracut-ldd.XXXXXX)"
|
||||
cat >"${DRACUT_LDD}" <<EOL
|
||||
#!/bin/bash
|
||||
${topdir}/sbin/prelink-rtld --root='${sysroot}' \${1}
|
||||
@@TARGET_CROSS@@xldd --root='${sysroot}' \${1}
|
||||
EOL
|
||||
chmod +x "${DRACUT_LDD}"
|
||||
export DRACUT_LDD
|
||||
Reference in New Issue
Block a user