All of lore.kernel.org
 help / color / mirror / Atom feed
* Can add new module without upgrade the kernel?
@ 2015-03-30  6:05 Woody Wu
  2015-03-30  7:34 ` Adam Lee
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2015-03-30  6:05 UTC (permalink / raw)
  To: kernelnewbies

Sorry, I did not write a subject.

On Monday, 30 March 2015, Woody Wu <narkewoody@gmail.com> wrote:

> Hi,
>
> I have a kernel already run on production, but I then realized that I need
> to add one or two driver to it.  But I hope I can avoid to upgrade the
> kernel image for those already running products, I hope I can only extend
> the kernel by add the driver modules to the root file system. Is that
> possible? The current kernel has already compiled with the loadable modules
> options, but for the drivers that I want now the old config is 'no'.
>
> Thanks in advance.
> -woody
>
>
> --
> Sent from Gmail Mobile
>


-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150330/9495c77c/attachment.html 

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

* Can add new module without upgrade the kernel?
  2015-03-30  6:05 Can add new module without upgrade the kernel? Woody Wu
@ 2015-03-30  7:34 ` Adam Lee
  2015-03-30  9:35   ` Woody Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Lee @ 2015-03-30  7:34 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 30, 2015 at 02:05:33PM +0800, Woody Wu wrote:
> Sorry, I did not write a subject.
> 
> On Monday, 30 March 2015, Woody Wu <narkewoody@gmail.com> wrote:
> 
>     Hi,
> 
>     I have a kernel already run on production, but I then realized that I need
>     to add one or two driver to it.? But I hope I can avoid to upgrade the
>     kernel image for those already running products, I hope I can only extend
>     the kernel by add the driver modules to the root file system. Is that
>     possible? The current kernel has already compiled with the loadable modules
>     options, but for the drivers that I want now the old config is 'no'.
> 
>     Thanks in advance.
>     -woody?
> 
>     --
>     Sent from Gmail Mobile
> 
> --
> Sent from Gmail Mobile

Sure you can, just compile them as "M" then install into your rootfs, or
compile them as external modules.

ref:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt

-- 
Adam Lee
http://adam8157.info

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

* Can add new module without upgrade the kernel?
  2015-03-30  7:34 ` Adam Lee
@ 2015-03-30  9:35   ` Woody Wu
  2015-03-30  9:45     ` Adam Lee
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2015-03-30  9:35 UTC (permalink / raw)
  To: kernelnewbies

On Monday, 30 March 2015, Adam Lee <adam8157@gmail.com> wrote:

> On Mon, Mar 30, 2015 at 02:05:33PM +0800, Woody Wu wrote:
> > Sorry, I did not write a subject.
> >
> > On Monday, 30 March 2015, Woody Wu <narkewoody@gmail.com <javascript:;>>
> wrote:
> >
> >     Hi,
> >
> >     I have a kernel already run on production, but I then realized that
> I need
> >     to add one or two driver to it.  But I hope I can avoid to upgrade
> the
> >     kernel image for those already running products, I hope I can only
> extend
> >     the kernel by add the driver modules to the root file system. Is that
> >     possible? The current kernel has already compiled with the loadable
> modules
> >     options, but for the drivers that I want now the old config is 'no'.
> >
> >     Thanks in advance.
> >     -woody
> >
> >     --
> >     Sent from Gmail Mobile
> >
> > --
> > Sent from Gmail Mobile
>
> Sure you can, just compile them as "M" then install into your rootfs, or
> compile them as external modules.
>
> ref:
> https://www.kernel.org/doc/Documentation/kbuild/modules.txt
>
> --
> Adam Lee
> http://adam8157.info
>

Thanks and glad to know that.  Just be curious, it means, in kernel
building, select a driver as M or as EMPTY will put no influence on the
resulted kernel image at all, is it right?  Previously, I always thought,
when I choice a driver as module, I was not only creating a module itself,
but also force the kernel create some kind of a stub in it's image. Now it
seems my thoughts is wrong.



-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150330/47f143be/attachment.html 

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

* Can add new module without upgrade the kernel?
  2015-03-30  9:35   ` Woody Wu
@ 2015-03-30  9:45     ` Adam Lee
  2015-03-30 12:23       ` Woody Wu
  2015-03-30 14:58       ` Woody Wu
  0 siblings, 2 replies; 11+ messages in thread
From: Adam Lee @ 2015-03-30  9:45 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 30, 2015 at 05:35:23PM +0800, Woody Wu wrote:
> Thanks and glad to know that.? Just be curious, it means, in kernel building,
> select a driver as M or as EMPTY will put no influence on the resulted kernel
> image at all, is it right?

Not right if that driver depends on some other things.

> Previously, I always thought, when I choice a
> driver as module, I was not only creating a module itself, but also force the
> kernel create some kind of a stub in it's image. Now it seems my thoughts is
> wrong.

