Skip to contentSkip to conversation

Xenomai on i.MX28 failure

Xenomai Gilles Chanteperdrix 1 participant 5 messages Jul 5, 2013 – Jul 29, 2013 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 14 lines · Marek Vasut

Hello,

I attempted to use xenomai on i.MX28-based board, but unfortunatelly failed so far. I use mainline Linux 3.8.2 on the board with no additional patches, therefore I did:

git clone git://git.xenomai.org/xenomai-2.6.git

To retrieve xenomai-2.6/master . Then I went on to patch the Linux kernel source:

./scripts/prepare-kernel.sh --linux=../linux-stable -- ipipe=ksrc/arch/arm/patches/ipipe-core-3.8-arm-1.patch --arch=arm

Quoted 7 lines

Next I ran "make oldconfig" in the kernel tree. I enabled XENOMAI and left the newly added configuration options at their default values.

After compiling the kernel, the kernel does not boot on the board anymore, while the kernel did boot before patching without problems.

Can you please give me any pointers or ideas on how to progress ?

Try:
http://xenomai.org/index.php/I-pipe-core:ArmPorting

Signature · 1 line
                                                                Gilles.
#3 lore raw
In reply to a message not in the archive
Quoted 24 lines · Marek Vasut

Dear Gilles Chanteperdrix,

Quoted 22 lines · Marek Vasut
Quoted 21 lines

Hello,

I attempted to use xenomai on i.MX28-based board, but unfortunatelly failed so far. I use mainline Linux 3.8.2 on the board with no additional patches,

therefore I did:
git clone git://git.xenomai.org/xenomai-2.6.git

To retrieve xenomai-2.6/master . Then I went on to patch the Linux kernel source:

./scripts/prepare-kernel.sh --linux=../linux-stable -- ipipe=ksrc/arch/arm/patches/ipipe-core-3.8-arm-1.patch --arch=arm

Next I ran "make oldconfig" in the kernel tree. I enabled XENOMAI and left the newly added configuration options at their default values.

After compiling the kernel, the kernel does not boot on the board anymore, while the kernel did boot before patching without problems.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Can you please give me any pointers or ideas on how to progress ?

Try:
http://xenomai.org/index.php/I-pipe-core:ArmPorting

Thanks! The earlyprintk really helped, now I see this output [1] . I suspect it's something going on with the ipipe since I see icoll crashing. Can you please help me some more on where to look from now on or how to fix this?

Try enabling the I-pipe tracer, and the option which causes a trace freeze on bug. And see how you reach the point of the BUG, the one at kernel/posix-timers.c. Looking at the code where the bug is should help in understanding what happens too.

Signature · 1 line
                                                                Gilles.
#4 lore raw
In reply to a message not in the archive
Quoted 24 lines · Marek Vasut

Dear Gilles Chanteperdrix,

Quoted 22 lines · Marek Vasut
Quoted 21 lines

Hello,

I attempted to use xenomai on i.MX28-based board, but unfortunatelly failed so far. I use mainline Linux 3.8.2 on the board with no additional patches,

therefore I did:
git clone git://git.xenomai.org/xenomai-2.6.git

To retrieve xenomai-2.6/master . Then I went on to patch the Linux kernel source:

./scripts/prepare-kernel.sh --linux=../linux-stable -- ipipe=ksrc/arch/arm/patches/ipipe-core-3.8-arm-1.patch --arch=arm

Next I ran "make oldconfig" in the kernel tree. I enabled XENOMAI and left the newly added configuration options at their default values.

After compiling the kernel, the kernel does not boot on the board anymore, while the kernel did boot before patching without problems.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Can you please give me any pointers or ideas on how to progress ?

Try:
http://xenomai.org/index.php/I-pipe-core:ArmPorting

Thanks! The earlyprintk really helped, now I see this output [1] . I suspect it's something going on with the ipipe since I see icoll crashing. Can you please help me some more on where to look from now on or how to fix this?

Sorry, the bug is obvious, icoll_handle_irq should not call handle_IRQ, but handle_multi_irq, as explained here:

http://xenomai.org/index.php/I-pipe-core:ArmPorting#CONFIG_MULTI_IRQ_HANDLER

Signature · 1 line
                                                                Gilles.
#5 lore raw
In reply to a message not in the archive
Quoted 24 lines · Marek Vasut

Dear Gilles Chanteperdrix,

Quoted 22 lines · Marek Vasut
Quoted 21 lines

Hello,

I attempted to use xenomai on i.MX28-based board, but unfortunatelly failed so far. I use mainline Linux 3.8.2 on the board with no additional patches,

therefore I did:
git clone git://git.xenomai.org/xenomai-2.6.git

To retrieve xenomai-2.6/master . Then I went on to patch the Linux kernel source:

./scripts/prepare-kernel.sh --linux=../linux-stable -- ipipe=ksrc/arch/arm/patches/ipipe-core-3.8-arm-1.patch --arch=arm

Next I ran "make oldconfig" in the kernel tree. I enabled XENOMAI and left the newly added configuration options at their default values.

After compiling the kernel, the kernel does not boot on the board anymore, while the kernel did boot before patching without problems.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Can you please give me any pointers or ideas on how to progress ?

Try:
http://xenomai.org/index.php/I-pipe-core:ArmPorting

Thanks! The earlyprintk really helped, now I see this output [1] . I suspect it's something going on with the ipipe since I see icoll crashing. Can you please help me some more on where to look from now on or how to fix this?

Please try the following patch:

arch/arm/mach-mxs/icoll.c +1 -1
index 905f267..9bc9c21 100644
@@ -92,7 +92,7 @@ asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
 		if (irqnr != 0x7f) {
 			__raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
 			irqnr = irq_find_mapping(icoll_domain, irqnr);
-			handle_IRQ(irqnr, regs);
+			ipipe_handle_multi_irq(irqnr, regs);
 			continue;
 		}
 		break;
Signature · 1 line
                                                                Gilles.
#7 lore raw
In reply to a message not in the archive
Quoted 39 lines · Marek Vasut

Hi Gilles,

Quoted 37 lines · Marek Vasut
Quoted 26 lines

Dear Gilles Chanteperdrix,

Quoted 24 lines · Marek Vasut
Quoted 22 lines

Hello,

I attempted to use xenomai on i.MX28-based board, but unfortunatelly failed so far. I use mainline Linux 3.8.2 on the board with no additional patches,

therefore I did:
git clone git://git.xenomai.org/xenomai-2.6.git

To retrieve xenomai-2.6/master . Then I went on to patch the Linux kernel source:

./scripts/prepare-kernel.sh --linux=../linux-stable -- ipipe=ksrc/arch/arm/patches/ipipe-core-3.8-arm-1.patch --arch=arm

Next I ran "make oldconfig" in the kernel tree. I enabled XENOMAI and left the newly added configuration options at their default values.

After compiling the kernel, the kernel does not boot on the board anymore, while the kernel did boot before patching without problems.

Can you please give me any pointers or ideas on how to progress ?

Quoted 7 lines
Quoted 2 lines

Try:
http://xenomai.org/index.php/I-pipe-core:ArmPorting

Thanks! The earlyprintk really helped, now I see this output [1] . I suspect it's something going on with the ipipe since I see icoll crashing. Can you please help me some more on where to look from now on or how to fix this?

Please try the following patch:

Quoted 15 lines

arch/arm/mach-mxs/icoll.c asmlinkage void __exception_irq_entry · line 98

Quoted 13 lines
arch/arm/mach-mxs/icoll.c +1 -1
index 905f267..9bc9c21 100644
@@ -92,7 +92,7 @@ asmlinkage void __exception_irq_entry
 icoll_handle_irq(struct pt_regs *regs) if (irqnr != 0x7f) {
  			__raw_writel(irqnr, icoll_base + HW_ICOLL_VECTOR);
  			irqnr = irq_find_mapping(icoll_domain, irqnr);
-			handle_IRQ(irqnr, regs);
+			ipipe_handle_multi_irq(irqnr, regs);
  			continue;
  		}
  		break;

Did you possibly apply this fix to mainline xenomai please ?

It is already applied (but to the I-pipe patch, not to xenomai).

Signature · 1 line
                                                                Gilles.