You are not logged in.

#26 2014-09-11 17:52:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Building first custom kernel

Using a PKGBUILD is definitely the way to go.

I have automated the process using this script and these files. Feel free to adapt for the patches you want.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#27 2014-09-11 19:02:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: Building first custom kernel

stevenhoneyman wrote:
klenamenis wrote:

It has probably something to do with the -march=native flag for cpu specific optimization. These are my custom CFLAGS I actually use:

CFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="${CFLAGS}"

Does these parameters actually interfer with the applied GCC patch?

The linux kernel build scripts don't use environment CFLAGS, it uses its own internal KCFLAGS
Flags that matter can be configured in .config - processor, optimization (-O2,-Os), and stack protection

Correct.  If you want to customize the build for your specific architecture, apply my kernel_gcc_patch which will allow you select more gcc supported options where stevenh told you about.

FYI - I use the same CFLAGS in my /etc/makepkg.conf and have not experienced any problems.

Offline

#28 2014-09-11 22:08:12

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

graysky wrote:

If you want to customize the build for your specific architecture, apply my kernel_gcc_patch

I'm curious if you've ever benchmarked a stock Core2 optimized build against the same config, but with your patch and march=<your cpu> selected?
The graphs on github show generic vs optimized, which yes, definitely a difference

...but anything that can take advantage of SSE4.{1,2}, AVX{,2}, or AES, it looks like there's already a specific setting for
for example see options:

CONFIG_CRYPTO_AES_NI_INTEL
Use Intel AES-NI instructions for AES algorithm.

or

CONFIG_CRYPTO_SHA512_SSSE3
SHA-512 secure hash standard (DFIPS 180-2) implemented using 
Supplemental SSE3 (SSSE3) instructions, or Advanced Vector 
Extensions version 1 (AVX1), or Advanced Vector Extensions 
version 2 (AVX2) instructions, when available.

Last edited by stevenhoneyman (2014-09-11 22:09:48)

Offline

#29 2014-09-12 02:54:56

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

graysky wrote:

If you want to customize the build for your specific architecture, apply my kernel_gcc_patch which will allow you select more gcc supported options where stevenh told you about.

FYI - I use the same CFLAGS in my /etc/makepkg.conf and have not experienced any problems.

That's what I'm actually doing, but I messed up something at the beginning, which caused all this "trouble". Now everything's clear, thanks to this thread smile

Offline

#30 2014-09-13 14:19:51

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

Ok, it seems that when using the custom kernel the "old" network device name scheme (eth0) gets applied, although the stock kernel runs the the new one (enp0s20) and I configured some programs for it. Is there some option in the kernel config for it?

Furthermore, is it possible to only run xconfig/menuconfig for just editing the config file? I'd really like to adjust some settings without running makepkg over again.

Offline

#31 2014-09-13 14:29:29

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

klenamenis wrote:

Ok, it seems that when using the custom kernel the "old" network device name scheme (eth0) gets applied, although the stock kernel runs the the new one (enp0s20) and I configured some programs for it. Is there some option in the kernel config for it?

That's a systemd "feature" - check in /usr/lib/udev/rules.d/ for 80-net-setup-link.rules

klenamenis wrote:

Furthermore, is it possible to only run xconfig/menuconfig for just editing the config file? I'd really like to adjust some settings without running makepkg over again.

Just by compiling the kernel the original way, without involving makepkg

Last edited by stevenhoneyman (2014-09-13 14:30:06)

Offline

#32 2014-09-13 23:07:37

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: Building first custom kernel

I've been playing around with kernels for the past few days and found the Linux Kernel in a Nutshell helpful.
http://www.kroah.com/lkn/

Offline

#33 2014-09-15 18:00:00

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

I solved the naming scheme problem just by setting the kernel's boot parameter net.ifnames=1.

Offline

#34 2014-09-19 17:49:01

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

Hey,

in order to use VirtualBox, according to the wiki, I just replaced the package virtualbox-host-modules by virtualbox-host-dkms and got the following error when building the modules:

