Implement compatibility for applet links in /bin directory by mirroring sbin applet links. Update configuration to enable watchdog support.

This commit is contained in:
2026-04-08 09:33:16 +03:00
parent 720a12374c
commit f21a46172f
2 changed files with 13 additions and 1 deletions

View File

@@ -109,6 +109,18 @@ for f in "${libbusybox_candidates[@]}"; do
ln -sf "$(basename "${f}")" "${INSTALL_DIR}/lib/libbusybox.so" 2>/dev/null || true
done
# Compatibility layout: mirror sbin applet links into /bin
# so environments expecting everything under /bin (like the target console)
# can resolve applets such as /bin/watchdog.
if [ -d "${INSTALL_DIR}/sbin" ] && [ -d "${INSTALL_DIR}/bin" ]; then
shopt -s nullglob
for s in "${INSTALL_DIR}/sbin"/*; do
name="$(basename "${s}")"
ln -sf "busybox" "${INSTALL_DIR}/bin/${name}"
done
shopt -u nullglob
fi
echo "Build completed successfully."
echo "Binary: ${BUSYBOX_DIR}/busybox"
echo "Shared library: ${BUSYBOX_DIR}/libbusybox.so"