All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 6992] New: Incorrect installation rights on external kernel module makes it unloadable
Date: Thu, 27 Mar 2014 09:01:39 +0000 (UTC)	[thread overview]
Message-ID: <bug-6992-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=6992

           Summary: Incorrect installation rights on external kernel
                    module makes it unloadable
           Product: buildroot
           Version: 2014.02
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: jpcartal at free.fr
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


Hello,

I'm currently working on a project that needs using external kernel modules.
I added a dedicated package for those to be built and installed.
However I made a mistake in the INSTALL_TARGET_CMDS rule since I asked for
those modules to be installed with 0755 access rights in the
$(TARGET_DIR)/lib/modules/$(KERNEL_RELEASE)/kernel/drivers/net/wireless/
directory.

Using the access rights above have the unexpected consequence that those
modules are stripped using the following command: 
$(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true i.e. 
find buildroot/output/target -type f \( -perm /111 -o -name '*.so*' \) -not \(
-name 'libpthread*.so*' \) -print | xargs
buildroot/output/host/usr/bin/mipsel-buildroot-linux-uclibc-strip
--remove-section=.comment --remove-section=.note 2>/dev/null || true
Thus leading to stripped kernel modules that can not be loaded.

Changing the install access rights to 0664 make the correct strip command to be
used :
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
        xargs -r $(KSTRIPCMD);fi

And the modules can then be loaded normally.

While I understand this is a mistake on my side and I found it quite hard to
track the root of the issue, it might be usefull to either :
* Change the $(STRIP_FIND_CMD) to not take into account kernel modules
* Yield an error or a warning during the make process
* Document this behaviour

Regards.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

             reply	other threads:[~2014-03-27  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27  9:01 bugzilla at busybox.net [this message]
2014-04-29 18:57 ` [Buildroot] [Bug 6992] Incorrect installation rights on external kernel module makes it unloadable bugzilla at busybox.net
2014-05-07 13:09 ` bugzilla at busybox.net

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=bug-6992-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.