public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] problem compiling Kernel 6.1.27-gentoo-r1
@ 2023-05-20  6:59 Philip Webb
  2023-05-20  7:58 ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Webb @ 2023-05-20  6:59 UTC (permalink / raw
  To: Gentoo User

I'm trying to install Gentoo in my new machine
& have got to the step of compiling a kernel.
I used the config file from my present machine, did 'make oldconfig'
& have then done 'make menuconfig' to include drivers etc.

The 'make' stage goes on for a long time, then crashes doing
'UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8168g-2.fw.gen.S'
with message "make [5] *** No rule to make target
'lib/firmware/rtl_nic/rtl8168g-2.fw' needed by 'drivers/base/firmware_loader/
builtin/rtl_nic/rtl8168g-2.fw.gen.o' Stop".

The relevant line in Menuconfig is 'DeviceDrivers > NetworkDeviceSupport >
EthernetDriverSupport' under 'Realtek devices'.
I've tried it with 'Realtek8169/8168/...' 'Y' or 'M' or 'N'
& also with 'Realtek devices' as 'N'.  I also tried a 'make clean'.
The same error goes on happening.

Since I don't have anything by Realtek for networking
-- sound uses Realtek -- , I can't understand the behaviour above.

Can anyone offer any advice ?

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca



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

* Re: [gentoo-user] problem compiling Kernel 6.1.27-gentoo-r1
  2023-05-20  6:59 [gentoo-user] problem compiling Kernel 6.1.27-gentoo-r1 Philip Webb
@ 2023-05-20  7:58 ` Michael
  2023-05-20  9:54   ` [gentoo-user] " Nuno Silva
  0 siblings, 1 reply; 5+ messages in thread
From: Michael @ 2023-05-20  7:58 UTC (permalink / raw
  To: Gentoo User

[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]

On Saturday, 20 May 2023 07:59:59 BST Philip Webb wrote:
> I'm trying to install Gentoo in my new machine
> & have got to the step of compiling a kernel.
> I used the config file from my present machine, did 'make oldconfig'
> & have then done 'make menuconfig' to include drivers etc.
> 
> The 'make' stage goes on for a long time, then crashes doing
> 'UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8168g-2.fw.gen.S'
> with message "make [5] *** No rule to make target
> 'lib/firmware/rtl_nic/rtl8168g-2.fw' needed by
> 'drivers/base/firmware_loader/ builtin/rtl_nic/rtl8168g-2.fw.gen.o' Stop".
> 
> The relevant line in Menuconfig is 'DeviceDrivers > NetworkDeviceSupport >
> EthernetDriverSupport' under 'Realtek devices'.
> I've tried it with 'Realtek8169/8168/...' 'Y' or 'M' or 'N'
> & also with 'Realtek devices' as 'N'.  I also tried a 'make clean'.
> The same error goes on happening.
> 
> Since I don't have anything by Realtek for networking
> -- sound uses Realtek -- , I can't understand the behaviour above.
> 
> Can anyone offer any advice ?

The compilation complains it is missing the firmware required by a realtek 
NIC, probably a setting inherited from the config settings of the old kernel?  
You eventually compiled it with "N".  I suspect the order in which you 
configured/compiled it plays a role in this error.

Since you do not have this hardware, set it to "N", then run:

make clean && make && make install modules_install .... <whatever options you 
normally use here>.

Meanwhile, check if you have the firmware file it asks for, which would have 
been installed as part of 'sys-kernel/linux-firmware':

 $ ls -la /lib/firmware/rtl_nic/rtl8168g-2.fw
-rw-r--r-- 1 root root 4896 May 18 16:15 /lib/firmware/rtl_nic/rtl8168g-2.fw

 $ qfile /lib/firmware/rtl_nic/rtl8168g-2.fw
sys-kernel/linux-firmware: /lib/firmware/rtl_nic/rtl8168g-2.fw

When you update world after you have compiled your new kernel, linux-firmware 
will be installed and the missing file will be available anyway - although no 
longer needed or used by the kernel.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [gentoo-user] Re: problem compiling Kernel 6.1.27-gentoo-r1
  2023-05-20  7:58 ` Michael
@ 2023-05-20  9:54   ` Nuno Silva
  2023-05-20 10:54     ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Nuno Silva @ 2023-05-20  9:54 UTC (permalink / raw
  To: gentoo-user

On 2023-05-20, Michael wrote:

> On Saturday, 20 May 2023 07:59:59 BST Philip Webb wrote:
>> I'm trying to install Gentoo in my new machine
>> & have got to the step of compiling a kernel.
>> I used the config file from my present machine, did 'make oldconfig'
>> & have then done 'make menuconfig' to include drivers etc.
>> 
>> The 'make' stage goes on for a long time, then crashes doing
>> 'UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8168g-2.fw.gen.S'
>> with message "make [5] *** No rule to make target
>> 'lib/firmware/rtl_nic/rtl8168g-2.fw' needed by
>> 'drivers/base/firmware_loader/ builtin/rtl_nic/rtl8168g-2.fw.gen.o' Stop".
>> 
>> The relevant line in Menuconfig is 'DeviceDrivers > NetworkDeviceSupport >
>> EthernetDriverSupport' under 'Realtek devices'.
>> I've tried it with 'Realtek8169/8168/...' 'Y' or 'M' or 'N'
>> & also with 'Realtek devices' as 'N'.  I also tried a 'make clean'.
>> The same error goes on happening.
>> 
>> Since I don't have anything by Realtek for networking
>> -- sound uses Realtek -- , I can't understand the behaviour above.
>> 
>> Can anyone offer any advice ?
>
> The compilation complains it is missing the firmware required by a realtek 
> NIC, probably a setting inherited from the config settings of the old kernel?  
> You eventually compiled it with "N".  I suspect the order in which you 
> configured/compiled it plays a role in this error.
>
> Since you do not have this hardware, set it to "N", then run:

Could this be the manually defined list of firmware blobs to include in
the kernel image, and not something automatically pulled in by a driver?

I'm not sure what's the quickest way to check, perhaps this works?:

    grep CONFIG_EXTRA_FIRMWARE /usr/src/linux/.config

-- 
Nuno Silva



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

* Re: [gentoo-user] Re: problem compiling Kernel 6.1.27-gentoo-r1
  2023-05-20  9:54   ` [gentoo-user] " Nuno Silva
@ 2023-05-20 10:54     ` Michael
  2023-05-21  8:18       ` [gentoo-user] Re: problem compiling Kernel 6.1.27-gentoo-r1 : SOLVED Philip Webb
  0 siblings, 1 reply; 5+ messages in thread
From: Michael @ 2023-05-20 10:54 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]

On Saturday, 20 May 2023 10:54:21 BST Nuno Silva wrote:
> On 2023-05-20, Michael wrote:
> > On Saturday, 20 May 2023 07:59:59 BST Philip Webb wrote:
> >> I'm trying to install Gentoo in my new machine
> >> & have got to the step of compiling a kernel.
> >> I used the config file from my present machine, did 'make oldconfig'
> >> & have then done 'make menuconfig' to include drivers etc.
> >> 
> >> The 'make' stage goes on for a long time, then crashes doing
> >> 'UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8168g-2.fw.gen.S'
> >> with message "make [5] *** No rule to make target
> >> 'lib/firmware/rtl_nic/rtl8168g-2.fw' needed by
> >> 'drivers/base/firmware_loader/ builtin/rtl_nic/rtl8168g-2.fw.gen.o'
> >> Stop".
> >> 
> >> The relevant line in Menuconfig is 'DeviceDrivers > NetworkDeviceSupport
> >> >
> >> EthernetDriverSupport' under 'Realtek devices'.
> >> I've tried it with 'Realtek8169/8168/...' 'Y' or 'M' or 'N'
> >> & also with 'Realtek devices' as 'N'.  I also tried a 'make clean'.
> >> The same error goes on happening.
> >> 
> >> Since I don't have anything by Realtek for networking
> >> -- sound uses Realtek -- , I can't understand the behaviour above.
> >> 
> >> Can anyone offer any advice ?
> > 
> > The compilation complains it is missing the firmware required by a realtek
> > NIC, probably a setting inherited from the config settings of the old
> > kernel? You eventually compiled it with "N".  I suspect the order in
> > which you configured/compiled it plays a role in this error.
> 
> > Since you do not have this hardware, set it to "N", then run:
> Could this be the manually defined list of firmware blobs to include in
> the kernel image, and not something automatically pulled in by a driver?
> 
> I'm not sure what's the quickest way to check, perhaps this works?:
> 
>     grep CONFIG_EXTRA_FIRMWARE /usr/src/linux/.config

This will not resolve the problem of a missing firmware file.  It is missing 
in the filesystem.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [gentoo-user] Re: problem compiling Kernel 6.1.27-gentoo-r1 : SOLVED
  2023-05-20 10:54     ` Michael
@ 2023-05-21  8:18       ` Philip Webb
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Webb @ 2023-05-21  8:18 UTC (permalink / raw
  To: gentoo-user

230520 Michael wrote:
> On Saturday, 20 May 2023 10:54:21 BST Nuno Silva wrote:
>> On 2023-05-20, Michael wrote:
>>> On Saturday, 20 May 2023 07:59:59 BST Philip Webb wrote:
>>>> I'm trying to install Gentoo in my new machine
>>>> & have got to the step of compiling a kernel.
>>>> I used the config file from my present machine, did 'make oldconfig'
>>>> & have then done 'make menuconfig' to include drivers etc.
>>>> 
>>>> The 'make' stage goes on for a long time, then crashes doing
>>>> 'UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8168g-2.fw.gen.S'
>>>> with message "make [5] *** No rule to make target
>>>> 'lib/firmware/rtl_nic/rtl8168g-2.fw' needed by
>>>> 'drivers/base/firmware_loader/ builtin/rtl_nic/rtl8168g-2.fw.gen.o'
>>>> Stop".
>>>> 
>>>> The relevant line in Menuconfig is 'DeviceDrivers > NetworkDeviceSupport
>>>> >
>>>> EthernetDriverSupport' under 'Realtek devices'.
>>>> I've tried it with 'Realtek8169/8168/...' 'Y' or 'M' or 'N'
>>>> & also with 'Realtek devices' as 'N'.  I also tried a 'make clean'.
>>>> The same error goes on happening.
>>>> 
>>>> Since I don't have anything by Realtek for networking
>>>> -- sound uses Realtek -- , I can't understand the behaviour above.
>>> The compilation complains it is missing the firmware required by a realtek
>>> NIC, probably a setting inherited from the config settings of the old
>>> kernel? You eventually compiled it with "N".  I suspect the order in
>>> which you configured/compiled it plays a role in this error.
>>> Since you do not have this hardware, set it to "N", then run:
>> Could this be the manually defined list of firmware blobs to include in
>> the kernel image, and not something automatically pulled in by a driver?
>> I'm not sure what's the quickest way to check, perhaps this works?:
>>     grep CONFIG_EXTRA_FIRMWARE /usr/src/linux/.config
> This will not resolve the problem of a missing firmware file.
> It is missing in the filesystem.

The problem was 'make oldconfig', which used a  5 year-old  .config .
For some reason, the resulting  .config  insisted on installing
the Realtek driver, which wasn't available.

I cut the Gordian knot by moving the other  .config's  out of the way
& doing a raw 'make menuconfig'.  Then the kernel compiled.
If it needs further tweaking, esp for missing drivers, I can do it later.

It's too late to do further steps today,
so we'll see what happens when I try booting from the new kernel.

Thanks for the various pieces of help.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca



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

end of thread, other threads:[~2023-05-21  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20  6:59 [gentoo-user] problem compiling Kernel 6.1.27-gentoo-r1 Philip Webb
2023-05-20  7:58 ` Michael
2023-05-20  9:54   ` [gentoo-user] " Nuno Silva
2023-05-20 10:54     ` Michael
2023-05-21  8:18       ` [gentoo-user] Re: problem compiling Kernel 6.1.27-gentoo-r1 : SOLVED Philip Webb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox