Skip to contentSkip to conversation

Xenomai kernel compile issue

Xenomai-help Gilles Chanteperdrix 2 participants 9 messages Sep 3, 2008 – Sep 6, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): C4E37C03.874%[email protected]

#1 lore raw
Quoted 6 lines · Sam Ferguson

Ok it must be a kernel patch issue. When I patched it initially it seemed to go through, it returned me to the terminal with no errors. So I tried to patch the kernel doing by running the script from xenomai. Here is what happens:

[email protected]$ scripts/prepare-kernel.sh

Please use the latest release of xenomai.

Quoted 6 lines

Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/lib/modules/2.6.24-19-generic/build
Target architecture [default i686]:
Adeos patch [default /dev/null]:
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p atch

If you are trying to patch a 2.6.24 kernel with the Adeos patch for 2.6.26, it will not work.

Please do not forget to CC the list.

Signature · 1 line
					    Gilles.
#2 lore raw

Ok, so I updated my kernel and tried again, the script doesn't error out but it also doesn't say that it finished. Here's what happens:

[email protected]$ sudo scripts/prepare-kernel.sh
Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/usr/src/linux-2.6.26.3
Target architecture [default i686]:
Adeos patch [default
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p
atch]: 
patching file Makefile
patching file arch/x86/Kconfig
patching file arch/x86/Makefile
patching file arch/x86/boot/Makefile
patching file arch/x86/boot/compressed/Makefile
patching file arch/x86/kernel/Makefile
patching file arch/x86/kernel/apic_32.c
patching file arch/x86/kernel/apic_64.c
patching file arch/x86/kernel/cpu/mtrr/cyrix.c
patching file arch/x86/kernel/cpu/mtrr/generic.c
patching file arch/x86/kernel/entry_32.S
patching file arch/x86/kernel/entry_64.S
patching file arch/x86/kernel/genapic_flat_64.c
patching file arch/x86/kernel/head64.c
patching file arch/x86/kernel/i8253.c
patching file arch/x86/kernel/i8259_32.c
patching file arch/x86/kernel/i8259_64.c
patching file arch/x86/kernel/io_apic_32.c
patching file arch/x86/kernel/io_apic_64.c
patching file arch/x86/kernel/ipi.c
patching file arch/x86/kernel/ipipe.c
patching file arch/x86/kernel/irq_32.c
patching file arch/x86/kernel/irq_64.c
patching file arch/x86/kernel/mcount_32.S
patching file arch/x86/kernel/mcount_64.S
patching file arch/x86/kernel/nmi_32.c
patching file arch/x86/kernel/nmi_64.c
patching file arch/x86/kernel/process.c
patching file arch/x86/kernel/process_32.c
patching file arch/x86/kernel/process_64.c
patching file arch/x86/kernel/setup64.c
patching file arch/x86/kernel/smp.c
patching file arch/x86/kernel/smpboot.c
patching file arch/x86/kernel/time_32.c
patching file arch/x86/kernel/tlb_32.c
patching file arch/x86/kernel/tlb_64.c
patching file arch/x86/kernel/traps_32.c
patching file arch/x86/kernel/traps_64.c
patching file arch/x86/kernel/vm86_32.c
patching file arch/x86/kernel/vsyscall_64.c
patching file arch/x86/lib/mmx_32.c
patching file arch/x86/lib/thunk_64.S
patching file arch/x86/mach-visws/visws_apic.c
patching file arch/x86/mm/fault.c
patching file drivers/pci/htirq.c
patching file drivers/serial/8250.c
patching file include/asm-generic/cmpxchg-local.h
patching file include/asm-x86/apic.h
patching file include/asm-x86/hw_irq_32.h
patching file include/asm-x86/hw_irq_64.h
patching file include/asm-x86/i8259.h
patching file include/asm-x86/ipi.h
patching file include/asm-x86/ipipe.h
patching file include/asm-x86/ipipe_32.h
patching file include/asm-x86/ipipe_64.h
patching file include/asm-x86/ipipe_base.h
patching file include/asm-x86/ipipe_base_32.h
patching file include/asm-x86/ipipe_base_64.h
patching file include/asm-x86/irqflags.h
patching file include/asm-x86/mmu_context_32.h
patching file include/asm-x86/mmu_context_64.h
patching file include/asm-x86/nmi.h
patching file include/asm-x86/processor.h
patching file include/asm-x86/system.h
patching file include/asm-x86/unistd_32.h
patching file include/asm-x86/unistd_64.h
patching file include/asm-x86/vsyscall.h
patching file include/linux/hardirq.h
patching file include/linux/ipipe.h
patching file include/linux/ipipe_base.h
patching file include/linux/ipipe_compat.h
patching file include/linux/ipipe_percpu.h
patching file include/linux/ipipe_tickdev.h
patching file include/linux/ipipe_trace.h
patching file include/linux/irq.h
patching file include/linux/kernel.h
patching file include/linux/linkage.h
patching file include/linux/mm.h
patching file include/linux/preempt.h
patching file include/linux/sched.h
patching file include/linux/spinlock.h
patching file include/linux/spinlock_types.h
patching file init/Kconfig
patching file init/main.c
patching file kernel/Makefile
patching file kernel/exit.c
patching file kernel/fork.c
patching file kernel/ipipe/Kconfig
patching file kernel/ipipe/Kconfig.debug
patching file kernel/ipipe/Makefile
patching file kernel/ipipe/core.c
patching file kernel/ipipe/tracer.c
patching file kernel/irq/chip.c
patching file kernel/irq/handle.c
patching file kernel/lockdep.c
patching file kernel/power/disk.c
patching file kernel/printk.c
patching file kernel/sched.c
patching file kernel/signal.c
patching file kernel/spinlock.c
patching file kernel/time/tick-common.c
patching file lib/Kconfig.debug
patching file lib/bust_spinlocks.c
patching file lib/ioremap.c
patching file lib/smp_processor_id.c
patching file lib/spinlock_debug.c
patching file mm/memory.c
Hunk #8 succeeded at 2953 (offset 10 lines).
patching file mm/mlock.c
Hunk #1 succeeded at 171 (offset -2 lines).
patching file mm/vmalloc.c
[email protected]$
Quoted 21 lines · Gilles Chanteperdrix
Quoted 6 lines · Sam Ferguson

Ok it must be a kernel patch issue. When I patched it initially it seemed to go through, it returned me to the terminal with no errors. So I tried to patch the kernel doing by running the script from xenomai. Here is what happens:

[email protected]$ scripts/prepare-kernel.sh

Please use the latest release of xenomai.

Quoted 6 lines

Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/lib/modules/2.6.24-19-generic/build
Target architecture [default i686]:
Adeos patch [default /dev/null]:
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p atch

If you are trying to patch a 2.6.24 kernel with the Adeos patch for 2.6.26, it will not work.

Please do not forget to CC the list.

#3 lore raw
Quoted 9 lines · Sam Ferguson

Ok, so I updated my kernel and tried again, the script doesn't error out but it also doesn't say that it finished. Here's what happens:

[email protected]$ sudo scripts/prepare-kernel.sh
Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/usr/src/linux-2.6.26.3
Target architecture [default i686]:
Adeos patch [default
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p
atch]: 

There was two suggestions in my post:
- please use the proper patch for the kernel version you are using, which you have followed;
- please use the latest revision in the 2.4.x branch, that is xenomai 2.4.5, which you have not followed;

But the important question is: does it compile now ?

Signature · 1 line
					    Gilles.
#4 lore raw
Quoted 11 lines · Gilles Chanteperdrix
Quoted 9 lines · Sam Ferguson

Ok, so I updated my kernel and tried again, the script doesn't error out but it also doesn't say that it finished. Here's what happens:

[email protected]$ sudo scripts/prepare-kernel.sh
Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/usr/src/linux-2.6.26.3
Target architecture [default i686]:
Adeos patch [default
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p
atch]: 
Quoted 1 line

There was two suggestions in my post:

There were, sorry.

Signature · 1 line
					    Gilles.
#5 lore raw
In reply to Gilles Chanteperdrix

No, I get the same error as before. Am I using the right patch? I have an HP laptop with an AMD chipset in it, should I be using i386 or x86. I've tried both now with the same problem as before. I start the script, then after 2 seconds it returns me to the terminal. I am now using xenomai-2.4.5 and linux-2.6.26.3 with no luck. Is there a log file generated from the prepare-kernel.sh script I can look at?

Quoted 18 lines · Gilles Chanteperdrix
Quoted 9 lines · Sam Ferguson

Ok, so I updated my kernel and tried again, the script doesn't error out but it also doesn't say that it finished. Here's what happens:

[email protected]$ sudo scripts/prepare-kernel.sh
Linux tree [default /lib/modules/2.6.24-19-generic/source]:
/usr/src/linux-2.6.26.3
Target architecture [default i686]:
Adeos patch [default
/usr/src/xenomai-2.4.4/ksrc/arch/x86/patches/adeos-ipipe-2.6.26-x86-2.0-09.p
atch]: 

There was two suggestions in my post:
- please use the proper patch for the kernel version you are using, which you have followed;
- please use the latest revision in the 2.4.x branch, that is xenomai 2.4.5, which you have not followed;

But the important question is: does it compile now ?

#6 lore raw
Quoted 2 lines · Sam Ferguson

No, I get the same error as before. Am I using the right patch? I have an HP laptop with an AMD chipset in it, should I be using i386 or x86. I've

i386 is the old branch, x86 the new one, so the one you should choose depends on the kernel version you are using. If you are using 2.6.26, you should definitely use x86.

Quoted 4 lines

tried both now with the same problem as before. I start the script, then after 2 seconds it returns me to the terminal. I am now using xenomai-2.4.5 and linux-2.6.26.3 with no luck. Is there a log file generated from the prepare-kernel.sh script I can look at?

You can run prepare-kernel --verbose to see a bit more what the script is doing.

But could you send me your .config file and the exact steps you follow in private so that I can try to reproduce your issue ?

Signature · 1 line
					    Gilles.
#7 lore raw
In reply to Sam Ferguson
Quoted 6 lines · Sam Ferguson

No, I get the same error as before. Am I using the right patch? I have an HP laptop with an AMD chipset in it, should I be using i386 or x86. I've tried both now with the same problem as before. I start the script, then after 2 seconds it returns me to the terminal. I am now using xenomai-2.4.5 and linux-2.6.26.3 with no luck. Is there a log file generated from the prepare-kernel.sh script I can look at?

Ok. Since I already had the .config you used, I did a small experiment. I created a temporary directory, went to it, copied your .config to it, then did:

tar -xvjf /home/gilles/files/downloads/xenomai-2.4.5.tar.bz2 tar -xvjf /home/gilles/files/downloads/linux-2.6.26.3.tar.bz2 ./xenomai-2.4.5/scripts/prepare-kernel.sh # Answered the questions here cd linux-2.6.26.3/
cp ../.config .
make ARCH=i386 oldconfig # Hit enter for all questions
make ARCH=i386

And the kernel compiled just fine. I had to use ARCH=i386, because I am compiling on an x86_64.

Signature · 1 line
					    Gilles.
#8 lore raw
Quoted 11 lines · Gilles Chanteperdrix
Quoted 6 lines · Sam Ferguson

No, I get the same error as before. Am I using the right patch? I have an HP laptop with an AMD chipset in it, should I be using i386 or x86. I've tried both now with the same problem as before. I start the script, then after 2 seconds it returns me to the terminal. I am now using xenomai-2.4.5 and linux-2.6.26.3 with no luck. Is there a log file generated from the prepare-kernel.sh script I can look at?

Ok. Since I already had the .config you used, I did a small experiment. I created a temporary directory, went to it, copied your .config to it, then did:

I did all this as a simple user, not as root. Never used sudo either.

Signature · 1 line
					    Gilles.
#9 lore raw
In reply to Sam Ferguson
Quoted 3 lines · Sam Ferguson

Ok, so I updated my kernel and tried again, the script doesn't error out but it also doesn't say that it finished. Here's what happens:

[email protected]$ sudo scripts/prepare-kernel.sh

And by the way: the only command which requires root privileges is "make install", all the rest can be done as a simple user.

Signature · 1 line
                                                 Gilles.