# Build SUSE kernel doesn't need "make modules"?

**URL:** <https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499>\
**Category:** SLES Install-Boot\
**Created:** [October 7, 2015, 2:12pm UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499 "2015-10-07T14:12:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanxiao](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nanxiao](https://forums.suse.com/u/nanxiao)\
**Post date:** [October 7, 2015, 2:12pm UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499/1 "2015-10-07T14:12:08Z")

</div>

From README.SUSE, I can see the following instructions to compile the kernel:

(1) Install kernel-source.$ARCH.rpm. Change to the /usr/src/linux  
directory.

(2) Create a build directory for use in configuring and building  
the kernel. Using /usr/src/linux directly requires root priviledges  
and will cause problems if you need to build kernel modules for  
other installed kernels.

(2) Configure the kernel (for example, `make -C /usr/src/linux O=$(pwd) oldconfig'' or `make -C /usr/src/linux O=$(pwd) cloneconfig’’,  
see HOW TO CONFIGURE THE KERNEL SOURCES).

(3) Build the kernel and all its modules (``make’’).

(5) Make sure that /etc/modprobe.d/unsupported-modules contains

```
       allow_unsupported_modules 1

   otherwise modprobe will refuse to load any modules.

```

(6) Install the kernel and the modules (`make modules_install'', followed by `make install’’). This will automatically create  
an initrd for the new kernel as well (see ``mkinitrd -h’’).

(7) Add the kernel to the boot manager. When using lilo, run ``lilo’’  
to update the boot map.

But I can’t see “make modules” command. Doesn’t building SUSE kernel need “make modules”?

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [October 7, 2015, 3:44pm UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499/2 "2015-10-07T15:44:13Z")

</div>

> [@](#):
>
> On Wed 07 Oct 2015 11:14:01 AM CDT, nanxiao wrote:
> 
> From README.SUSE, I can see the following instructions to compile the  
> kernel:
> 
> (1) Install kernel-source.$ARCH.rpm. Change to the /usr/src/linux  
> directory.
> 
> (2) Create a build directory for use in configuring and building  
> the kernel. Using /usr/src/linux directly requires root  
> priviledges  
> and will cause problems if you need to build kernel modules for  
> other installed kernels.
> 
> (2) Configure the kernel (for example, `make -C /usr/src/linux O=$(pwd) oldconfig'' or `make -C /usr/src/linux O=$(pwd)  
> cloneconfig’',  
> see HOW TO CONFIGURE THE KERNEL SOURCES).
> 
> (3) Build the kernel and all its modules (``make’').
> 
> (5) Make sure that /etc/modprobe.d/unsupported-modules contains
> 
> allow\_unsupported\_modules 1
> 
> otherwise modprobe will refuse to load any modules.
> 
> (6) Install the kernel and the modules (`make modules_install'', followed by `make install’‘). This will automatically create  
> an initrd for the new kernel as well (see ``mkinitrd -h’').
> 
> (7) Add the kernel to the boot manager. When using lilo, run  
> ``lilo’’  
> to update the boot map.
> 
> But I can’t see “make modules” command. Doesn’t building SUSE kernel  
> need “make modules”?

Hi  
It should build all the relevant (as in Y set) modules automatically  
via copying the config file to PWD via the following command;

```auto
zcat /proc/config.gz >.config
```

Or are you trying to build a specific module not in the default kernel  
(as in a kmp)?

–  
Cheers Malcolm Â°Â¿Â° LFCS, SUSE Knowledge Partner (Linux Counter #276890)  
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.44-52.18-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![nanxiao](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nanxiao](https://forums.suse.com/u/nanxiao)\
**Post date:** [October 8, 2015, 11:50am UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499/3 "2015-10-08T11:50:43Z")

</div>

Hi malcolmlewis,

Firstly, thanks very much for your response!

I am a little confused, is “make modules” optional in building kernel?  
No “make modules” command, we can also execute “make modules\_install”  
command?

Thanks very much!

Best Regards  
Nan Xiao

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [October 9, 2015, 5:01am UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499/4 "2015-10-09T05:01:00Z")

</div>

> [@](#):
>
> On Thu 08 Oct 2015 08:54:02 AM CDT, nanxiao wrote:
> 
> Hi malcolmlewis,
> 
> Firstly, thanks very much for your response!
> 
> I am a little confused, is “make modules” optional in building kernel?  
> No “make modules” command, we can also execute “make modules\_install”  
> command?
> 
> Thanks very much!
> 
> Best Regards  
> Nan Xiao

Hi  
AFAIK if just building a kernel module by itself you need to run make  
modules and make modules\_install but if rebuilding the whole kernel it  
should be taken care off.

What are you trying to build, a missing module you need? If so it’s  
better to just build that module and install rather than the whole  
kernel.

–  
Cheers Malcolm Â°Â¿Â° LFCS, SUSE Knowledge Partner (Linux Counter #276890)  
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.44-52.18-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![nanxiao](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nanxiao](https://forums.suse.com/u/nanxiao)\
**Post date:** [October 10, 2015, 8:39am UTC](https://forums.suse.com/t/build-suse-kernel-doesnt-need-make-modules/27499/5 "2015-10-10T08:39:19Z")

</div>

Hi

I just want to make sure whether “make” includes “make modules”. After posting the  
issue on [SO](http://stackoverflow.com/questions/33029390/is-it-meaningful-to-execute-make-modules-install-without-executing-make-modul),  
I get the answer: that is yes!

Thanks very much for your kind help!

Best Regards  
Nan Xiao
