Building a kernel

More
17 Oct 2010 16:37 #4723 by pcnc1
Building a kernel was created by pcnc1
Hi there.
I am building a kernel so I can use RTAI to run emc2 here and I am using instructions from:
wiki.linuxcnc.org/emcinfo.pl?Debian_Lenny_Compile_RTAI

And I have come across this line:
Power management and ACPI options ---> ACPI (Advanced Configuration and Power Interface) Support ---> Dock ---> enabled [*]

I cannot figure out what the asterisk refers to. I also do not understand why I need to enable "Dock".

Can anyone here help me clarify any of this? Thanks.

Please Log in or Create an account to join the conversation.

More
17 Oct 2010 23:33 #4730 by mozmck
Replied by mozmck on topic Re:Building a kernel
The asterisk shows the option is enabled in the kernels 'menuconfig'
I believe "Dock" is enabled because it is required by something else, and you can't disable it.

Please Log in or Create an account to join the conversation.

More
18 Oct 2010 09:57 #4737 by andypugh
Replied by andypugh on topic Re:Building a kernel
pcnc1 wrote:

I am building a kernel so I can use RTAI to run emc2 here and I am using instructions from:
wiki.linuxcnc.org/emcinfo.pl?Debian_Lenny_Compile_RTAI


You might also like to look at the instructions here:
neo-technical.wikispaces.com/emc2-ubuntu

Please Log in or Create an account to join the conversation.

More
18 Oct 2010 12:53 #4740 by pcnc1
Replied by pcnc1 on topic Re:Building a kernel
Yes I have been noticing that it just seems turned on. I guess that is what bugged me
and why I posted my question. I cannot figure out why I get stuck with it. I'm trying to configure
a kernel with as little of what I don't need as I can. But it is hard for me to figure out what I don't
need. Turning off "Dock" seemed like a no brainer to me.

From what little I can gather it seems "Dock" has something to do with docking stations?
Why I *need* that on a desktop system I don't know. But whatever right?

I did decide shortly after I left my post to just let it go. But it is still bugging me. I'll live though.
I keep on getting hit by the IPIPE. I know I need that, and the last time I went through the menu
I couldn't find the thing!

I'll get this whole kernel configuration thing eventually. Thanks for your help.

Please Log in or Create an account to join the conversation.

More
18 Oct 2010 13:01 #4742 by pcnc1
Replied by pcnc1 on topic Re:Building a kernel
Much appreciated! I am on my way to check it out now. The other day I think I found where that
other page of instructions came from.

www.lara.unb.br/~phsantana/data/files/te...HowTo_RTAI_Linux.pdf

Looks very similar to me. But I haven't checked out your link yet. I can use all the help
I can get. So thank you.

Please Log in or Create an account to join the conversation.

More
23 Oct 2010 08:45 - 23 Oct 2010 11:55 #4809 by ewidance
Replied by ewidance on topic Re:Building a kernel
I'm also trying to build a kernel to solve my latency problems on Acer Travelmate 5720. I tried to on VESA graphics, and apply SMI issue modification. That did not solve my problems. So I tryed to build a custom kernel.

I've used the methodology detailled in www.lara.unb.br/~phsantana/data/files/te...HowTo_RTAI_Linux.pdf adapted to build on the latest RTAI patch.

Here's the adapted procedure for rtai-3.8.1, Kernel 2.6.32.20 :

Prerequisities :
su -
aptitude update && aptitude safe-upgrade
aptitude install \
kernel-package \
build-essential \
dh-make \
module-assistant \
ncurses-dev \
zlib1g-dev \
dh-kpatches \
fakeroot \
autoconf \
dctrl-tools

Download and decompress Kernel :
cd /usr/src
sudo wget ftp://kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.20.tar.gz
sudo tar xzf linux-2.6.32.20.tar.gz
sudo mv linux-2.6.32.20 linux-2.6.32.20-rtai
sudo ln -s linux-2.6.32.20-rtai linux

Get RTAI from repository :
cd /usr/src
cvs -d:pserver:anonymous@cvs.gna.org:/cvs/rtai co vulcano

Kernel Patch over RTAI
cd linux
sudo patch -p1 < ../vulcano/base/arch/x86/patches/hal-linux-2.6.32.20-x86-2.7-03.patch


