You are not logged in.

#1 2009-09-03 21:30:47

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

kernel26 patch question

There is a kernel patch to allow sensors to read temps on some rather new hardware - Intel Atom-330/nVidia based motherboards.  I have been googling around trying to find out how to get sensors to work with it and found this thread:

http://ubuntuforums.org/showthread.php?t=1199797&page=1

(see post #10)

Basically, there are some kernel patches that need to be applied until (if ever) the patches get included in the 2.6.3x kernel.  Is it inappropriate to ask for these to be included in the kernel26 package?  I don't think I'm brave enough to take on building a custom kernel smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-09-03 21:46:17

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: kernel26 patch question

This patch haven't yet made it into 2.6.31 kernel (just checked out my source) and because arch linux package maintainers try to keep the kernel vanilla as possible AFAIK I don't think that this patch is going to make it into archlinux kernel. You could try to build your own kernel, it's not 2hard, just use .config from 2.6.30-ARCH and apply patch to the source and that's it. Some info on building your custom kernel:

http://wiki.archlinux.org/index.php/Ker … rom_Source

Offline

#3 2009-09-03 23:59:07

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

Re: kernel26 patch question

If I did build my own kernel, would I need to build my own headers, nvidia modules, etc. as well?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2009-09-04 00:06:01

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: kernel26 patch question

You just need to recompile nvidia driver (or to reinstall through pacman, I don't know I have an intel gpu). No other complications...

Offline

#5 2009-09-04 00:08:50

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: kernel26 patch question

The nvidia driver may work without a recompile given you are only applying a small patch but it may not....   

You will not need to touch the kernel-headers package as that only relates to the toolchain.

Offline

#6 2009-09-04 07:39:46

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

Re: kernel26 patch question

Thanks for the replies... since I only need the modified coretemp.ko from this whole thing, can I simply recompile the vanilla arch kernel w/ patch, can simply take out that single file, replacing the on in /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/ and call it good or...?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-09-04 21:03:51

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

Re: kernel26 patch question

EDIT: I don't think that worked... I went ahead and compiled a custom kernel and attempted to use the coretemp.ko (from that patch) but was present the following error:

# insmod coretemp.ko 
insmod: error inserting 'coretemp.ko': -1 Invalid module format

That is from the dir of my package (/home/builds/kernelbuild/pkg/lib/modules/2.6.30.5-ARCH/kernel/drivers/hwmon)

It didn't work if I copied it to the fs either.

Thoughts are welcomed.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2009-09-04 21:15:55

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: kernel26 patch question

I don't know how you did it, but if I was you, I would download 2.6.30-5 from kernel.org and replace coretemp.c with the patched one and recompile the kernel as it was described in that link 2 wiki I posted... Maybe there is a faster way but this one is fullproof smile

We all have our problems, right now I'm pulling from git the entire xorg, mesa and intel driver stack because today's update trashed my performance... sad

Last edited by combuster (2009-09-04 21:18:39)

Offline

#9 2009-09-04 21:38:31

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

Re: kernel26 patch question

@combuster - I did smile  The procedure on the wiki worked flawlessly.  I just fear installing the kernel I made... I figured the module is all I need.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2009-09-04 22:07:32

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: kernel26 patch question

Just add to menu.lst a new entry for your custom kernel, if it fails you can easily boot to arch stock kernel, I'm running 2.6.31-rc7 for a week or more without any problems...

Offline

#11 2009-09-05 06:15:41

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: kernel26 patch question

Hello!

What's the output of ldd -r coretemp.ko  ?

Offline

#12 2009-09-05 07:20:00

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

Re: kernel26 patch question

djszapi wrote:

Hello!

What's the output of ldd -r coretemp.ko  ?

When I do it on the patched version that I didn't install:

# ldd -r /home/builds/kernelbuild/pkg/lib/modules/2.6.30.5-ARCH/kernel/drivers/hwmon/coretemp.ko
ldd: warning: you do not have execution permission for `/home/builds/kernelbuild/pkg/lib/modules/2.6.30.5-ARCH/kernel/drivers/hwmon/coretemp.ko'
    not a dynamic executable

When I do it on the arch version:

# ldd -r /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/coretemp.ko
ldd: warning: you do not have execution permission for `/lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/coretemp.ko'
    not a dynamic executable

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#13 2009-09-05 07:46:14

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: kernel26 patch question

djszapi wrote:

Hello!

What's the output of ldd -r coretemp.ko  ?

maybe i missed something but what's the relation between ldd and a kernel module?

@graysky, why don't just try to boot your custom kernel?

Offline

#14 2009-09-05 07:51:52

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

Re: kernel26 patch question

@bangkok - the wiki pages says I will most likely need to create a ram disk and that my nvidia drivers won't work wo/ modification.  I just need that one kernel module and have no interest in other mods to the arch kernel smile

Last edited by graysky (2009-09-05 07:52:38)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#15 2009-09-05 07:55:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: kernel26 patch question

Did you depmod after dropping the patched coretemp.ko into your stock kernel's /lib/modules?

Offline

#16 2009-09-05 08:00:00

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

Re: kernel26 patch question

tomk wrote:

Did you depmod after dropping the patched coretemp.ko into your stock kernel's /lib/modules?

No, initially I did copy the new module to /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/coretemp.ko  (renaming the original to coretemp.ko.orig).  I have since:

$ cd /home/builds/kernelbuild/pkg/lib/modules/2.6.30-ARCH/kernel/drivers/hwmon
# insmod coretemp.ko 
insmod: error inserting 'coretemp.ko': -1 Invalid module format

Should I copy the new one again to /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/coretemp.ko and attempt your suggestion of

# depmod -a

Last edited by graysky (2009-09-05 08:02:20)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#17 2009-09-05 08:00:32

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: kernel26 patch question

Offline

#18 2009-09-05 08:07:08

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: kernel26 patch question

I have a question regarding this. Arch stock kernel doesn't have sources in /usr/src/2.6.30-ARCH, only Kconfig in each directory, method in the link you provided should work with custom kernels but what about patching arch kernel?

Offline

#19 2009-09-05 08:10:05

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

Re: kernel26 patch question

I read that section, but I am not adept enough to apply this to my PKGBUILD... Is my fundamental goal flawed?  Goal: make a patched coretemp.ko that will work w/ my stock arch kernel (i686).  Plan to do this is to make the custom kernel package via makepkg but not to install it, instead just use the custom kernel as a means of generating the patched coretemp.ko for use w/ my vanilla arch kernel.

1) Got the source, made the PKGBUILD and kernel26.install
2) Applied the patch
3) Run the makepkg step which built up the package and in doing so, the patched coretemp.ko

Question 1: From here can I not simply copy the patched coretemp.ko from my $startdir/pkg to my live filesystem /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/ and just modprobe it?
Question 2: Should I run the depmod -a command after copying it over and then attempt to modprobe it?

Sorry if my questions are naive or even stupid; thanks in advance for advice smile

Last edited by graysky (2009-09-05 08:25:35)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#20 2009-09-05 08:19:15

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: kernel26 patch question

running depmod is necessary and depmod -A should be enough:
    -A, --quick          Only does the work if there's a new module

Offline

#21 2009-09-05 09:03:13

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

Re: kernel26 patch question

tomk wrote:

Did you depmod after dropping the patched coretemp.ko into your stock kernel's /lib/modules?

Yeah, but the result was the same:

# cp /home/builds/kernelbuild/src/drivers/hwmon/coretemp.ko /lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/
# depmod -a
# modprobe coretemp
FATAL: Error inserting coretemp (/lib/modules/2.6.30-ARCH/kernel/drivers/hwmon/coretemp.ko): Invalid module format

Last edited by graysky (2009-09-05 09:04:19)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#22 2009-09-07 10:36:34

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

Re: kernel26 patch question

OK! I did get it working w/ my custom kernel (had to make a ramdisk and nvidia driver too).  What I still can't understand is why I couldn't just replace the stock arch kernel's coretemp.ko with my patched one without making a new kernel in the first place...

Should I make a new ramdisk after copying it over?

# mkinitcpio -k 2.6.30-ARCH -g /boot/kernel26-mod.img

Then I would boot into the stock arch kernel using the kernel26-mod.img.  Am I barking up the wrong tree with this?

EDIT - This didn't work, BUT a modprobe -f did!

# modprobe -f coretemp
[root@atomic-arch]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +30.0°C  (crit = +95.0°C)                  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +27.0°C  (crit = +95.0°C)                  

coretemp-isa-0002
Adapter: ISA adapter
Core 2:      +30.0°C  (crit = +95.0°C)                  

coretemp-isa-0003
Adapter: ISA adapter
Core 3:      +27.0°C  (crit = +95.0°C)

NOW, the question is how can I add a module to my array in /etc/rc.conf and have it load w/ the force flag?  If you know please reply in that thread.

Last edited by graysky (2014-11-03 08:39:06)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#23 2009-09-26 14:38:17

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: kernel26 patch question

Hi,
Well seems i am in same problem like you. I have POV 330-1 ION board and i am trying to get lm_sensors working. For that i also build costum kernel with patch from that ubuntu page, booted into custum kernel but i cant load coretemp.ko modul also with same error:

[@box ~]$ sudo insmod /lib/modules/2.6.31-atom/kernel/drivers/hwmon/coretemp.ko
Password:
insmod: error inserting '/lib/modules/2.6.31-atom/kernel/drivers/hwmon/coretemp.ko': -1 Unknown symbol in module
[@box ~]$

I used PKGBUILD method to build kernel, kernel compiled and installed fine, editet menu.list to match new kernel and booted to it...
Sensors also dont detect any sensor to sad(

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): yes
Using driver `i2c-nforce2' for device 0000:00:03.2: nVidia Corporation nForce SMBus (MCP79)

Next adapter: SMBus nForce2 adapter at 4d00 (i2c-0)
Do you want to scan it? (YES/no/selectively): yes

Sorry, no sensors were detected.

All suggestions are welcome/welcomed.

Offline

Board footer

Powered by FluxBB