3.14 Xenomai Kernel

Has anyone worked on getting a 3.14 kernel for the BeagleBone patched
with Xenomai support?

It looks like the Xenomai folks have settled on 3.14.17, but the
BeagleBone ti kernel looks to be up to 3.14.26-ti-r39:

https://github.com/beagleboard/linux/tree/3.14.19-ti-r30

...with lots of recent jumps (3.14.25, 3.14.24, 3.14.23, 3.14.22, and
3.14.19, all in the last two months!).

What's the plan for the 3.14 kernel version from the BeagleBone side?

Hi Charles,

Well, let's see if we can carve Xenomai's kernel patchset into the
patchset by default..

Right now i'm keeping bb.org's 3.14 in sync with:

http://git.ti.com/gitweb/?p=ti-linux-kernel/ti-linux-kernel.git;a=shortlog;h=refs/heads/ti-linux-3.14.y

The current mainline (v3.14.26) to ti delta is:

https://github.com/RobertCNelson/linux-stable-rcn-ee/compare/356a3e1fde11190febb8ace3cdab8694848ed220...9489c8bb9d4fbb15fba8b0d8b58dce012e8b4e14

"most" of these are actually cherry-picks from mainline (or mainline
development) so it's not as crazy as it looks...

Regards,

What's the plan for the 3.14 kernel version from the BeagleBone side?

Hi Charles,

Well, let's see if we can carve Xenomai's kernel patchset into the
patchset by default..

What does this mean exactly? Are you offering to maintain a Xenomai
patched kernel for the 'Bone?!? Or do you mean I should try applying
the Xenomai patches to the latest 3.14.26-ti-r30 kernel?

Right now i'm keeping bb.org's 3.14 in sync with:

Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel.git/shortlog

The current mainline (v3.14.26) to ti delta is:

https://github.com/RobertCNelson/linux-stable-rcn-ee/compare/356a3e1fde11190febb8ace3cdab8694848ed220...9489c8bb9d4fbb15fba8b0d8b58dce012e8b4e14

"most" of these are actually cherry-picks from mainline (or mainline
development) so it's not as crazy as it looks...

What, it's only 2,471 patches! <whew!>

Which repo/tag is there master for v3.14.x?

http://git.xenomai.org/

Regards,

Pretty much yeah. :wink:

Regards,

The latest ipipe patch for 3.14 can be found in the ipipe-3.14 branch of
the ipipe repo:

http://git.xenomai.org/ipipe.git/log/?h=ipipe-3.14

...according to:

http://xenomai.org/getting-the-i-pipe-patch/

There are occasionally newer versions in some of the developer repos,
but I think the 3.14 stuff has been around long enough it's in the main
ipipe repo branches.

Wow!

My wife will love you because now I don't need anything else for
Christmas! :slight_smile:

<fingers crossed this actually works out!>

THANKS!

There's only a couple conflicts. :wink:

From git://git.xenomai.org/ipipe
* branch ipipe-3.14 -> FETCH_HEAD
Auto-merging mm/mmap.c
Auto-merging mm/memory.c
Auto-merging kernel/trace/ring_buffer.c
Auto-merging kernel/sched/core.c
Auto-merging kernel/power/hibernate.c
Auto-merging kernel/fork.c
Auto-merging kernel/debug/debug_core.c
Auto-merging init/Kconfig
Auto-merging include/linux/sched.h
Auto-merging include/linux/clocksource.h
Auto-merging fs/exec.c
CONFLICT (content): Merge conflict in fs/exec.c
Auto-merging drivers/tty/serial/8250/8250_core.c
Auto-merging drivers/irqchip/irq-gic.c
Auto-merging drivers/gpio/gpio-omap.c
CONFLICT (content): Merge conflict in drivers/gpio/gpio-omap.c
Auto-merging arch/x86/kvm/x86.c
CONFLICT (content): Merge conflict in arch/x86/kvm/x86.c
Auto-merging arch/x86/kvm/vmx.c
Auto-merging arch/x86/kvm/svm.c
Auto-merging arch/x86/kernel/xsave.c
Auto-merging arch/x86/kernel/vsyscall_64.c
Auto-merging arch/x86/kernel/tsc.c
Auto-merging arch/x86/kernel/traps.c
Auto-merging arch/x86/kernel/smpboot.c
Auto-merging arch/x86/kernel/ptrace.c
Auto-merging arch/x86/kernel/entry_64.S
CONFLICT (content): Merge conflict in arch/x86/kernel/entry_64.S
Auto-merging arch/x86/kernel/dumpstack_64.c
Auto-merging arch/x86/kernel/cpu/common.c
Auto-merging arch/x86/kernel/apic/apic.c
Auto-merging arch/x86/include/asm/traps.h
Auto-merging arch/x86/include/asm/thread_info.h
Auto-merging arch/x86/include/asm/page_64_types.h
Auto-merging arch/x86/ia32/ia32entry.S
Auto-merging arch/x86/Kconfig
Auto-merging arch/powerpc/platforms/pseries/lpar.c
Auto-merging arch/powerpc/mm/hash_native_64.c
Auto-merging arch/powerpc/Kconfig
Auto-merging arch/arm/mm/proc-xscale.S
Auto-merging arch/arm/mm/alignment.c
Auto-merging arch/arm/mm/Kconfig
Auto-merging arch/arm/mach-omap2/timer.c
CONFLICT (content): Merge conflict in arch/arm/mach-omap2/timer.c
Auto-merging arch/arm/mach-omap2/prm_common.c
Auto-merging arch/arm/mach-omap2/pm44xx.c
Auto-merging arch/arm/mach-omap2/pm34xx.c
Auto-merging arch/arm/mach-omap2/omap4-common.c
Auto-merging arch/arm/mach-omap2/omap-wakeupgen.c
Auto-merging arch/arm/mach-omap2/io.c
Auto-merging arch/arm/mach-omap2/gpmc.c
Auto-merging arch/arm/mach-at91/clock.c
Auto-merging arch/arm/kernel/traps.c
Auto-merging arch/arm/kernel/process.c
Auto-merging arch/arm/include/uapi/asm/unistd.h
CONFLICT (content): Merge conflict in arch/arm/include/uapi/asm/unistd.h
Auto-merging arch/arm/include/asm/thread_info.h
CONFLICT (content): Merge conflict in arch/arm/include/asm/thread_info.h
Auto-merging arch/arm/boot/dts/omap4.dtsi
Auto-merging arch/arm/boot/compressed/head.S
Auto-merging arch/arm/Kconfig
Automatic merge failed; fix conflicts and then commit the result.

I'll cutt a raw diff and use that for a branch
"ti-linux-xenomai-3.14.y" on
https://github.com/RobertCNelson/ti-linux-kernel-dev

Regards,

<fingers crossed this actually works out!>

There's only a couple conflicts. :wink:

<snip>

I'll cutt a raw diff and use that for a branch
"ti-linux-xenomai-3.14.y" on
GitHub - RobertCNelson/ti-linux-kernel-dev: vendor bsp...

With any luck, they're as simple as the 3.8.13 conflict (one patch
didn't apply because some #include lines were removed at the top of the
file). I crafted a pre/post patch set to keep the Xenomai kernel patch
script happy and haven't had to mess with it since.

With the -ti kernel being mostly mainline (closer to mainline than the
3.8.13 kernel probably), it hopefully won't take too much massaging.
Let me know if I can help.

First pass pushed:

https://github.com/RobertCNelson/ti-linux-kernel-dev/commit/213ddbfb8b35e7e926d7f9c44ba5b0178aa8d5a2

It's still building here, most of the conflicts where in x86, so i
cheated and just disabled ipipe on x86 and ignored those.

There was one irq change on omap-gpio (this is where ti changed it a
lot) so that "might" not work...

Regards,

Yeap dies on compiling omap-gpio.. :wink: I'll have to dig into that section more..

Regards,

Well it booted...

http://paste.debian.net/135519/

Not 100% happy..

[ 2.259383] Switched to clocksource ipipe_tsc
[ 2.269424]
[ 2.269449] =================================
[ 2.269458] [ INFO: inconsistent lock state ]
[ 2.269472] 3.14.26-ti-xenomai-r39.1 #1 Not tainted
[ 2.269480] ---------------------------------
[ 2.269489] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 2.269500] swapper/0/1 [HC0[0]:SC1[1]:HE0:SE0] takes:
[ 2.269510] (&std_spinlock(&zone->lock)->rlock){+.?...}, at:
[<c010503c>] free_one_page+0x30/0x2d0
[ 2.269566] {SOFTIRQ-ON-W} state was registered at:
[ 2.269575] [<c00925d8>] trace_hardirqs_on_caller+0x150/0x1f0
[ 2.269595] [<c009268c>] trace_hardirqs_on+0x14/0x18
[ 2.269608] [<c08b6b74>] __ipipe_fast_svc_irq_exit+0x4/0x14
[ 2.269625] [<c08b5b54>] _raw_spin_lock+0x4c/0x54
[ 2.269650] [<c010503c>] free_one_page+0x30/0x2d0
[ 2.269663] [<c0106478>] free_hot_cold_page+0x15c/0x164
[ 2.269677] [<c01064e4>] __free_pages+0x64/0x68
[ 2.269691] [<c0106944>] free_contig_range+0x70/0xb8
[ 2.269704] [<c0106c84>] alloc_contig_range+0x2f8/0x328
[ 2.269718] [<c05704fc>] dma_alloc_from_contiguous+0xa0/0x1f4
[ 2.269740] [<c001bf84>] __alloc_from_contiguous+0x38/0x12c
[ 2.269767] [<c0c2240c>] atomic_pool_init+0x84/0x124
[ 2.269789] [<c0008b34>] do_one_initcall+0x100/0x1b4
[ 2.269804] [<c0c1cd60>] kernel_init_freeable+0x148/0x1ec
[ 2.269817] [<c08a6d68>] kernel_init+0x18/0xf0
[ 2.269838] [<c000f880>] ret_from_fork+0x18/0x38
[ 2.269858] irq event stamp: 223980
[ 2.269866] hardirqs last enabled at (223979): [<c0104904>]
free_pages_prepare+0x140/0x204
[ 2.269881] hardirqs last disabled at (223980): [<c01052fc>]
__free_pages_ok.part.65+0x20/0xa0
[ 2.269896] softirqs last enabled at (223456): [<c0049f08>]
__do_softirq+0x25c/0x3d4
[ 2.269919] softirqs last disabled at (223950): [<c004a3b0>]
irq_exit+0xd0/0x10c

Regards,