> Hi all,
>
> I saw the discussion on chat two nights ago about building an SMP kernel
> with rtai. I tried to give it a shot to use with the Intel Atom 330, and 
> got
> to an error which I do not know how to resolve. I found these pages as
> references:
>
> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Debian_Lenny_Compile_RTAI
> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?RtaiSteps
> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BuildingUbuntuPackages

They are pretty ok, but it depends what you're after.

> And as I ran into problems, cobbled what I could from each of them.
>
> Currently I am running from Ubuntu 8.04 with the 2.6.26-generic kernel (no
> rtai at this point).

I am surprised you are running 2.6.26-generic on Hardy. I would expect that 
to be 2.6.24

> I was basically able to get all of the steps for building on Debian Lenny 
> to
> work down through 'make menuconfig' except that the CFLAGS_KERNEL value 
> was
> not recognized. I used the source for kernel version 2.6.22 because it was
> the latest version having a patch file from rtai. I wasn't sure whether
> 2.6.24 needed a patch file or not, so just to get the procedure down I
> decided to go with the latest version that did have a patch.

Since 2.6.24 the 2 architectures i386 and x86_64 have been merged into a 
single arch called x86.
You can fin rtai patches for newer kernels in arch/x86/..

> I also chose the "core2" as the processor family in make menuconfig.

I'm not sure that's right for Atom. Core2 refers to Core 2 or Core 2 Duo, 
which might be way different than a dual core Atom.

> The script make-kpkg did not exist on my system, so I went to the 
> rtai-steps
> documentation and was able to do a "make all", "make modules", "make
> bzImage" and "make modules install" (see below). mkinitrd was not found 
> but
> I saw that it has been replaced with mkinitramfs, which did appear to run
> properly.

If it doesn't exist, then you install it with "sudo apt-get install 
make-kpkg".
HOWEVER, the make-kpkg is the debian preffered way of building kernels, 
Ubuntu prefers to do it differently.
There is a Ubuntu wiki showing how kernels are to be built. (This assumes 
you want a distributable .deb package, if you only want to compile and 
install the kernel, then the "make menuconfig, make modules, make 
modules_install, make bzImage"-way is perfectly fine.
https://help.ubuntu.com/community/Kernel/Compile

> I then copied the necessary files to /boot and edited /boot/grub/menu.lst 
> to
> add a selection for the new kernel. The kernel starts to boot but first
> gives a warning "/lib/modules/2.6.22 no such file or directory", followed 
> by
> a fatal error, /lib/modules/2.6.22/modules.dep.temp could not open for
> writing.
>
> I went and checked for /lib/modules/2.6.22 and found that it did in fact 
> not
> exist. After rechecking the documentation I finally realized that there 
> was
> a problem in the print out I was working from, in that the "_" was not
> printed for "make modules_install", but "make modules install" ran without
> error.
>
> I ran the correct command and sure enough it did create what looks like a
> valid /lib/modules/2.6.22 folder with contents similar to those for the
> other installed kernels. I rebooted, and selected the new kernel, but am
> still getting that same error. The file permissions look the same, etc.
>
> Would any kernel guru out there happen to know why it might not be able to
> find or write to the /lib/modules/2.6.22 folder or files in those folders?
> There is no file modules.dep.temp, but there is modules.dep, which is
> consistent with the files associated with the other kernels.

One of the ideas is if the initrd doesn't hold modules which allow mounting 
your / partition.
Maybe you have some more errors in the scrollback..
If that's the case, you need to put together an initrd (make sure you pass 
the info how to load it from grub), or compile the needed bits into the 
kernel.

Regards,
Alex

PS: you're on a potential long and stressful journey. don't despair. after 
doing it 4-5 times you'll see it's quite "easy" 


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to