Get kernel config :
cd /usr/src/linux
cp /boot/config-`uname -r`./.config

Modifiy it:
sudo make xconfig
And apply the folowing modifications :

    * Loadable module support —> Enable loadable module support —> enabled
    * Loadable module support —> Module versioning support —> disabled
    * Processor type and features —> Preemption Model —> Preemptible Kernel (Low-Latency Desktop)
    * Processor type and features —> Interrupt pipeline —> enabled
    * Processor type and features —> High Memory Support —> off
    * Power management options (ACPI, APM) —> Legacy Power Management API —> disabled
    * Power management options (ACPI, APM) —> Software Suspend —> disabled
    * Power management options (ACPI, APM) —> ACPI (Advanced Configuration and Power Interface) Support—> ACPI Support —> disabled
    * Power management options (ACPI, APM) —> APM (Advanced Power Management) BIOS Support —> APM BIOS Support —> disabled
    * Power management options (ACPI, APM) —> CPU Frequency scaling —> CPU Frequency scaling —> disabled
    * Power management options (ACPI, APM) —> Power Management support —> disabled 

    For non-SMP systems, disable symmetric multi-processing support;

    * Processor type and features —> Symmetric multi-processing support —> disabled 

    Choose the most suitable processor family for your machine. For example, for a Pentium-III processor;

    * Processor type and features —> Processor family —> Pentium-III / Celeron(Coppermine) / Pentium-III Xeon 

    If you have a dual cores CPU or SMP system, don’t choose a processor family which has no TSC (time stamp counter). This means that, for example, you can’t choose 586/K5/5x86/6x86/6x86MX as Processor family if you have a dual cores CPU. In con- clusion, choose the most suitable processor family for your machine.

Kernel compilation
time make-kpkg clean
time make-kpkg --initrd --append-to-version -rtai --revision r1 kernel_image kernel_headers kernel_source

Wait for hours...

Kernel install
cd /usr/src
dpkg -i linux-image-2.6.32.20-rtai.deb
dpkg -i linux-headers-2.6.32.20-rtai.deb

Reboot over the new installled kernel.... and that hangs. It apperars the initrd is not built in the previous process... I have no idea about the reason why the ramdisk is not generated, since the "--initrd' option is on the make-kpkg command line. Any suggestion?

To work around, i generated ramdisk with the commande :
update-initramfs -u -v -t -k 2.6.32.20-rtai

It booted up.

RTAI compilation
cd /usr/src/vulcano
make xconfig

Default config should be ok for emc2.Save and quit. Next, do :

make
make install
reboot

RTAI tests :
cd /usr/realtime/testsuite/user/latency; ./run
cd /usr/realtime/testsuite/user/preempt; ./run
cd /usr/realtime/testsuite/user/switches; ./run
cd /usr/realtime/testsuite/kern/latency; ./run
cd /usr/realtime/testsuite/kern/preempt; ./run
cd /usr/realtime/testsuite/kern/switches; ./run


Unfortunately, RTAI tests were not ok. Any idea about improvement?
Last edit: 23 Oct 2010 11:55 by ewidance.

Please Log in or Create an account to join the conversation.

More
24 Oct 2010 14:40 #4821 by pcnc1
Replied by pcnc1 on topic Re:Building a kernel
I'm no kernel building pro but I have found this method helpful in the process. I'll use one thing I needed as an example but you can use whatever you like.

cd /usr/src/linux

Be vague:
$ grep -i ipipe .config

Get specific results:
CONFIG_IPIPE=n

Use it:
$ find -type f -name Makefile | xargs grep CONFIG_IPIPE

./arch/x86/kernel/Makefile:obj-$(CONFIG_IPIPE) += ipipe.o

Then in menuconfig use / to bring up the search, paste in CONFIG_IPIPE

See how to get there then navigate over and use the help feature to see if it is
what you are looking for, want etc.

I never did get make xconfig to work here. Menuconfig is a bit better so that might not be such a bad thing. I hope this helps you out some. It sure has helped me!

I still need to go through it all again one more time. I missed this gizmo called "evdev" or something, oh well! I need to be persistent.

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum