OK, I'm gradually understand that problem a little more.
When I looked into the kernel configuration file from the /boot
directory "config-4.14.14-200.spi_gpio.fc26.x86_64&"
I saw that none of the configuration changes I made by
make xconfig
is there, in fact that configuration file is identical
(except kernel name string inside) to the file
~/rpmbuild/BUILD/kernel-4.14.fc26/linux-4.14.14-200.spi_gpio.fc26.x86_64/configs/kernel-4.14.14-x86_64.config
So now I see that the kernel compilation instructions I've red at:
https://fedoraproject.org/wiki/Building_a_custom_kernel/Source_RPM
missed something which caused the original configuration to be used instead
of the one I changed. The instructions there from configuring to compiling are:
Code:
For a graphical UI, instead run:
make xconfig
Add a new line to the top of the config file that contains the hardware platform the kernel is built for (the output of uname -i). The line is preceded by a # sign. For example, an x86_64 machine would have the following line added to the top of the config file:
# x86_64
Copy the config file to ~/rpmbuild/SOURCES/:
cp .config ~/rpmbuild/SOURCES/config-`uname -m`-generic
Prepare Build Files
This step makes the necessary changes to the kernel.spec file. This step is required for building a custom kernel.
1. Change to the ~/rpmbuild/SPECS directory:
$ cd ~/rpmbuild/SPECS
2. Open the kernel.spec file for editing.
3. Give the kernel a unique name. This is important to ensure the custom kernel is not confused with any released kernel. Add a unique string to the kernel name by changing the 'buildid' line. Optionally, change ".local" to your initials, a bug number, the date or any other unique string.
Change this line: # define buildid .local
To this (note the extra space is removed in addition to the pound sign): %define buildid .<custom_text>
4. If you generated a patch, add the patch to the kernel.spec file, preferably at the end of all the existing patches and clearly commented.
# cputime accounting is broken, revert to 2.6.22 version
Patch2220: linux-2.6-cputime-fix-accounting.patch
Patch9999: linux-2.6-samfw-test.patch
Build the New Kernel
This step actually generates the kernel RPM files. This step is required for building a custom kernel.
Use the rpmbuild utility to build the new kernel:
Ensure /usr/sbin is in your path (to pull in /usr/sbin/modinfo):
$ export PATH=/usr/sbin:$PATH
To build all kernel flavors:
$ rpmbuild -bb --target=`uname -m` kernel.spec
When I opened the kernel.spec file I didn't find there any "generic" string and when searching for many
appearances of "config" it looks like the used configuration is one of the files from the "configs"
directory and it looks like the `uname -m` version of the config is used.
So it looks like I need to copy the newly changed (with "make xconfig") configuration
file to the "~/rpmbuild/SOURCES" directory but with some other name than
config-`uname -m`-generic
After some searching I found at "https://bugzilla.redhat.com/show_bug.cgi?id=757135"
two copies were mentioned:
Code:
$ cp .config ~/rpmbuild/SOURCES/config-`uname -m`
$ cp .config ~/rpmbuild/SOURCES/config-`uname -m`-generic
or I just should write only the changed configurations into
~/rpmbuild/SOURCES/config-local
?
I'll start reading the "kernel.spec" again in hope to figure out
what configuration file name it expects, if meanwhile someone
can give me that name it'll save me time (and mistakes
from reading a file without knowing what processes it and how).
TIA,
kaza.