[klemens@arch-pc ~]$ sudo dkms install vboxhost/$(pacman -Q virtualbox|awk {'print $2'}|sed 's/\-.\+//') -k $(uname -rm|sed 's/\ /\//')
[sudo] password for klemens: 

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.16.3-1-ck2-custom -C /usr/lib/modules/3.16.3-1-ck2-custom/build M=/var/lib/dkms/vboxhost/4.3.16/build.........(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.16.3-1-ck2-custom (x86_64)
Consult /var/lib/dkms/vboxhost/4.3.16/build/make.log for more information.

The corresponding make.log:

DKMS make.log for vboxhost-4.3.16 for kernel 3.16.3-1-ck2-custom (x86_64)
Fri Sep 19 19:44:41 CEST 2014
make: Entering directory '/usr/lib/modules/3.16.3-1-ck2-custom/build'
  LD      /var/lib/dkms/vboxhost/4.3.16/build/built-in.o
  LD      /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/memuserkernel-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/mp-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/mpnotification-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/process-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/semevent-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/semeventmulti-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/semfastmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/semmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/spinlock-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/thread-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/thread2-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/threadctxhooks-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/time-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/timer-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/generic/semspinmutex-r0drv-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/alloc/alloc.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/checksum/crc32.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/checksum/ipv4.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/checksum/ipv6.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/err/RTErrConvertFromErrno.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/err/RTErrConvertToErrno.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/log.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/logellipsis.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/logrel.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/logrelellipsis.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/logcom.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/log/logformat.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg1Weak.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2Add.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2AddWeak.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2AddWeakV.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2Weak.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/RTAssertMsg2WeakV.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/assert.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/handletable.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/handletablectx.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/misc/thread.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/RTStrCopy.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/RTStrCopyEx.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/RTStrCopyP.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/RTStrNCmp.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/RTStrNLen.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/stringalloc.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/strformat.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/strformatrt.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/strformattype.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/strprintf.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/string/strtonum.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/table/avlpv.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/time/time.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/r0drv/linux/RTLogWriteDebugger-r0drv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTAssertShouldPanic-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTLogWriteStdErr-stub-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTLogWriteStdOut-stub-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTLogWriteUser-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTMpGetArraySize-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTMpGetCoreCount-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTSemEventWait-2-ex-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTSemEventWaitNoResume-2-ex-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTSemEventMultiWait-2-ex-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTSemEventMultiWaitNoResume-2-ex-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/RTTimerCreate-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/errvars-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/mppresent-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/generic/uuid-generic.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/VBox/log-vbox.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/common/alloc/heapsimple.o
  LD [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxdrv/vboxdrv.o
  LD      /var/lib/dkms/vboxhost/4.3.16/build/vboxnetadp/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetadp/linux/VBoxNetAdp-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetadp/VBoxNetAdp.o
  LD [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetadp/vboxnetadp.o
  LD      /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
  LD [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxnetflt/vboxnetflt.o
  LD      /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/linux/VBoxPci-linux.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/VBoxPci.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/linux/SUPR0IdcClient-linux.o
  LD [M]  /var/lib/dkms/vboxhost/4.3.16/build/vboxpci/vboxpci.o
  Building modules, stage 2.
  MODPOST 4 modules
FATAL: vmlinux has no symtab?
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1340: recipe for target 'modules' failed
make: *** [modules] Error 2
make: Leaving directory '/usr/lib/modules/3.16.3-1-ck2-custom/build'

Can somebody give me a hint? I guess it's some wrong kernel configuration, but which one? Any help would be appreciated!

Last edited by klenamenis (2014-09-19 17:50:41)

Offline

#35 2014-09-19 19:31:28

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

Can you see if the output of:

$ file /usr/lib/modules/3.16.3-1-ck2-custom/build/vmlinux 

ends with "stripped" or "not stripped"?

Offline

#36 2014-09-19 21:18:41

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

stevenhoneyman wrote:

Can you see if the output of:

$ file /usr/lib/modules/3.16.3-1-ck2-custom/build/vmlinux 

ends with "stripped" or "not stripped"?

Stripped. Does that mean I need to change the PKGBUILD option "strip" to "!strip"?

Last edited by klenamenis (2014-09-19 21:18:53)

Offline

#37 2014-09-19 22:38:56

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

klenamenis wrote:
stevenhoneyman wrote:

Can you see if the output of:

$ file /usr/lib/modules/3.16.3-1-ck2-custom/build/vmlinux 

ends with "stripped" or "not stripped"?

Stripped. Does that mean I need to change the PKGBUILD option "strip" to "!strip"?

!strip

It needs the symbols in vmlinux to be able to compile new modules, and strip removes them tongue
You can still strip all of the modules if you want, but vmlinux needs to be kept unstripped

Offline

#38 2014-09-22 22:56:54

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

stevenhoneyman wrote:

!strip

It needs the symbols in vmlinux to be able to compile new modules, and strip removes them tongue
You can still strip all of the modules if you want, but vmlinux needs to be kept unstripped

Thanks, dkms built everything fine. When I try to load the module, this occurs:

[klemens@arch-pc ~]$ sudo modprobe vboxdrv                                                                                             
[sudo] password for klemens: 
modprobe: ERROR: could not insert 'vboxdrv': Exec format error

Offline

#39 2014-09-22 23:04:21

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

Try adding --verbose and see if it's trying to use the wrong version

Offline

#40 2014-09-22 23:56:24

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

stevenhoneyman wrote:

Try adding --verbose and see if it's trying to use the wrong version

Sadly not.

[klemens@arch-pc ~]$ sudo modprobe --verbose vboxdrv
[sudo] password for klemens: 
insmod /lib/modules/3.16.3-1-ck2-custom/kernel/misc/vboxdrv.ko 
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
[klemens@arch-pc ~]$ uname -r
3.16.3-1-ck2-custom

Last edited by klenamenis (2014-09-22 23:58:50)

Offline

#41 2014-09-23 00:31:07

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Building first custom kernel

hmmmm... maybe a silly question, but is the "build" symlink pointing to the right source dir?

ls -l /lib/modules/$(uname -r)/build

Did you try it without dkms? I only ever used that about 4 years ago for a laptop backlight module, doubt I can be much help here sad

Search could be tongue https://bbs.archlinux.org/viewtopic.php?id=184917 seems a common issue

Last edited by stevenhoneyman (2014-09-23 00:33:16)

Offline

#42 2014-09-23 01:17:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,665

Re: Building first custom kernel

modprobe: ERROR: could not insert 'vboxdrv': Exec format error

That looks like you are trying to load a 32 bit driver on a 64 but system, or vice versa.   
Remember, just because you might have a 64 bit host, the guest can still be a 32 VM.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#43 2014-09-23 03:32:58

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

Well... I just reinstalled virtualbox-host-dkms and rerun dkms install and everything is working now. I don't know why...

Last edited by klenamenis (2014-09-23 03:36:02)

Offline

#44 2015-01-09 03:24:25

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

Didn't want to open a new thread:

Why does the linux-libre kernel replace the stock one and cannot be installed besides it like my custom kernel?

Offline

#45 2015-01-09 03:45:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,665

Re: Building first custom kernel

In your kernel configuration, did you change the name of your kernel ?
How are you installing the kernel?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#46 2015-01-09 04:11:09

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

This is rather a question unrelated to my custom kernel, but I changed it to linux-custom.

pacaur -S linux-libre

wants to replace linux, linux-firmware and also binutils, etc. and I ask why.

Offline

#47 2015-01-09 04:20:18

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Building first custom kernel

Check the "provides=" line in the PKGBUILD.

Offline

#48 2015-01-09 04:33:52

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

PKGBUILD

[...]
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
_replacesoldkernels=('kernel26%' 'kernel26-libre%') # '%' gets replaced with _kernelname
_replacesoldmodules=('linux-libre%-kmod-alx') # '%' gets replaced with _kernelname
[...]
provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}")
conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
[...]

I know I could just replace or delete this in order to keep my stock linux kernel installed, but the question actually is: Why do these lines even exist, why is the stock one intended to be replaced at all?

Offline

#49 2015-01-09 05:03:38

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Building first custom kernel

why is the stock one intended to be replaced at all?

There's no other reason to install linux-libre. It provides nothing new, and the only reason to install it is because one dislikes the stock kernel for ideological reasons.

Offline

#50 2015-01-09 05:17:29

klenamenis
Member
Registered: 2014-07-03
Posts: 101

Re: Building first custom kernel

ANOKNUSA wrote:

why is the stock one intended to be replaced at all?

There's no other reason to install linux-libre. It provides nothing new, and the only reason to install it is because one dislikes the stock kernel for ideological reasons.

Thanks for your opinion, my technical question however remains unanswered. Do mean, it's no problem to change the PKGBUILD?

Last edited by klenamenis (2015-01-09 05:20:30)

Offline

Board footer

Powered by FluxBB