Ubuntu

Install RTAI on Ubuntu 11.10

Asked by sebastian incicco on 2012-01-24

Hi,
 i need install RTAI 3.8 on Ubuntu 11.10. (32 bits - i386)
Kernel Version: 3.0.0-13-generic
GCC and G++ version: 4.6.1

When compile the kernel with RTAI's patch (i've downloaded the version 2.6.28.9 of www.kernel.org) appear an error ---> for example, file "elf_i386" not found.

Do not know what else to do.
Thank you.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Last query:
2012-01-24
Last reply:
2012-02-09

Could report a bug

sudo -s
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.9.tar.bz2
tar xjvf linux-2.6.28.9.tar.bz2
ln -s linux-2.6.28.9 linux

cd /usr/src/linux
patch -p1 < /usr/src/rtai/base/arch/x86/patches/hal-linux-2.6.28.9-x86-2.2-07.patch

wget http://hart.sourceforge.net/files/config-2.6.28-rtai_i386
cp config-2.6.28-rtai_i386 .config

make menuconfig
make-kpkg clean

/////now run:
make-kpkg --initrd kernel_image kernel_headers kernel_source
/////and says (ERROR)

/usr/src/linux-2.6.28.9/arch/x86/include/asm/irq_regs_32.h: En la función ‘set_irq_regs’:
/usr/src/linux-2.6.28.9/arch/x86/include/asm/irq_regs_32.h:24:2: aviso: se define la variable ‘tmp__’ pero no se usa [-Wunused-but-set-variable]
  LD arch/x86/mach-default/built-in.o
  LD arch/x86/crypto/built-in.o
  LDS arch/x86/vdso/vdso32/vdso32.lds
  AS arch/x86/vdso/vdso32/note.o
  AS arch/x86/vdso/vdso32/int80.o
  VDSO arch/x86/vdso/vdso32-int80.so.dbg
gcc: error: elf_i386: No existe el archivo o el directorio
make[2]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
make[1]: *** [arch/x86/vdso] Error 2
make[1]: se sale del directorio «/usr/src/linux-2.6.28.9»
make: *** [debian/stamp/build/kernel] Error 2

/////then, in /usr/src/linux/arch/x86/VDSO/ i change in the makefile two lineas:
/////replace "-m elf_x86_64" by "-m64" on the line starting with VDSO_LDFLAGS_vdso.lds
/////replace "-m elf_x86" by "-m32" on the line starting with VDSO_LDFLAGS_vdso32.lds

///// And the new error is: (when run again make-kpkg --initrd kernel_image kernel_headers kernel_source )

To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN .version
  CHK include/linux/compile.h
  UPD include/linux/compile.h
  CC init/version.o
In file included from /usr/src/linux-2.6.28.9/arch/x86/include/asm/smp.h:13:0,
                 from include/linux/smp.h:30,
                 from include/linux/topology.h:33,
                 from include/linux/mmzone.h:763,
                 from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from init/version.c:10:
/usr/src/linux-2.6.28.9/arch/x86/include/asm/apic.h: En la función ‘native_apic_msr_read’:
/usr/src/linux-2.6.28.9/arch/x86/include/asm/apic.h:86:11: aviso: se define la variable ‘high’ pero no se usa [-Wunused-but-set-variable]
  LD init/built-in.o
  LD .tmp_vmlinux1
kernel/built-in.o: In function `mutex_unlock':
/usr/src/linux/kernel/mutex.c:118: undefined reference to `__mutex_unlock_slowpath'
kernel/built-in.o: In function `mutex_lock':
/usr/src/linux/kernel/mutex.c:93: undefined reference to `__mutex_lock_slowpath'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: se sale del directorio «/usr/src/linux-2.6.28.9»
make: *** [debian/stamp/build/kernel] Error 2

////thank you, since Buenos Aires

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.