From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Running depmod in the package installation
Date: Tue, 17 Mar 2020 22:23:23 +0100 [thread overview]
Message-ID: <20200317212323.GU19677@scaer> (raw)
In-Reply-To: <CAJ4jsaeaKzb7o9Pj4u0wZyjM1zY2nWErKffTep5QYBEAhd=bug@mail.gmail.com>
Carlos, All,
On 2020-03-15 22:43 -0300, Carlos Santos spake thusly:
> 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>
Damn, I was pretty sure we already did it, but it appears not.
> 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,
Exactly what I was going to suggest.
> define LINUX_DEPMOD
> $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) \
> $$($(MAKE) -C $(LINUX_DIR) --no-print-directory -s kernelversion)
I guess you'd want to use $(LINUX_VERSION_PROBED) instead of
hand-calling kernelversion, linux/linux.mk at 159:
# Get the real Linux version, which tells us where kernel modules are
# going to be installed in the target filesystem.
LINUX_VERSION_PROBED = ....
Regards,
Yann E. MORIN.
> endef
>
> What do you think?
>
> --
> Carlos Santos <unixmania@gmail.com>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2020-03-17 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 1:43 [Buildroot] Running depmod in the package installation Carlos Santos
2020-03-17 21:23 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200317212323.GU19677@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox