Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Realtime kernel build quickie + bootsplash (or not)

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
Scoop
Posts: 21
Joined: 2004-09-14 20:18
Location: Australia

#76 Post by Scoop »

Thank you mzilikazi for the latest update.
I just built a 2.6.26-5-rt9 nvidia kernel from your instructions. I just changed rt8 to rt9 where applicable as rt9 is the latest patch.
Thanks again!

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#77 Post by mzilikazi »

Scoop wrote:Thank you mzilikazi for the latest update.
I just built a 2.6.26-5-rt9 nvidia kernel from your instructions. I just changed rt8 to rt9 where applicable as rt9 is the latest patch.
Thanks again!
Thanks for the reply! It's always nice to get confirmation that something works. ;) It's just too easy to make typos.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#78 Post by garrincha »

For those with nvidia legacy cards, do the same steps as in mzilikazi's recent post. The lastest nvidia legacy version 96xx (and I assumed 71xx as well) also doesn't play nice with real-time patch as I discovered a few weeks ago when I returned to compiling a RT kernel and you'll get the same error as in mzilikazi's. I solved it by manually editing the nv-linux.h file, but basically it's same as mziliazi's.

Install nvidia using modules-assistant & auto-assistant:

Code: Select all

# apt-get install module-assistant gcc nvidia-kernel-common
# m-a update
# m-a prepare
# m-a a-i nvidia-kernel-legacy-96xx-source
If you get the error, do this - note the location of nv-linux.h:

Code: Select all

# sed -i '/__SEMAPHORE_INITIALIZER/ s/__SEMAPHORE_INITIALIZER/__COMPAT_SEMAPHORE_INITIALIZER/' /usr/src/modules/nvidia-kernel-legacy-96xx/nv/nv-linux.h
# sed -i '/struct semaphore/ s/struct semaphore/struct compat_semaphore/' /usr/src/modules/nvidia-kernel-legacy-96xx/nv/nv-linux.h
To avoid losing the edit to nv-linux.h file:

Code: Select all

# m-a a-i -O nvidia-kernel-legacy-96xx-source
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

Scoop
Posts: 21
Joined: 2004-09-14 20:18
Location: Australia

#79 Post by Scoop »

Audio users note:
The 2.6.26 kernel has major problems for audio, esp. MIDI. See
http://kerneltrap.org/Linux/Removing_th ... ernel_Lock
2.6.25-rt8 is reported to be OK for audio and nvidia drivers so I will try build that.

jongi
Posts: 472
Joined: 2007-04-15 02:41

#80 Post by jongi »

Do I run

Code: Select all

export CONCURRENCY_LEVEL=2
from the command line before i start the make-kpkg process?
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#81 Post by garrincha »

jongi wrote:Do I run

Code: Select all

export CONCURRENCY_LEVEL=2
from the command line before i start the make-kpkg process?
Yes. You usually do like so:

Code: Select all

export CONCURRENCY_LEVEL=2
fakeroot make-kpkg etc
FYI:
man make-kpkg

Code: Select all

CONCURRENCY_LEVEL
              If defined, this environment variable sets the concurrency level of make used to compile the kernel and the modules set using -j  flags  to
              the sub make in the build target of make-kpkg.  Should be a (small) integer, if used. You can get the current number of CPUs using the comâ€
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

jongi
Posts: 472
Joined: 2007-04-15 02:41

#82 Post by jongi »

does it need to be run every time or is it set for all time once i do it the first time
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#83 Post by garrincha »

jongi wrote:does it need to be run every time or is it set for all time once i do it the first time
It should be for when you run make during kernel compilation. Please read the quoted portion of man make-kpkg
If defined, this environment variable sets the concurrency level of make used to compile the kernel
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

jongi
Posts: 472
Joined: 2007-04-15 02:41

#84 Post by jongi »

does export define the setting permanently?
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#85 Post by garrincha »

jongi wrote:does export define the setting permanently?
If you run it for example from the terminal - no. Export is a bash command to set an environment variable.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

roooz
Posts: 143
Joined: 2008-07-27 21:01

#86 Post by roooz »

What if you want to build a realtime kernel for a multimedia distro, with the aim that as much as possible people can work with it?

Which packages do you need to install etc. ?

edit: and what do you choose when you do

Code: Select all

make oldconfig
and you get some options to choose... Do you hit just ENTER or what? What does ENTER mean here?

jongi
Posts: 472
Joined: 2007-04-15 02:41

#87 Post by jongi »

If I remember correctly hitting Enter chooses the default action, which normally is capitalised.
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

touser
Posts: 2
Joined: 2008-03-28 23:33

#88 Post by touser »

Heres a stupid question, i just followed the guide but for the latest version of the patch and it worked great, but i started off with an amd64 kernel and i would like to continue running 64bit. Is the kernel i compiled while running the stock 64bit lenny kernel 64bit or are there additional steps i need to take that werent outlined in the guide to make it 64bit? Thanks!

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#89 Post by garrincha »

touser wrote:Heres a stupid question, i just followed the guide but for the latest version of the patch and it worked great, but i started off with an amd64 kernel and i would like to continue running 64bit. Is the kernel i compiled while running the stock 64bit lenny kernel 64bit or are there additional steps i need to take that werent outlined in the guide to make it 64bit? Thanks!
AMD64 is coded in such way that it operates in both long mode which consist of the 64-bit mode and compatibility mode implementation to run 32-bit code in 64-bit environment.

Anyway, if you want to you can look under "Executable file format / Emulation --> i32 Emulation" of your kernel configuration. You can turn it off as long as you're sure that you don't have any 32-bit programs running. However, turning it off will not have any significant impact on the kernel overall.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

Scoop
Posts: 21
Joined: 2004-09-14 20:18
Location: Australia

#90 Post by Scoop »

To build the latest rt kernel (2.6.26.8-rt13) that works with audio esp. jack and midi you need Adam Samson's patch.
This is the modified sequence (without bootsplash)

wget http://kernel.org/pub/linux/kernel/v2.6 ... .8.tar.bz2
wget http://www.kernel.org/pub/linux/kernel/ ... 8-rt13.bz2
wget http://offog.org/stuff/rt-200901/taskle ... tion.patch
########## this is Adam's patch above #############
unp linux-2.6.26.8.tar.bz2
mv linux-2.6.26.8 linux-2.6.26.8-rt13
cd linux-2.6.26.8-rt13
bzcat ../patch-2.6.26.8-rt13.bz2 |patch -p1
patch -p1<../tasklets-fix-tasklet_hi_action.patch

This patch will probably be merged for subsequent rt patch releases.

I have not succeeded in building nvidia for this one yet but I am no guru!
HTH
Norv

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#91 Post by mzilikazi »

Scoop wrote:To build the latest rt kernel (2.6.26.8-rt13) that works with audio esp. jack and midi you need Adam Samson's patch.

I have not succeeded in building nvidia for this one yet but I am no guru!
HTH
Norv
Thanks for the tip! Did you try Nvidia from the experimental repo or are you using the Nvidia installer?
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

Scoop
Posts: 21
Joined: 2004-09-14 20:18
Location: Australia

#92 Post by Scoop »

I just rebooted and did
sudo m-a a-i nvidia
I'm on debian sid with unstable and experimental in my sources.list - unstable pinned higher.

reakinator
Posts: 7
Joined: 2009-02-03 22:56

error: undefined references in timer.c

#93 Post by reakinator »

I'm trying to compile kernel 2.6.21.6-rt21 with this guide (it was the last one to work well for me in ubuntu - everything after had many problems with the touchpad and wireless). When running the command:

Code: Select all

time fakeroot make-kpkg --initrd -rev mz1 kernel_image kernel_headers
I get the following error:

Code: Select all

kernel/built-in.o: In function `run_timer_softirq':
timer.c:(.text+0x12405): undefined reference to `__udivdi3'
timer.c:(.text+0x12428): undefined reference to `__umoddi3'
kernel/built-in.o: In function `do_sysinfo':
(.text+0x128e2): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_sysinfo':
(.text+0x12902): undefined reference to `__umoddi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x12a57): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x12a77): undefined reference to `__umoddi3'
kernel/built-in.o: In function `getnstimeofday':
(.text+0x12bce): undefined reference to `__umoddi3'
kernel/built-in.o: In function `ktime_get_ts':
(.text+0x1e26c): undefined reference to `__umoddi3'
kernel/built-in.o: In function `hrtimer_run_queues':
(.text+0x1e588): undefined reference to `__udivdi3'
kernel/built-in.o: In function `hrtimer_run_queues':
(.text+0x1e5aa): undefined reference to `__umoddi3'
make[1]: *** [.tmp_vmlinux1] Error 1
Can anyone suggest what is going wrong? Thanks..

Rich

lurid
Posts: 1
Joined: 2009-02-26 00:09
Location: Pennsylvania, United States

#94 Post by lurid »

Thanks everyone for posting! I finally got my RT kernel built and my ATi drivers working with it. I couldn't get the kernel module for my graphics card to build because of an error that is discussed in this thread on another message board. I built a 2.6.26.8 kernel using the instructions here, the kernel build itself was smooth and easy. The only problem was the fglrx kernel module that would refuse to build even when I had all of the PARAVIRT stuff disabled.

Following the instructions in the above-posted thread, I was able to fix the problem and get the kernel and module built. I hope something gets done to avoid this problem in the future. I was up until about 3:30AM trying to get it working, but now I got it.

Code: Select all

me@my_box:~$ uname -a
Linux my_box 2.6.26.8-rt16 #1 SMP PREEMPT RT Wed Feb 25 18:23:28 EST 2009 x86_64 GNU/Linux

roooz
Posts: 143
Joined: 2008-07-27 21:01

#95 Post by roooz »

@mzilikazi and others,

There are thinking to include an RT kernel in Debian. Maybe you can offer your experience/knowledge to build, maintain or test the RT kernel:

http://www.linux-archive.org/debian-dev ... ebian.html

Post Reply