kmod: Fix tool links when BR2_ROOTFS_MERGED_USR
PATCH 1/1 kmod: Fix tool links when BR2_ROOTFS_MERGED_USR
PATCH 1/1 kmod: Fix tool links when BR2_ROOTFS_MERGED_USR
Quoted 17 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Chris" == Chris Lesiak <[email protected]> writes:
From
259a889fc3eb5196a9b69a624effe56b9e6dcfebMon Sep 17 00:00:00 2001From: Chris Lesiak <[email protected]>
Date: Mon, 26 Oct 2015 08:51:48 -0500
Subject: [PATCH] kmod: Fix tool links whenBR2_ROOTFS_MERGED_USRSigned-off-by Chris Lesiak <[email protected]>--- package/kmod/kmod.mk | 8 ++++++++ 1 file changed, 8 insertions(+)package/kmod/kmod.mk +0
-0
package/kmod/kmod.mk KMOD_LICENSE_FILES += COPYING · line 47
Quoted 2 lines
package/kmod/kmod.mk +0
-0@@ -46,11 +46,19 @@ KMOD_LICENSE_FILES += COPYING # take precedence over busybox implementation KMOD_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
I was a bit confused that things didn't work as ../usr/bin/kmod seems a sensible path from /sbin, but the symlink is resolved first so it really starts from /usr/sbin.
package/kmod/kmod.mk KMOD_LICENSE_FILES += COPYING · line 60
Quoted 13 lines
package/kmod/kmod.mk +8
-0+ifeq ($(BR2_ROOTFS_MERGED_USR),y) +define KMOD_INSTALL_TOOLS + for i in depmod insmod lsmod modinfo modprobe rmmod; do \ + ln -sf ../bin/kmod $(TARGET_DIR)/usr/sbin/$$i; \ + done +endef +else define KMOD_INSTALL_TOOLS for i in depmod insmod lsmod modinfo modprobe rmmod; do \ ln -sf ../usr/bin/kmod $(TARGET_DIR)/sbin/$$i; \ done endef +endif
Instead of having the logic twice with the risks of getting them out of sync in the future, I've instead added a KMOD_BIN_PATH (that is either ../bin/kmod or ../usr/bin/kmod) and used that.
There isn't really any good reason to use $(TARGET_DIR)/usr/sbin/$$i over $(TARGET_DIR/sbin/$$i as ln follows the symlink, so I've left that as is.
Committed with those changes, thanks.
Signature · 1 line
Bye, Peter Korsgaard