From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Li Chen<me@linux.beauty>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/kmod: use the correct path for kmod
Date: Wed, 12 Oct 2022 22:40:08 +0200 [thread overview]
Message-ID: <20221012224008.5dc7c7b6@windsurf> (raw)
In-Reply-To: <87edvdeseo.wl-me@linux.beauty>
Hello,
On Wed, 12 Oct 2022 09:34:39 +0800
Li Chen<me@linux.beauty> wrote:
> Content-Transfer-Encoding: 8bit
>
> kmod install path is always /usr/bin/kmod instead
> of /bin/kmod.
>
> So if we link modprobe/lsmod/... to /bin/kmod
>
> We will get error like:
> > # modprobe
> > -sh: modprobe: not found
>
> because it points to:
> > # ls -liah /sbin/modprobe
> > 2551 lrwxrwxrwx 1 root root 11 Sep 25 10:05 /sbin/modprobe -> ../bin/kmod
>
> and kmod is under /usr/bin/kmod instead of /bin/kmod.
>
> Signed-off-by: Li Chen <me@linux.beauty>
Are you testing a BR2_ROOTFS_MERGED_USR enabled or a
BR2_ROOTFS_MERGED_USR disabled configuration?
If you're testing a BR2_ROOTFS_MERGED_USR enabled configuration, then
the "modprobe" symlink, even if created in /sbin is in fact in
/usr/sbin, because /sbin is a symlink to /usr/sbin. So actually the
symlink is /usr/sbin/modprobe -> ../bin/kmod, which is correct as kmod
is indeed in /usr/bin/kmod.
If you're testing a BR2_ROOTFS_MERGED_USR disabled configuration, then
the "modprobe" symlink is really in /sbin, and /sbin/modprobe is a
symlink to ../usr/bin/kmod, which is correct.
(Of course, I didn't do a test, so maybe my reasoning is wrong, but the
current logic appears correct at first sight).
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-10-12 20:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 1:34 [Buildroot] [PATCH] package/kmod: use the correct path for kmod Li Chen
2022-10-12 20:40 ` Thomas Petazzoni via buildroot [this message]
2022-10-16 4:08 ` Li Chen
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=20221012224008.5dc7c7b6@windsurf \
--to=buildroot@buildroot.org \
--cc=me@linux.beauty \
--cc=thomas.petazzoni@bootlin.com \
/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