You were right at the most of times, but it could be inserted at the most
of times too, not that picky. Also you still could extract its
dependencies(if there are) out and compile them as external modules.

-- 
Adam Lee
http://adam8157.info

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

* Can add new module without upgrade the kernel?
  2015-03-30  9:45     ` Adam Lee
@ 2015-03-30 12:23       ` Woody Wu
  2015-03-30 14:58       ` Woody Wu
  1 sibling, 0 replies; 11+ messages in thread
From: Woody Wu @ 2015-03-30 12:23 UTC (permalink / raw)
  To: kernelnewbies

On Monday, 30 March 2015, Adam Lee <adam8157@gmail.com> wrote:

> On Mon, Mar 30, 2015 at 05:35:23PM +0800, Woody Wu wrote:
> > Thanks and glad to know that.  Just be curious, it means, in kernel
> building,
> > select a driver as M or as EMPTY will put no influence on the resulted
> kernel
> > image at all, is it right?
>
> Not right if that driver depends on some other things.


Assume I had check the dependency and build all the modules that a module
is depend.


>
> > Previously, I always thought, when I choice a
> > driver as module, I was not only creating a module itself, but also
> force the
> > kernel create some kind of a stub in it's image. Now it seems my
> thoughts is
> > wrong.
>
> You were right at the most of times, but it could be inserted at the most
> of times too, not that picky.


Understood, it's really good news.


>
> Also you still could extract its
> dependencies(if there are) out and compile them as external modules.


For this part I dont get what exactly it mean.


>
> --
> Adam Lee
> http://adam8157.info
>


-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150330/6a187acd/attachment.html 

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

* Can add new module without upgrade the kernel?
  2015-03-30  9:45     ` Adam Lee
  2015-03-30 12:23       ` Woody Wu
@ 2015-03-30 14:58       ` Woody Wu
  2015-03-30 15:17         ` Greg KH
                           ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Woody Wu @ 2015-03-30 14:58 UTC (permalink / raw)
  To: kernelnewbies

Unfortunately I failed in 'modprobe'.

FFC3 3.1.0-ffc3mb-00050-g5874787 # pwd
/lib/modules/3.1.0-ffc3mb-00050-g5874787
FFC3 3.1.0-ffc3mb-00050-g5874787 # modprobe tun
modprobe: can't load module tun (net/tun.ko): invalid module format

FFC3 3.1.0-ffc3mb-00050-g5874787 # modinfo net/tun.ko
filename:       net/tun.ko
license:        GPL
author:         (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
description:    Universal TUN/TAP device driver
alias:          devname:net/tun
depends:
vermagic:       3.1.0-ffc3mb-00050-g5874787
-ffc3mb-00055-g4c6394f-dirty mod_unload ARMv5

Can you help to give a clue?  Thanks in advance!

-woody


On 30 March 2015 at 17:45, Adam Lee <adam8157@gmail.com> wrote:
> On Mon, Mar 30, 2015 at 05:35:23PM +0800, Woody Wu wrote:
>> Thanks and glad to know that.  Just be curious, it means, in kernel building,
>> select a driver as M or as EMPTY will put no influence on the resulted kernel
>> image at all, is it right?
>
> Not right if that driver depends on some other things.
>
>> Previously, I always thought, when I choice a
>> driver as module, I was not only creating a module itself, but also force the
>> kernel create some kind of a stub in it's image. Now it seems my thoughts is
>> wrong.
>
> You were right at the most of times, but it could be inserted at the most
> of times too, not that picky. Also you still could extract its
> dependencies(if there are) out and compile them as external modules.
>
> --
> Adam Lee
> http://adam8157.info



-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com)

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

* Can add new module without upgrade the kernel?
  2015-03-30 14:58       ` Woody Wu
@ 2015-03-30 15:17         ` Greg KH
  2015-03-31  2:47           ` Woody Wu
  2015-03-30 16:29         ` Sudip Mukherjee
  2015-03-30 17:18         ` Valdis.Kletnieks at vt.edu
  2 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2015-03-30 15:17 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 30, 2015 at 10:58:12PM +0800, Woody Wu wrote:
> Unfortunately I failed in 'modprobe'.
> 
> FFC3 3.1.0-ffc3mb-00050-g5874787 # pwd
> /lib/modules/3.1.0-ffc3mb-00050-g5874787
> FFC3 3.1.0-ffc3mb-00050-g5874787 # modprobe tun
> modprobe: can't load module tun (net/tun.ko): invalid module format
> 
> FFC3 3.1.0-ffc3mb-00050-g5874787 # modinfo net/tun.ko
> filename:       net/tun.ko
> license:        GPL
> author:         (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
> description:    Universal TUN/TAP device driver
> alias:          devname:net/tun
> depends:
> vermagic:       3.1.0-ffc3mb-00050-g5874787
> -ffc3mb-00055-g4c6394f-dirty mod_unload ARMv5
> 
> Can you help to give a clue?  Thanks in advance!

Please work with the vendor that is forcing you to use such an old and
obsolete kernel version, they are the only ones that can help you out
here.

Also look in your kernel log, it will show errors when loading modules
as to what went wrong.

good luck,

greg k-h

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

* Can add new module without upgrade the kernel?
  2015-03-30 14:58       ` Woody Wu
  2015-03-30 15:17         ` Greg KH
@ 2015-03-30 16:29         ` Sudip Mukherjee
  2015-03-30 17:18         ` Valdis.Kletnieks at vt.edu
  2 siblings, 0 replies; 11+ messages in thread
From: Sudip Mukherjee @ 2015-03-30 16:29 UTC (permalink / raw)
  To: kernelnewbies

>
> Can you help to give a clue?  Thanks in advance!

What is the output of uname -a
And also the output of dmesg after  modprobe fails.

Regards
Sudip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150330/11b1238f/attachment.html 

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

* Can add new module without upgrade the kernel?
  2015-03-30 14:58       ` Woody Wu
  2015-03-30 15:17         ` Greg KH
  2015-03-30 16:29         ` Sudip Mukherjee
@ 2015-03-30 17:18         ` Valdis.Kletnieks at vt.edu
  2015-03-31  2:50           ` Woody Wu
  2 siblings, 1 reply; 11+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2015-03-30 17:18 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 30 Mar 2015 22:58:12 +0800, Woody Wu said:

> FFC3 3.1.0-ffc3mb-00050-g5874787 # pwd

Wow.  Git bisect gone incredibly wrong?  How did you end up running *that*
kernel?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150330/8fa1b3ac/attachment.bin 

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

* Can add new module without upgrade the kernel?
  2015-03-30 15:17         ` Greg KH
@ 2015-03-31  2:47           ` Woody Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Woody Wu @ 2015-03-31  2:47 UTC (permalink / raw)
  To: kernelnewbies

On 30 March 2015 at 23:17, Greg KH <greg@kroah.com> wrote:
> On Mon, Mar 30, 2015 at 10:58:12PM +0800, Woody Wu wrote:
>> Unfortunately I failed in 'modprobe'.
>>
>> FFC3 3.1.0-ffc3mb-00050-g5874787 # pwd
>> /lib/modules/3.1.0-ffc3mb-00050-g5874787
>> FFC3 3.1.0-ffc3mb-00050-g5874787 # modprobe tun
>> modprobe: can't load module tun (net/tun.ko): invalid module format
>>
>> FFC3 3.1.0-ffc3mb-00050-g5874787 # modinfo net/tun.ko
>> filename:       net/tun.ko
>> license:        GPL
>> author:         (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
>> description:    Universal TUN/TAP device driver
>> alias:          devname:net/tun
>> depends:
>> vermagic:       3.1.0-ffc3mb-00050-g5874787
>> -ffc3mb-00055-g4c6394f-dirty mod_unload ARMv5
>>
>> Can you help to give a clue?  Thanks in advance!
>
> Please work with the vendor that is forcing you to use such an old and
> obsolete kernel version, they are the only ones that can help you out
> here.

I was the vendor :(   I ported the kernel 2 years ago for my embedded device.

>
> Also look in your kernel log, it will show errors when loading modules
> as to what went wrong.
>
> good luck,
>
> greg k-h



-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com)

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

* Can add new module without upgrade the kernel?
  2015-03-30 17:18         ` Valdis.Kletnieks at vt.edu
@ 2015-03-31  2:50           ` Woody Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Woody Wu @ 2015-03-31  2:50 UTC (permalink / raw)
  To: kernelnewbies

On 31 March 2015 at 01:18,  <Valdis.Kletnieks@vt.edu> wrote:
> On Mon, 30 Mar 2015 22:58:12 +0800, Woody Wu said:
>
>> FFC3 3.1.0-ffc3mb-00050-g5874787 # pwd
>
> Wow.  Git bisect gone incredibly wrong?  How did you end up running *that*
> kernel?


Hi, Guys

I found out the problem, it's my fault.  My change of the
scripts/setlocalversion has a bug, that messed up the version-magic of
the resulted modules and the version-magic has incorrect format, so
modprobe refuse to load them.  Now it's fixed.  Thanks!


-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com)

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

end of thread, other threads:[~2015-03-31  2:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30  6:05 Can add new module without upgrade the kernel? Woody Wu
2015-03-30  7:34 ` Adam Lee
2015-03-30  9:35   ` Woody Wu
2015-03-30  9:45     ` Adam Lee
2015-03-30 12:23       ` Woody Wu
2015-03-30 14:58       ` Woody Wu
2015-03-30 15:17         ` Greg KH
2015-03-31  2:47           ` Woody Wu
2015-03-30 16:29         ` Sudip Mukherjee
2015-03-30 17:18         ` Valdis.Kletnieks at vt.edu
2015-03-31  2:50           ` Woody Wu

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.