Kernel config changes not falling through to the built OS

95 views
Skip to first unread message

Oskar

unread,
Nov 20, 2023, 9:10:45 AM11/20/23
to esos-users
Hi!

I have a few 10G NIC:s (Qlogic QLE8142) that I want to use for DRBD synchronization, but the driver for them are not compiled into the kernel by default anymore. And you have to add the kernel config "CONFIG_QLGE" to add it to the kernel. But even though I do that when compiling, it doesn't seem to exist in the finished build...?

I've made sure that ESOS is running the same kernel as the one I'm adding the changes to. But to make sure that it didn't use the wrong config file I added the line to all kernel config files in the misc folder located in the esos sources. But it still seems to not be compiled into the finished build.

I did check around a little and found some references to this added config line in the build files. But it wont show when running the OS.

I've tried to add the driver as both a module and built into the kernel but that doesn't seem to change anything...

To see if the drivers exist I've ran [lspci -k] to see if the cards have the driver loaded, but no. I've also checked the running kernel config by looking at the /proc/config.gz file but it doesn't contain the added line...

I don't know where it goes wrong but I've tried to compile it multiple times from scratch, I even cloned the git folder each time, to see if i missed something or something went wrong..

I'm trying to compile the latest stable version of ESOS v4.1.11 if that might make any difference?

Any guidance on what I might be doing wrong?

Thanks in advance!

Best regards
Oskar

Marc Smith

unread,
Dec 5, 2023, 9:37:10 AM12/5/23
to esos-...@googlegroups.com
How are you attempting to add it? You should clone fresh ESOS source,
and checkout the desired tag, then modify "misc/linux-5.4.229.config"
and change the desired option to '=y' for built-in. Are you sure it's
"CONFIG_QLGE"? I don't get much when I Google that, so check that the
kernel option name is correct...

--Marc


>
> Thanks in advance!
>
> Best regards
> Oskar
>
> --
> You received this message because you are subscribed to the Google Groups "esos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to esos-users+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/esos-users/1036a5c8-a7f0-4af2-8f7c-30493962f1fan%40googlegroups.com.

Oskar

unread,
Dec 5, 2023, 4:28:43 PM12/5/23
to esos-users
Thanks for your reply!

I've attempted to add it both by manually adding the line in the config file and by downloading the source code for the kernel and changing the kernel config through the program menuconfig. Through menuconfig I learnd that the CONFIG_QLGE was dependent on CONFIG_STAGING. But even if I copy the new config file from menuconfig the drivers wont get included.

I've looked into the work/dist_files/linux-5.4.229/drivers/staging/ and there a folder named qlge exists, as expected. I also found the 'qlge' folder in the work/chroot/lib/modules/5.4.229-esos.prod/kernel/drivers/staging/ folder. But it seems like when I build the image and create the zip package, that folder doesn't get included for some reason? Is there maybe some list of what folders should be included in the image? Because I noticed that there are some other folders that exists in the work/chroot folder tree that doesn't exist in the final build. Like the work/chroot/sources folder for example, it exists in the file tree while building but doesn't get copied over to the running image.

Best regards
Oskar

Oskar

unread,
Dec 6, 2023, 9:49:07 AM12/6/23
to esos-users
Okay, I just realized what the problem is! I looked at the running kernel config file (/proc/config.gz) and couldn't find either the staging or qlge config lines. And I looked at the output of lspci which told me that there was no driver loaded for my NIC:s. So I assumed that the module wasn't included into the final build. However I've been looking around in the running os and found the module here /lib/modules/5.4.229-esos.prod/kernel/drivers/staging/qlge/qlge.ko.

I don't know why the running kernel config file (/proc/config.gz) doesn't reflect the changes I made in the misc/linux-5.4.229.config file, is it not copied correctly?

Anyway I'm now facing a new problem. The qlge module doesn't get loaded automatically and I have to run "modprobe qlge" to load the driver. But I want to load it automatically during boot so I don't have to go and run modprobe every time the server reboots. But from what I understand from googling around a bit, I should just add the module name to the file "/etc/modules", which doesn't exist on my esos build. And if I add it manually and add a line with qlge into the file, nothing changes. Is there perhaps another way to do this within esos that I'm not aware of?

Best regards
Oskar

Marc Smith

unread,
Dec 8, 2023, 8:27:55 AM12/8/23
to esos-...@googlegroups.com
On Wed, Dec 6, 2023 at 9:49 AM Oskar <os...@stahls.se> wrote:
>
> Okay, I just realized what the problem is! I looked at the running kernel config file (/proc/config.gz) and couldn't find either the staging or qlge config lines. And I looked at the output of lspci which told me that there was no driver loaded for my NIC:s. So I assumed that the module wasn't included into the final build. However I've been looking around in the running os and found the module here /lib/modules/5.4.229-esos.prod/kernel/drivers/staging/qlge/qlge.ko.
>
> I don't know why the running kernel config file (/proc/config.gz) doesn't reflect the changes I made in the misc/linux-5.4.229.config file, is it not copied correctly?
>
> Anyway I'm now facing a new problem. The qlge module doesn't get loaded automatically and I have to run "modprobe qlge" to load the driver. But I want to load it automatically during boot so I don't have to go and run modprobe every time the server reboots. But from what I understand from googling around a bit, I should just add the module name to the file "/etc/modules", which doesn't exist on my esos build. And if I add it manually and add a line with qlge into the file, nothing changes. Is there perhaps another way to do this within esos that I'm not aware of?
>
> Best regards
> Oskar
> tisdag 5 december 2023 kl. 22:28:43 UTC+1 skrev Oskar:
>>
>> Thanks for your reply!
>>
>> I've attempted to add it both by manually adding the line in the config file and by downloading the source code for the kernel and changing the kernel config through the program menuconfig. Through menuconfig I learnd that the CONFIG_QLGE was dependent on CONFIG_STAGING. But even if I copy the new config file from menuconfig the drivers wont get included.
>>
>> I've looked into the work/dist_files/linux-5.4.229/drivers/staging/ and there a folder named qlge exists, as expected. I also found the 'qlge' folder in the work/chroot/lib/modules/5.4.229-esos.prod/kernel/drivers/staging/ folder. But it seems like when I build the image and create the zip package, that folder doesn't get included for some reason? Is there maybe some list of what folders should be included in the image? Because I noticed that there are some other folders that exists in the work/chroot folder tree that doesn't exist in the final build. Like the work/chroot/sources folder for example, it exists in the file tree while building but doesn't get copied over to the running image.
>>
>> Best regards
>> Oskar
>>
>> tisdag 5 december 2023 kl. 15:37:10 UTC+1 skrev Marc Smith:
>>>
>>> On Mon, Nov 20, 2023 at 9:10 AM Oskar <os...@stahls.se> wrote:
>>> >
>>> > Hi!
>>> >
>>> > I have a few 10G NIC:s (Qlogic QLE8142) that I want to use for DRBD synchronization, but the driver for them are not compiled into the kernel by default anymore. And you have to add the kernel config "CONFIG_QLGE" to add it to the kernel. But even though I do that when compiling, it doesn't seem to exist in the finished build...?
>>> >
>>> > I've made sure that ESOS is running the same kernel as the one I'm adding the changes to. But to make sure that it didn't use the wrong config file I added the line to all kernel config files in the misc folder located in the esos sources. But it still seems to not be compiled into the finished build.
>>> >
>>> > I did check around a little and found some references to this added config line in the build files. But it wont show when running the OS.
>>> >
>>> > I've tried to add the driver as both a module and built into the kernel but that doesn't seem to change anything...
>>> >
>>> > To see if the drivers exist I've ran [lspci -k] to see if the cards have the driver loaded, but no. I've also checked the running kernel config by looking at the /proc/config.gz file but it doesn't contain the added line...
>>> >
>>> > I don't know where it goes wrong but I've tried to compile it multiple times from scratch, I even cloned the git folder each time, to see if i missed something or something went wrong..
>>> >
>>> > I'm trying to compile the latest stable version of ESOS v4.1.11 if that might make any difference?
>>> >
>>> > Any guidance on what I might be doing wrong?

Sounds like you're copying binary files into a chroot/ directory which
is not the proper way to do this. Instead, build ESOS from source and
after cloning the source, before you run any other steps, modify
"misc/linux-5.4.229.config" (from the root of the ESOS source
directory) to enable your module. If the module has dependencies, you
can't simply add the CONFIG_...=y line in the file -- if the deps
aren't present, the driver is ignored. So you need to include whatever
deps are needed as well in that config file. I find it easiest to copy
"misc/linux-5.4.229.config" to
"work/chroot/sources/linux-5.4.229/.config" and then go to the Linux
source directory and run "make menuconfig" and enable the drive you'd
like (using the menu tool automatically enables deps needed). Then
replace "misc/linux-5.4.229.config" with the ".config" file you
created after using the menu and saving.

--Marc


>>>
>>> How are you attempting to add it? You should clone fresh ESOS source,
>>> and checkout the desired tag, then modify "misc/linux-5.4.229.config"
>>> and change the desired option to '=y' for built-in. Are you sure it's
>>> "CONFIG_QLGE"? I don't get much when I Google that, so check that the
>>> kernel option name is correct...
>>>
>>> --Marc
>>>
>>>
>>> >
>>> > Thanks in advance!
>>> >
>>> > Best regards
>>> > Oskar
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google Groups "esos-users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send an email to esos-users+...@googlegroups.com.
>>> > To view this discussion on the web visit https://groups.google.com/d/msgid/esos-users/1036a5c8-a7f0-4af2-8f7c-30493962f1fan%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "esos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to esos-users+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/esos-users/fb180e00-091b-480d-b4b0-78fc8f9edabdn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages