Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Running depmod in the package installation
@ 2020-03-16  1:43 Carlos Santos
  2020-03-17 21:23 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Santos @ 2020-03-16  1:43 UTC (permalink / raw)
  To: buildroot

Hello buildrooters,

Currently if a package installs a kernel module it must be loaded by
means of its full path, e.g

    insmod /lib/modules/$(/bin/uname -r)/extra/pvrsrvkm.ko

This is required because modprobe does not work, since we must run

    $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) <kernel-version>

So I did this in package/ti-sgx-km/ti-sgx-km.mk, to test:

define TI_SGX_KM_INSTALL_TARGET_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
                DISCIMAGE=$(TARGET_DIR) \
                kbuild_install -C $(@D)/$(TI_SGX_KM_SUBDIR)
        kver=$$($(MAKE) -C $(LINUX_DIR) --no-print-directory -s
kernelversion); \
        $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $$kver
 endef

With this change a "modprobe pvrsrvkm" works but I wonder if it should
be better to run depmod in a target-finalize hook in linux/linux.mk,
e.g,

define LINUX_DEPMOD
        $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) \
                $$($(MAKE) -C $(LINUX_DIR) --no-print-directory -s
kernelversion)
endef

What do you think?

-- 
Carlos Santos <unixmania@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-17 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16  1:43 [Buildroot] Running depmod in the package installation Carlos Santos
2020-03-17 21:23 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox