* [gentoo-user] kernel config strangeness
@ 2019-07-31 22:31 Jack
2019-08-01 8:26 ` Mick
2019-08-02 2:05 ` Adam Carter
0 siblings, 2 replies; 7+ messages in thread
From: Jack @ 2019-07-31 22:31 UTC (permalink / raw
To: gentoo-user
I just built a new PC, and I'm having a problem getting it to boot with
a custom configured kernel (gentoo-sources-5.2.4.) If I start with a
blank config and work through "make xconfig" the resulting kernel and
initramfs (genkernel) doesn't boot (just hangs after loading
initramfs.) So, starting with the config from the running kernel from
the live install medium, running make oldconfig then genkernel, it
boots fine. I assume my problem is removing something important while
trying to remove all the unnecessary options for supporting hardware
I'll never use.
However, if I start with the .config which workd, and "make xconfig"
and select "Supported processor types" under "Processor type and
features" and then unselect "Support Intel Pprocessors" (I have a
Ryzen) and save the config, it decreases the size of .config from 169K
to under 13K, losing almost every setting in the file.
Even stranger, if I look at "Local version - append to kernel release:"
it still shows the value I had previously set - but that setting
CONFIG_LOCALVERSION is NOT in .config. If I close the tool and start
it again, that setting is now missing and it looks like all settings
have been reset to the clean starting defaults (i.e., many say "(NEW)"
Am I missing something here, or might this really be a bug in "make
xconfig" ?
Can anyone else replicate this? While I don't think it's related to my
problem getting a non-booting kernel, it certainly has me confused.
Thanks for helping me confirm what's left of my sanity.
Jack
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] kernel config strangeness
2019-07-31 22:31 [gentoo-user] kernel config strangeness Jack
@ 2019-08-01 8:26 ` Mick
2019-08-02 2:05 ` Adam Carter
1 sibling, 0 replies; 7+ messages in thread
From: Mick @ 2019-08-01 8:26 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3211 bytes --]
On Wednesday, 31 July 2019 23:31:20 BST Jack wrote:
> I just built a new PC, and I'm having a problem getting it to boot with
> a custom configured kernel (gentoo-sources-5.2.4.) If I start with a
> blank config and work through "make xconfig" the resulting kernel and
> initramfs (genkernel) doesn't boot (just hangs after loading
> initramfs.)
Does it spit out any errors on the console?
> So, starting with the config from the running kernel from
> the live install medium, running make oldconfig then genkernel, it
> boots fine. I assume my problem is removing something important while
> trying to remove all the unnecessary options for supporting hardware
> I'll never use.
>
> However, if I start with the .config which workd, and "make xconfig"
> and select "Supported processor types" under "Processor type and
> features" and then unselect "Support Intel Pprocessors" (I have a
> Ryzen) and save the config, it decreases the size of .config from 169K
> to under 13K, losing almost every setting in the file.
Hmm ... this sound too light for a desktop kernel. I have done the same,
stripping out anything not relevant or wanted on my laptop's AMD kernel and
this is what I get:
$ ls -la /usr/src/linux/.config
-rw-r--r-- 1 root root 106014 Jul 31 17:13 /usr/src/linux/.config
However, I use menuconfig almost exclusively, but this should not make any
difference.
Did you diff the old and new .config files? [1]
> Even stranger, if I look at "Local version - append to kernel release:"
> it still shows the value I had previously set - but that setting
> CONFIG_LOCALVERSION is NOT in .config. If I close the tool and start
> it again, that setting is now missing and it looks like all settings
> have been reset to the clean starting defaults (i.e., many say "(NEW)"
>
> Am I missing something here, or might this really be a bug in "make
> xconfig" ?
Have you checked the /usr/src/linux symlink is pointing to the correct kernel
sources directory? What you describing is akin to you working on the wrong
.config file.
> Can anyone else replicate this? While I don't think it's related to my
> problem getting a non-booting kernel, it certainly has me confused.
>
> Thanks for helping me confirm what's left of my sanity.
>
> Jack
I don't have time to replicate it this morning, but in case you're missing
some simple step in your procedure, try this:
cd /usr/src
ls -la
check the linux symlink is pointing to the desired kernel sources directory.
If not remove it and re-set it either manually, or by using 'eselect kernel'.
Then copy the running config to the symlinked linux directory, overwriting the
sources' config file with its default settings.
zcat /proc/config.gz > /usr/src/linux/.config
Now you can go into the linux directory and modify its config:
cd linux
make xconfig
When you're done tweaking things make sure you save your changes before you
make clean && make && make modules_install && make install
The last bit copies over the kernel for you to /boot if you don't want to do
this manually or use your own naming convention.
For more details have a look here:
https://wiki.gentoo.org/wiki/Kernel/Configuration
HTH.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] kernel config strangeness
2019-07-31 22:31 [gentoo-user] kernel config strangeness Jack
2019-08-01 8:26 ` Mick
@ 2019-08-02 2:05 ` Adam Carter
2019-08-02 16:52 ` Jack
1 sibling, 1 reply; 7+ messages in thread
From: Adam Carter @ 2019-08-02 2:05 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
> However, if I start with the .config which workd, and "make xconfig"
> and select "Supported processor types" under "Processor type and
> features" and then unselect "Support Intel Pprocessors" (I have a
> Ryzen) and save the config, it decreases the size of .config from 169K
> to under 13K, losing almost every setting in the file.
>
Checking my systems, .config is 131k (AMD system, so CONFIG_CPU_SUP_INTEL
is not set) and an Intel system is 116k.
Try following the same procedure using make menuconfig instead of make
xconfig and see what happens.
[-- Attachment #2: Type: text/html, Size: 937 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] kernel config strangeness
2019-08-02 2:05 ` Adam Carter
@ 2019-08-02 16:52 ` Jack
2019-08-03 0:52 ` Adam Carter
0 siblings, 1 reply; 7+ messages in thread
From: Jack @ 2019-08-02 16:52 UTC (permalink / raw
To: gentoo-user
On 2019.08.01 22:05, Adam Carter wrote:
>> However, if I start with the .config which workd, and "make xconfig"
>> and select "Supported processor types" under "Processor type and
>> features" and then unselect "Support Intel Pprocessors" (I have a
>> Ryzen) and save the config, it decreases the size of .config from
>> 169K to under 13K, losing almost every setting in the file.
>
> Checking my systems, .config is 131k (AMD system, so
> CONFIG_CPU_SUP_INTEL is not set) and an Intel system is 116k.
>
> Try following the same procedure using make menuconfig instead of
> make xconfig and see what happens.
>
First, I finally figured out this is not really important for me.
"Supported Processor types" is ONLY for 32 bits. One or more of those
need to be set ONLY if the kernel needs to run on a 32 bit system.
That is why it would be set for any live image which will run on 32
bits, but would all be off for any distro that no longer supports 32
bits.
Using menuconfig does not truncate .config. However, my current guess
is that some combination of settings where "Supported processor types"
(CONFIG_PROCESSOR_SELECT) IS selected and perhaps one of it's sub
settings (CONFIG_CPU XXX) is NOT selected causes make xconfig or
gconfig to completely reset the configuration, reducing the next saved
version to under 10k.
I found a (not much used) linux-config mailing list, and I'll probably
post the issue there.
Jack
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] kernel config strangeness
2019-08-02 16:52 ` Jack
@ 2019-08-03 0:52 ` Adam Carter
2019-08-04 2:52 ` Jack
0 siblings, 1 reply; 7+ messages in thread
From: Adam Carter @ 2019-08-03 0:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
>
> First, I finally figured out this is not really important for me.
> "Supported Processor types" is ONLY for 32 bits.
>
When i remove Processor type and features ---> [*] Supported processor
vendors ---> [ ] Support AMD processors (CONFIG_CPU_SUP_AMD) it removes
features relevant to 64 bit CPUs;
# diff .config .config-gold | grep ^\>
> CONFIG_X86_CPU_RESCTRL=y
> CONFIG_CPU_SUP_AMD=y
> # CONFIG_GART_IOMMU is not set
> CONFIG_X86_MCE_AMD=y
> CONFIG_X86_MCE_THRESHOLD=y
> CONFIG_PERF_EVENTS_AMD_POWER=y
> CONFIG_MICROCODE=y
> # CONFIG_MICROCODE_INTEL is not set
> CONFIG_MICROCODE_AMD=y
> CONFIG_MICROCODE_OLD_INTERFACE=y
> # CONFIG_AMD_MEM_ENCRYPT is not set
> CONFIG_X86_ACPI_CPUFREQ_CPB=y
> CONFIG_X86_AMD_FREQ_SENSITIVITY=y
> CONFIG_AMD_NB=y
> CONFIG_SENSORS_K10TEMP=m
> CONFIG_SENSORS_FAM15H_POWER=m
> CONFIG_AGP_AMD64=y
> CONFIG_EDAC_DECODE_MCE=y
> CONFIG_EDAC_AMD64=m
> # CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
[-- Attachment #2: Type: text/html, Size: 1344 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] kernel config strangeness
2019-08-03 0:52 ` Adam Carter
@ 2019-08-04 2:52 ` Jack
2019-08-04 6:28 ` Adam Carter
0 siblings, 1 reply; 7+ messages in thread
From: Jack @ 2019-08-04 2:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
On 8/2/19 8:52 PM, Adam Carter wrote:
>
> First, I finally figured out this is not really important for me.
> "Supported Processor types" is ONLY for 32 bits.
>
>
> When i remove Processor type and features ---> [*] Supported
> processor vendors ---> [ ] Support AMD processors
> (CONFIG_CPU_SUP_AMD) it removes features relevant to 64 bit CPUs;
>
> # diff .config .config-gold | grep ^\>
> > CONFIG_X86_CPU_RESCTRL=y
> > CONFIG_CPU_SUP_AMD=y
> > # CONFIG_GART_IOMMU is not set
> > CONFIG_X86_MCE_AMD=y
> > CONFIG_X86_MCE_THRESHOLD=y
> > CONFIG_PERF_EVENTS_AMD_POWER=y
> > CONFIG_MICROCODE=y
> > # CONFIG_MICROCODE_INTEL is not set
> > CONFIG_MICROCODE_AMD=y
> > CONFIG_MICROCODE_OLD_INTERFACE=y
> > # CONFIG_AMD_MEM_ENCRYPT is not set
> > CONFIG_X86_ACPI_CPUFREQ_CPB=y
> > CONFIG_X86_AMD_FREQ_SENSITIVITY=y
> > CONFIG_AMD_NB=y
> > CONFIG_SENSORS_K10TEMP=m
> > CONFIG_SENSORS_FAM15H_POWER=m
> > CONFIG_AGP_AMD64=y
> > CONFIG_EDAC_DECODE_MCE=y
> > CONFIG_EDAC_AMD64=m
> > # CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
Are you sure those settings are "=y" or "=m") in the other file, and not
just simply not present? Changing that one setting may only have
altered whether those other settings are explicitly included in the
.config file, and not their value.
Jack
[-- Attachment #2: Type: text/html, Size: 2557 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-08-04 6:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31 22:31 [gentoo-user] kernel config strangeness Jack
2019-08-01 8:26 ` Mick
2019-08-02 2:05 ` Adam Carter
2019-08-02 16:52 ` Jack
2019-08-03 0:52 ` Adam Carter
2019-08-04 2:52 ` Jack
2019-08-04 6:28 ` Adam Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox