All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Building BeagleBone kernel from git
@ 2013-08-20 14:58 Charles Steinkuehler
  2013-08-20 18:39 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-20 14:58 UTC (permalink / raw)
  To: xenomai

I am currently working with LinuxCNC in a xenomai real-time environment
on the BeagleBone:

http://bb-lcnc.blogspot.com/p/machinekit_16.html

Everything is working well, but the kernel is being built using an
out-of-tree patch set obtained by Michael Haberler.

I would like to switch to using a more 'official' xenomai build from
git, but am unclear how to proceed.

Which git repository/branch would be the most appropriate for use in
building a xenomai kernel for the BeagleBone / AM335x SoC?

Are there any 'gotchas' when using xenomai from git, or do the
instructions and procedures for using a released version apply?

Thanks!

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130820/87917f8e/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 14:58 [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
@ 2013-08-20 18:39 ` Gilles Chanteperdrix
  2013-08-20 18:45   ` Sagar Behere
  2013-08-20 19:49   ` Charles Steinkuehler
  0 siblings, 2 replies; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-20 18:39 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
> I am currently working with LinuxCNC in a xenomai real-time environment
> on the BeagleBone:
> 
> http://bb-lcnc.blogspot.com/p/machinekit_16.html
> 
> Everything is working well, but the kernel is being built using an
> out-of-tree patch set obtained by Michael Haberler.
> 
> I would like to switch to using a more 'official' xenomai build from
> git, but am unclear how to proceed.
> 
> Which git repository/branch would be the most appropriate for use in
> building a xenomai kernel for the BeagleBone / AM335x SoC?
> 
> Are there any 'gotchas' when using xenomai from git, or do the
> instructions and procedures for using a released version apply?

You can use kernel from the I-pipe git at:
git://git.xenomai.org/ipipe.git branch ipipe-3.8

And xenomai from the xenomai 2.6 git at:
git://git.xenomai.org/xenomai-2.6.git branch master

The only difference in the installation procedure when using this kernel
with this version of Xenomai is that the "prepare-kernel.sh" script will
not apply the I-pipe patch to the kernel, since the kernel is already
patched, so the argument to the "--adeos" parameter of prepare-kernel.sh
is ignored.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 18:39 ` Gilles Chanteperdrix
@ 2013-08-20 18:45   ` Sagar Behere
  2013-08-21  5:53     ` Michael Haberler
  2013-08-20 19:49   ` Charles Steinkuehler
  1 sibling, 1 reply; 24+ messages in thread
From: Sagar Behere @ 2013-08-20 18:45 UTC (permalink / raw)
  To: xenomai

On 08/20/2013 08:39 PM, Gilles Chanteperdrix wrote:
> On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
>> I am currently working with LinuxCNC in a xenomai real-time environment
>> on the BeagleBone:
>>
>> http://bb-lcnc.blogspot.com/p/machinekit_16.html
>>
>> Everything is working well, but the kernel is being built using an
>> out-of-tree patch set obtained by Michael Haberler.
>>
>> I would like to switch to using a more 'official' xenomai build from
>> git, but am unclear how to proceed.
>>
>> Which git repository/branch would be the most appropriate for use in
>> building a xenomai kernel for the BeagleBone / AM335x SoC?
>>
>> Are there any 'gotchas' when using xenomai from git, or do the
>> instructions and procedures for using a released version apply?
>
> You can use kernel from the I-pipe git at:
> git://git.xenomai.org/ipipe.git branch ipipe-3.8
>
> And xenomai from the xenomai 2.6 git at:
> git://git.xenomai.org/xenomai-2.6.git branch master
>
> The only difference in the installation procedure when using this kernel
> with this version of Xenomai is that the "prepare-kernel.sh" script will
> not apply the I-pipe patch to the kernel, since the kernel is already
> patched, so the argument to the "--adeos" parameter of prepare-kernel.sh
> is ignored.

For what it's worth, I tried this procedure and documented it

https://github.com/sagarbehere/beaglebone-xenomai/blob/master/beaglebone-xenomai-debian.md

I used the for-upstream/3.8 branch, but it should be similar for the 
ipipe-3.8 branch.

If you improve upon the procedure, please let me know and I will update 
the document accordingly, or fork it and send me a pull request :)

Regards,
Sagar


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 18:39 ` Gilles Chanteperdrix
  2013-08-20 18:45   ` Sagar Behere
@ 2013-08-20 19:49   ` Charles Steinkuehler
  2013-08-20 19:55     ` Gilles Chanteperdrix
  1 sibling, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-20 19:49 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/20/2013 1:39 PM, Gilles Chanteperdrix wrote:
> On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
>> I am currently working with LinuxCNC in a xenomai real-time environment
>> on the BeagleBone:
>>
>> http://bb-lcnc.blogspot.com/p/machinekit_16.html
>>
>> Everything is working well, but the kernel is being built using an
>> out-of-tree patch set obtained by Michael Haberler.
>>
>> I would like to switch to using a more 'official' xenomai build from
>> git, but am unclear how to proceed.
>>
>> Which git repository/branch would be the most appropriate for use in
>> building a xenomai kernel for the BeagleBone / AM335x SoC?
>>
>> Are there any 'gotchas' when using xenomai from git, or do the
>> instructions and procedures for using a released version apply?
> 
> You can use kernel from the I-pipe git at:
> git://git.xenomai.org/ipipe.git branch ipipe-3.8

Thanks!  I wasn't sure if I could use one of the ipipe branches or if I
still needed to use one of the personal branches.

> And xenomai from the xenomai 2.6 git at:
> git://git.xenomai.org/xenomai-2.6.git branch master
> 
> The only difference in the installation procedure when using this kernel
> with this version of Xenomai is that the "prepare-kernel.sh" script will
> not apply the I-pipe patch to the kernel, since the kernel is already
> patched, so the argument to the "--adeos" parameter of prepare-kernel.sh
> is ignored.

OK, stupid question:

I see the ipipe branch has the kernel source, but I need to apply the
patches to a non-stock kernel (ie: a mainline 3.8.13 kernel patched with
the BeagleBone patch set).  Is there a way to get the prepare-kernel.sh
script and/or a patch set to apply to a mainline kernel out of the ipipe
git branch?

Sorry if this is a total newbie question, but I see instructions for
using the prepare-kernel.sh script on a kernel directory, and
instructions for using the ipipe kernel source directly, but not how to
get from one to the other.

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130820/699186d4/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 19:49   ` Charles Steinkuehler
@ 2013-08-20 19:55     ` Gilles Chanteperdrix
  2013-08-20 20:25       ` Charles Steinkuehler
  0 siblings, 1 reply; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-20 19:55 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
> On 8/20/2013 1:39 PM, Gilles Chanteperdrix wrote:
>> On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
>>> I am currently working with LinuxCNC in a xenomai real-time
>>> environment on the BeagleBone:
>>> 
>>> http://bb-lcnc.blogspot.com/p/machinekit_16.html
>>> 
>>> Everything is working well, but the kernel is being built using
>>> an out-of-tree patch set obtained by Michael Haberler.
>>> 
>>> I would like to switch to using a more 'official' xenomai build
>>> from git, but am unclear how to proceed.
>>> 
>>> Which git repository/branch would be the most appropriate for
>>> use in building a xenomai kernel for the BeagleBone / AM335x
>>> SoC?
>>> 
>>> Are there any 'gotchas' when using xenomai from git, or do the 
>>> instructions and procedures for using a released version
>>> apply?
>> 
>> You can use kernel from the I-pipe git at: 
>> git://git.xenomai.org/ipipe.git branch ipipe-3.8
> 
> Thanks!  I wasn't sure if I could use one of the ipipe branches or
> if I still needed to use one of the personal branches.
> 
>> And xenomai from the xenomai 2.6 git at: 
>> git://git.xenomai.org/xenomai-2.6.git branch master
>> 
>> The only difference in the installation procedure when using this
>> kernel with this version of Xenomai is that the
>> "prepare-kernel.sh" script will not apply the I-pipe patch to the
>> kernel, since the kernel is already patched, so the argument to
>> the "--adeos" parameter of prepare-kernel.sh is ignored.
> 
> OK, stupid question:
> 
> I see the ipipe branch has the kernel source, but I need to apply
> the patches to a non-stock kernel (ie: a mainline 3.8.13 kernel
> patched with the BeagleBone patch set).  Is there a way to get the
> prepare-kernel.sh script and/or a patch set to apply to a mainline
> kernel out of the ipipe git branch?
> 
> Sorry if this is a total newbie question, but I see instructions
> for using the prepare-kernel.sh script on a kernel directory, and 
> instructions for using the ipipe kernel source directly, but not
> how to get from one to the other.
> 
You want the I-pipe patch. To generate it, in the I-pipe tree, try:

./scripts/ipipe/genpatches.sh

You should then find a file ipipe-core-3.8.13-arm-1.patch which you
can try and apply to another tree, possibly additionally patching with
pre and post patches (respectively before and after the I-pipe patch).

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 19:55     ` Gilles Chanteperdrix
@ 2013-08-20 20:25       ` Charles Steinkuehler
  2013-08-20 22:37         ` Charles Steinkuehler
  2013-08-21 13:16         ` [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
  0 siblings, 2 replies; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-20 20:25 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>> Sorry if this is a total newbie question, but I see instructions
>> for using the prepare-kernel.sh script on a kernel directory, and 
>> instructions for using the ipipe kernel source directly, but not
>> how to get from one to the other.
>>
> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
> 
> ./scripts/ipipe/genpatches.sh
> 
> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
> can try and apply to another tree, possibly additionally patching with
> pre and post patches (respectively before and after the I-pipe patch).

Yep, that sounds like exactly what I want!  Thanks for the help!!

I'll report back if I run into more issues or if everything works out
OK.  I am trying to integrate the xenomai patches into a customized
version of Robert C. Nelson's BeagleBone kernel build scripts:

https://github.com/cdsteinkuehler/linux-dev

...to go along with the automatic Debian rootfs and SD card image
creation I already have working:

https://github.com/cdsteinkuehler/omap-image-builder

Thanks again!!!  :)

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130820/031b55b3/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 20:25       ` Charles Steinkuehler
@ 2013-08-20 22:37         ` Charles Steinkuehler
  2013-08-20 23:12           ` Gilles Chanteperdrix
  2013-08-21 13:16         ` [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
  1 sibling, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-20 22:37 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>
>> ./scripts/ipipe/genpatches.sh
>>
>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>> can try and apply to another tree, possibly additionally patching with
>> pre and post patches (respectively before and after the I-pipe patch).
> 
> Yep, that sounds like exactly what I want!  Thanks for the help!!
> 
> I'll report back if I run into more issues or if everything works out
> OK.  I am trying to integrate the xenomai patches into a customized
> version of Robert C. Nelson's BeagleBone kernel build scripts:

Problem #1 (solved):
The genpatches.sh script calls awk, but seems to be incompatible with
the stock awk (mawk) on my Debian Wheezy system.  I was getting errors
on all the match ($0, ...) lines until I installed gawk:

charles@machinekit:~/linux-dev/XENOMAI$ ./scripts/ipipe/genpatches.sh
reference: v3.8.13, kernel version: 3.8.13
awk: line 40: syntax error at or near ,
awk: line 48: syntax error at or near ,
awk: line 76: syntax error at or near ,

charles@machinekit:~/linux-dev/XENOMAI$ sudo aptitude install gawk

charles@machinekit:~/linux-dev/XENOMAI$ ./scripts/ipipe/genpatches.sh
reference: v3.8.13, kernel version: 3.8.13
ipipe-core-3.8.13-powerpc-1.patch
ipipe-core-3.8.13-arm-1.patch
ipipe-core-3.8.13-x86-1.patch
ipipe-core-3.8.13-blackfin-1.patch

...continuing on down the yellow brick road...
:)

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130820/34146985/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 22:37         ` Charles Steinkuehler
@ 2013-08-20 23:12           ` Gilles Chanteperdrix
  2013-08-21 22:15             ` [Xenomai] [PATCH] Fix for awk vs. gawk Charles Steinkuehler
  0 siblings, 1 reply; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-20 23:12 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/21/2013 12:37 AM, Charles Steinkuehler wrote:
> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>> You want the I-pipe patch. To generate it, in the I-pipe tree,
>>> try:
>>> 
>>> ./scripts/ipipe/genpatches.sh
>>> 
>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which
>>> you can try and apply to another tree, possibly additionally
>>> patching with pre and post patches (respectively before and
>>> after the I-pipe patch).
>> 
>> Yep, that sounds like exactly what I want!  Thanks for the
>> help!!
>> 
>> I'll report back if I run into more issues or if everything works
>> out OK.  I am trying to integrate the xenomai patches into a
>> customized version of Robert C. Nelson's BeagleBone kernel build
>> scripts:
> 
> Problem #1 (solved): The genpatches.sh script calls awk, but seems
> to be incompatible with the stock awk (mawk) on my Debian Wheezy
> system.  I was getting errors on all the match ($0, ...) lines
> until I installed gawk:

I knew that, sorry for not mentioning it. And by the way, if you know
how to rewrite this in portable awk, patches are welcome.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 18:45   ` Sagar Behere
@ 2013-08-21  5:53     ` Michael Haberler
  2013-08-21  8:45       ` Jan Kiszka
  0 siblings, 1 reply; 24+ messages in thread
From: Michael Haberler @ 2013-08-21  5:53 UTC (permalink / raw)
  To: xenomai


Am 20.08.2013 um 20:45 schrieb Sagar Behere <sagar.behere@gmail.com>:

> On 08/20/2013 08:39 PM, Gilles Chanteperdrix wrote:
>> On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
>>> I am currently working with LinuxCNC in a xenomai real-time environment
>>> on the BeagleBone:
>>> 
>>> http://bb-lcnc.blogspot.com/p/machinekit_16.html
>>> 
>>> Everything is working well, but the kernel is being built using an
>>> out-of-tree patch set obtained by Michael Haberler.
>>> 
>>> I would like to switch to using a more 'official' xenomai build from
>>> git, but am unclear how to proceed.
>>> 
>>> Which git repository/branch would be the most appropriate for use in
>>> building a xenomai kernel for the BeagleBone / AM335x SoC?
>>> 
>>> Are there any 'gotchas' when using xenomai from git, or do the
>>> instructions and procedures for using a released version apply?
>> 
>> You can use kernel from the I-pipe git at:
>> git://git.xenomai.org/ipipe.git branch ipipe-3.8
>> 
>> And xenomai from the xenomai 2.6 git at:
>> git://git.xenomai.org/xenomai-2.6.git branch master
>> 
>> The only difference in the installation procedure when using this kernel
>> with this version of Xenomai is that the "prepare-kernel.sh" script will
>> not apply the I-pipe patch to the kernel, since the kernel is already
>> patched, so the argument to the "--adeos" parameter of prepare-kernel.sh
>> is ignored.
> 
> For what it's worth, I tried this procedure and documented it
> 
> https://github.com/sagarbehere/beaglebone-xenomai/blob/master/beaglebone-xenomai-debian.md
> 

Gilles says: use git://git.xenomai.org/ipipe.git branch ipipe-3.8
Sagar uses git://git.xenomai.org/ipipe-jki.git origin/for-upstream/3.8

"sufficiently similar" with kernel patches has a similar connotation for me like "mildly correct" - what's us deer in the headlight to use ;-? 

- Michael



> I used the for-upstream/3.8 branch, but it should be similar for the ipipe-3.8 branch.
> 
> If you improve upon the procedure, please let me know and I will update the document accordingly, or fork it and send me a pull request :)
> 
> Regards,
> Sagar
> 
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-21  5:53     ` Michael Haberler
@ 2013-08-21  8:45       ` Jan Kiszka
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Kiszka @ 2013-08-21  8:45 UTC (permalink / raw)
  To: Michael Haberler; +Cc: xenomai

On 2013-08-21 07:53, Michael Haberler wrote:
> 
> Am 20.08.2013 um 20:45 schrieb Sagar Behere <sagar.behere@gmail.com>:
> 
>> On 08/20/2013 08:39 PM, Gilles Chanteperdrix wrote:
>>> On 08/20/2013 04:58 PM, Charles Steinkuehler wrote:
>>>> I am currently working with LinuxCNC in a xenomai real-time environment
>>>> on the BeagleBone:
>>>>
>>>> http://bb-lcnc.blogspot.com/p/machinekit_16.html
>>>>
>>>> Everything is working well, but the kernel is being built using an
>>>> out-of-tree patch set obtained by Michael Haberler.
>>>>
>>>> I would like to switch to using a more 'official' xenomai build from
>>>> git, but am unclear how to proceed.
>>>>
>>>> Which git repository/branch would be the most appropriate for use in
>>>> building a xenomai kernel for the BeagleBone / AM335x SoC?
>>>>
>>>> Are there any 'gotchas' when using xenomai from git, or do the
>>>> instructions and procedures for using a released version apply?
>>>
>>> You can use kernel from the I-pipe git at:
>>> git://git.xenomai.org/ipipe.git branch ipipe-3.8
>>>
>>> And xenomai from the xenomai 2.6 git at:
>>> git://git.xenomai.org/xenomai-2.6.git branch master
>>>
>>> The only difference in the installation procedure when using this kernel
>>> with this version of Xenomai is that the "prepare-kernel.sh" script will
>>> not apply the I-pipe patch to the kernel, since the kernel is already
>>> patched, so the argument to the "--adeos" parameter of prepare-kernel.sh
>>> is ignored.
>>
>> For what it's worth, I tried this procedure and documented it
>>
>> https://github.com/sagarbehere/beaglebone-xenomai/blob/master/beaglebone-xenomai-debian.md
>>
> 
> Gilles says: use git://git.xenomai.org/ipipe.git branch ipipe-3.8
> Sagar uses git://git.xenomai.org/ipipe-jki.git origin/for-upstream/3.8

The official ipipe-3.8 is more recent than my upstream queue now, so the
former shall be used (specifically as I didn't test ARM back then).

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-20 20:25       ` Charles Steinkuehler
  2013-08-20 22:37         ` Charles Steinkuehler
@ 2013-08-21 13:16         ` Charles Steinkuehler
  2013-08-21 18:25           ` Gilles Chanteperdrix
  1 sibling, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-21 13:16 UTC (permalink / raw)
  To: xenomai

On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>> Sorry if this is a total newbie question, but I see instructions
>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>> instructions for using the ipipe kernel source directly, but not
>>> how to get from one to the other.
>>>
>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>
>> ./scripts/ipipe/genpatches.sh
>>
>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>> can try and apply to another tree, possibly additionally patching with
>> pre and post patches (respectively before and after the I-pipe patch).
> 
> Yep, that sounds like exactly what I want!  Thanks for the help!!
> 
> I'll report back if I run into more issues or if everything works out
> OK.  I am trying to integrate the xenomai patches into a customized
> version of Robert C. Nelson's BeagleBone kernel build scripts:
> 
> https://github.com/cdsteinkuehler/linux-dev

Thanks again for the help!

I managed to get a working xenomai kernel from the automated builds.  I
have only done light testing so far, but there didn't look to be any
major issues with the process.

Additions to the "stock" RCN kernel build:

I pull the ipipe-3.8 branch from git and use it to generate an ipipe
patch file

The ipipe patch is applied to a BeagleBone patched kernel tree [1]

I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
ipipe patched source tree

...build continues as usual.

More testing needs to be done, but it looks good so far!

[1] There was one hunk I could not get to apply automatically.  The code
in gpmc.c has changed extensively enough that git apply doesn't work
with this file.  To work around this, I skip this file when applying the
ipipe patch, and use a manual fix-up of the trivial 2-line change:

https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch

There's probably a better way to work around this problem, but this
should do until the next official xenomai release comes out...any day
now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
roll forward with updated ipipe or xenomai patches.

Thanks again!!

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130821/bb1c91c7/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-21 13:16         ` [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
@ 2013-08-21 18:25           ` Gilles Chanteperdrix
  2013-08-24 17:10             ` Ralf Roesch
  2013-08-27 19:59             ` [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches Charles Steinkuehler
  0 siblings, 2 replies; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-21 18:25 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>>> Sorry if this is a total newbie question, but I see instructions
>>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>>> instructions for using the ipipe kernel source directly, but not
>>>> how to get from one to the other.
>>>>
>>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>>
>>> ./scripts/ipipe/genpatches.sh
>>>
>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>>> can try and apply to another tree, possibly additionally patching with
>>> pre and post patches (respectively before and after the I-pipe patch).
>>
>> Yep, that sounds like exactly what I want!  Thanks for the help!!
>>
>> I'll report back if I run into more issues or if everything works out
>> OK.  I am trying to integrate the xenomai patches into a customized
>> version of Robert C. Nelson's BeagleBone kernel build scripts:
>>
>> https://github.com/cdsteinkuehler/linux-dev
> 
> Thanks again for the help!
> 
> I managed to get a working xenomai kernel from the automated builds.  I
> have only done light testing so far, but there didn't look to be any
> major issues with the process.
> 
> Additions to the "stock" RCN kernel build:
> 
> I pull the ipipe-3.8 branch from git and use it to generate an ipipe
> patch file
> 
> The ipipe patch is applied to a BeagleBone patched kernel tree [1]
> 
> I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
> ipipe patched source tree
> 
> ...build continues as usual.
> 
> More testing needs to be done, but it looks good so far!
> 
> [1] There was one hunk I could not get to apply automatically.  The code
> in gpmc.c has changed extensively enough that git apply doesn't work
> with this file.  To work around this, I skip this file when applying the
> ipipe patch, and use a manual fix-up of the trivial 2-line change:
> 
> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
> 
> There's probably a better way to work around this problem, but this
> should do until the next official xenomai release comes out...any day
> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
> roll forward with updated ipipe or xenomai patches.

The general way to handle the non-mainline kernels is with a pre and
post patch. The pre patch removes the changes which conflicts, and the
post patch adds the merge.

As for the release date of 2.6.3 it should happen soon, but now that the
I-pipe support for 3.10 is almost there, I am going to wait for it to
have been tested (but not fully validated) so that 2.6.3 will be ready
for 3.10.

> 
> Thanks again!!
> 


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Xenomai] [PATCH] Fix for awk vs. gawk
  2013-08-20 23:12           ` Gilles Chanteperdrix
@ 2013-08-21 22:15             ` Charles Steinkuehler
  2013-08-25 23:54               ` Gilles Chanteperdrix
  0 siblings, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-21 22:15 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/20/2013 6:12 PM, Gilles Chanteperdrix wrote:
> On 08/21/2013 12:37 AM, Charles Steinkuehler wrote:
>> Problem #1 (solved): The genpatches.sh script calls awk, but seems
>> to be incompatible with the stock awk (mawk) on my Debian Wheezy
>> system.  I was getting errors on all the match ($0, ...) lines
>> until I installed gawk:
> 
> I knew that, sorry for not mentioning it. And by the way, if you know
> how to rewrite this in portable awk, patches are welcome.

Here you go.  You have to do away with the character classes, but the
gawk code is only using [:blank:] which is space and tab, so not a whole
lot of horrible things to go wrong with multi-character international
locales.  :)

On my system this produces the exact same output using mawk as the
existing code produces with gawk, but I only tested in the ipipe-3.8
branch.  That said, I think I properly converted the intent of the regex
matching code into something most older awk implementations can
understand.

It might not be as pretty as the gawk code (I'm more used to hacking sed
than awk, and the gawk extensions _are_ nifty), but it should work with
most awks now.

-- 
Charles Steinkuehler
charles@steinkuehler.net
-------------- next part --------------
From 292bbfc65b5e2fb5cd13f9632c74eccdfb50b84f Mon Sep 17 00:00:00 2001
From: Charles Steinkuehler <charles@steinkuehler.net>
Date: Wed, 21 Aug 2013 17:00:29 -0500
Subject: [PATCH] Modify awk script to work with unenhanced match() function
 as found in mawk and other awks

Signed-off-by: Charles Steinkuehler <charles@steinkuehler.net>
---
 scripts/ipipe/genpatches.sh |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/scripts/ipipe/genpatches.sh b/scripts/ipipe/genpatches.sh
index 563d5c1..d29cb9e 100755
--- a/scripts/ipipe/genpatches.sh
+++ b/scripts/ipipe/genpatches.sh
@@ -84,16 +84,19 @@ BEGIN {
     driver_arch["pci/htirq.c"]="x86"
 }
 
-match($0, /^diff --git a\/arch\/([^[:blank:]\/]*)/, arch) {
-    a=arch[1]
+match($0, /^diff --git a\/arch\/([^ \t\/]*)/) {
+    split(substr($0, RSTART, RLENGTH), arch, /\//)
+    a=arch[3]
 
     set_current_arch(a)
     print $0 >> current_file
     next
 }
 
-match($0, /^diff --git a\/drivers\/([^[:blank:]]*)/, file) {
-    f=file[1]
+match($0, /^diff --git a\/drivers\/([^ \t]*)/) {
+    file=substr($0, RSTART, RLENGTH)
+    sub(/^diff --git a\/drivers\//, "", file)
+    f=file
 
     if (!driver_arch[f]) {
 	 print "Error unknown architecture for driver "f
@@ -120,8 +123,9 @@ match($0, /^diff --git a\/drivers\/([^[:blank:]]*)/, file) {
     next
 }
 
-match ($0, /#define [I]PIPE_CORE_RELEASE[[:blank:]]*([^[:blank:]]*)/, vers) {
-    version[current_arch]=vers[1]
+match ($0, /#define [I]PIPE_CORE_RELEASE[ \t]*([^ \t]*)/) {
+    split(substr($0, RSTART, RLENGTH), vers, /[ \t]/)
+    version[current_arch]=vers[3]
 }
 
 {
-- 
1.7.10.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130821/4faec57e/attachment.pgp>

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-21 18:25           ` Gilles Chanteperdrix
@ 2013-08-24 17:10             ` Ralf Roesch
  2013-08-24 17:54               ` Michael Haberler
  2013-08-25  0:59               ` Charles Steinkuehler
  2013-08-27 19:59             ` [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches Charles Steinkuehler
  1 sibling, 2 replies; 24+ messages in thread
From: Ralf Roesch @ 2013-08-24 17:10 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,
Hi Charles,

I followed this thread highly interested and built my own kernel
according your advices.

By using the linux-dev repository from Robert Nelson I have built an
bootable kernel image for my BeagleBone Black:
-rwxr-xr-x 1 ralf ralf  3484720 Aug 23 16:10 3.8.13-xenomai-bone26.zImage
-rw-r--r-- 1 ralf ralf   112741 Aug 23 16:10 3.8.13-xenomai-bone26.config
-rw-r--r-- 1 ralf ralf 11865475 Aug 23 16:10
3.8.13-xenomai-bone26-modules.tar.gz
-rw-r--r-- 1 ralf ralf  1205333 Aug 23 16:10
3.8.13-xenomai-bone26-firmware.tar.gz
-rw-r--r-- 1 ralf ralf    33431 Aug 23 16:10
3.8.13-xenomai-bone26-dtbs.tar.gz

For my tests I use following file system (also from R. Nelson):
BBB-eMMC-flasher-debian-7.1-2013-07-22.img.xz
found @ http://rcn-ee.net/deb/flasher/wheezy

If I execute the following commands:
1.) boot kernel
(Info: uame -a Linux arm 3.8.13-xenomai-bone26 #2 SMP Sat Aug 24
17:14:39 CEST 2013 armv7l GNU/Linux)
2.) modprobe xeno_klat
3.) grep "TestConfig" /usr -r
(du -h /usr 255M)

I can reproduce following error (log on serial console):
Debian GNU/Linux 7 arm ttyO0

arm login:
[  200.279217] INFO: task mmcqd/1:73 blocked for more than 60 seconds.
[  200.285938] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[  200.294286] mmcqd/1         D c06976c8     0    73      2 0x00000000
[  200.301177] [<c06976c8>] (__schedule+0x5b8/0x774) from [<c0695834>]
(schedule_timeout+0x1c/0x21c)
[  200.310609] [<c0695834>] (schedule_timeout+0x1c/0x21c) from
[<c0697a50>] (wait_for_common+0x130/0x170)
[  200.320537] [<c0697a50>] (wait_for_common+0x130/0x170) from
[<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74)
[  200.330791] [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74) from
[<c051d630>] (mmc_start_req+0x50/0x158)
[  200.340758] [<c051d630>] (mmc_start_req+0x50/0x158) from [<c0528bf0>]
(mmc_blk_issue_rw_rq+0xa4/0x348)
[  200.350659] [<c0528bf0>] (mmc_blk_issue_rw_rq+0xa4/0x348) from
[<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450)
[  200.360952] [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450) from
[<c05298cc>] (mmc_queue_thread+0xa0/0x104)
[  200.371017] [<c05298cc>] (mmc_queue_thread+0xa0/0x104) from
[<c005a69c>] (kthread+0xa0/0xb0)
[  200.380013] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
(ret_from_fork+0x18/0x38)
[  200.388616] Kernel panic - not syncing: hung_task: blocked tasks
[  200.395001] [<c00138dc>] (unwind_backtrace+0x0/0xe0) from
[<c06905d0>] (panic+0x84/0x1e0)
[  200.403641] [<c06905d0>] (panic+0x84/0x1e0) from [<c00943d0>]
(watchdog+0x1d4/0x234)
[  200.411843] [<c00943d0>] (watchdog+0x1d4/0x234) from [<c005a69c>]
(kthread+0xa0/0xb0)
[  200.420115] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
(ret_from_fork+0x18/0x38)
[  200.428645] drm_kms_helper: panic occurred, switching back to text
console
[  200.435919] Rebooting in 5 seconds..
U-Boot SPL 2013.04-00017-g5c4fa11 (May 03 2013 - 10:48:32)

I have no idea if this blocking is caused by hard- or software.
Without performing step 2, I could not reproduce this error up to now.

May be you have an idea whats going wrong here?
If you have an BBB available it would be great if you could try to
reproduce this error.

Thanks and best regards
Ralf


On Wed Aug 21 2013 20:25:34 GMT+0200 (CEST), Gilles Chanteperdrix
<gilles.chanteperdrix@xenomai.org> wrote:
> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>>>> Sorry if this is a total newbie question, but I see instructions
>>>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>>>> instructions for using the ipipe kernel source directly, but not
>>>>> how to get from one to the other.
>>>>>
>>>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>>>
>>>> ./scripts/ipipe/genpatches.sh
>>>>
>>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>>>> can try and apply to another tree, possibly additionally patching with
>>>> pre and post patches (respectively before and after the I-pipe patch).
>>> Yep, that sounds like exactly what I want!  Thanks for the help!!
>>>
>>> I'll report back if I run into more issues or if everything works out
>>> OK.  I am trying to integrate the xenomai patches into a customized
>>> version of Robert C. Nelson's BeagleBone kernel build scripts:
>>>
>>> https://github.com/cdsteinkuehler/linux-dev
>> Thanks again for the help!
>>
>> I managed to get a working xenomai kernel from the automated builds.  I
>> have only done light testing so far, but there didn't look to be any
>> major issues with the process.
>>
>> Additions to the "stock" RCN kernel build:
>>
>> I pull the ipipe-3.8 branch from git and use it to generate an ipipe
>> patch file
>>
>> The ipipe patch is applied to a BeagleBone patched kernel tree [1]
>>
>> I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
>> ipipe patched source tree
>>
>> ...build continues as usual.
>>
>> More testing needs to be done, but it looks good so far!
>>
>> [1] There was one hunk I could not get to apply automatically.  The code
>> in gpmc.c has changed extensively enough that git apply doesn't work
>> with this file.  To work around this, I skip this file when applying the
>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>
>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>
>> There's probably a better way to work around this problem, but this
>> should do until the next official xenomai release comes out...any day
>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>> roll forward with updated ipipe or xenomai patches.
> The general way to handle the non-mainline kernels is with a pre and
> post patch. The pre patch removes the changes which conflicts, and the
> post patch adds the merge.
>
> As for the release date of 2.6.3 it should happen soon, but now that the
> I-pipe support for 3.10 is almost there, I am going to wait for it to
> have been tested (but not fully validated) so that 2.6.3 will be ready
> for 3.10.
>
>> Thanks again!!
>>
>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-24 17:10             ` Ralf Roesch
@ 2013-08-24 17:54               ` Michael Haberler
  2013-08-25  0:59               ` Charles Steinkuehler
  1 sibling, 0 replies; 24+ messages in thread
From: Michael Haberler @ 2013-08-24 17:54 UTC (permalink / raw)
  To: xenomai

just noting I built a working BB kernel using https://github.com/cdsteinkuehler/linux-dev/tree/am33x-v3.8-bone26-xenomai as-is yesterday
-Michael

Am 24.08.2013 um 19:10 schrieb Ralf Roesch <xenomai@cantastic.org>:

> Hi Gilles,
> Hi Charles,
> 
> I followed this thread highly interested and built my own kernel
> according your advices.
> 
> By using the linux-dev repository from Robert Nelson I have built an
> bootable kernel image for my BeagleBone Black:
> -rwxr-xr-x 1 ralf ralf  3484720 Aug 23 16:10 3.8.13-xenomai-bone26.zImage
> -rw-r--r-- 1 ralf ralf   112741 Aug 23 16:10 3.8.13-xenomai-bone26.config
> -rw-r--r-- 1 ralf ralf 11865475 Aug 23 16:10
> 3.8.13-xenomai-bone26-modules.tar.gz
> -rw-r--r-- 1 ralf ralf  1205333 Aug 23 16:10
> 3.8.13-xenomai-bone26-firmware.tar.gz
> -rw-r--r-- 1 ralf ralf    33431 Aug 23 16:10
> 3.8.13-xenomai-bone26-dtbs.tar.gz
> 
> For my tests I use following file system (also from R. Nelson):
> BBB-eMMC-flasher-debian-7.1-2013-07-22.img.xz
> found @ http://rcn-ee.net/deb/flasher/wheezy
> 
> If I execute the following commands:
> 1.) boot kernel
> (Info: uame -a Linux arm 3.8.13-xenomai-bone26 #2 SMP Sat Aug 24
> 17:14:39 CEST 2013 armv7l GNU/Linux)
> 2.) modprobe xeno_klat
> 3.) grep "TestConfig" /usr -r
> (du -h /usr 255M)
> 
> I can reproduce following error (log on serial console):
> Debian GNU/Linux 7 arm ttyO0
> 
> arm login:
> [  200.279217] INFO: task mmcqd/1:73 blocked for more than 60 seconds.
> [  200.285938] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [  200.294286] mmcqd/1         D c06976c8     0    73      2 0x00000000
> [  200.301177] [<c06976c8>] (__schedule+0x5b8/0x774) from [<c0695834>]
> (schedule_timeout+0x1c/0x21c)
> [  200.310609] [<c0695834>] (schedule_timeout+0x1c/0x21c) from
> [<c0697a50>] (wait_for_common+0x130/0x170)
> [  200.320537] [<c0697a50>] (wait_for_common+0x130/0x170) from
> [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74)
> [  200.330791] [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74) from
> [<c051d630>] (mmc_start_req+0x50/0x158)
> [  200.340758] [<c051d630>] (mmc_start_req+0x50/0x158) from [<c0528bf0>]
> (mmc_blk_issue_rw_rq+0xa4/0x348)
> [  200.350659] [<c0528bf0>] (mmc_blk_issue_rw_rq+0xa4/0x348) from
> [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450)
> [  200.360952] [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450) from
> [<c05298cc>] (mmc_queue_thread+0xa0/0x104)
> [  200.371017] [<c05298cc>] (mmc_queue_thread+0xa0/0x104) from
> [<c005a69c>] (kthread+0xa0/0xb0)
> [  200.380013] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
> (ret_from_fork+0x18/0x38)
> [  200.388616] Kernel panic - not syncing: hung_task: blocked tasks
> [  200.395001] [<c00138dc>] (unwind_backtrace+0x0/0xe0) from
> [<c06905d0>] (panic+0x84/0x1e0)
> [  200.403641] [<c06905d0>] (panic+0x84/0x1e0) from [<c00943d0>]
> (watchdog+0x1d4/0x234)
> [  200.411843] [<c00943d0>] (watchdog+0x1d4/0x234) from [<c005a69c>]
> (kthread+0xa0/0xb0)
> [  200.420115] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
> (ret_from_fork+0x18/0x38)
> [  200.428645] drm_kms_helper: panic occurred, switching back to text
> console
> [  200.435919] Rebooting in 5 seconds..
> U-Boot SPL 2013.04-00017-g5c4fa11 (May 03 2013 - 10:48:32)
> 
> I have no idea if this blocking is caused by hard- or software.
> Without performing step 2, I could not reproduce this error up to now.
> 
> May be you have an idea whats going wrong here?
> If you have an BBB available it would be great if you could try to
> reproduce this error.
> 
> Thanks and best regards
> Ralf
> 
> 
> On Wed Aug 21 2013 20:25:34 GMT+0200 (CEST), Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>>> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>>>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>>>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>>>>> Sorry if this is a total newbie question, but I see instructions
>>>>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>>>>> instructions for using the ipipe kernel source directly, but not
>>>>>> how to get from one to the other.
>>>>>> 
>>>>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>>>> 
>>>>> ./scripts/ipipe/genpatches.sh
>>>>> 
>>>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>>>>> can try and apply to another tree, possibly additionally patching with
>>>>> pre and post patches (respectively before and after the I-pipe patch).
>>>> Yep, that sounds like exactly what I want!  Thanks for the help!!
>>>> 
>>>> I'll report back if I run into more issues or if everything works out
>>>> OK.  I am trying to integrate the xenomai patches into a customized
>>>> version of Robert C. Nelson's BeagleBone kernel build scripts:
>>>> 
>>>> https://github.com/cdsteinkuehler/linux-dev
>>> Thanks again for the help!
>>> 
>>> I managed to get a working xenomai kernel from the automated builds.  I
>>> have only done light testing so far, but there didn't look to be any
>>> major issues with the process.
>>> 
>>> Additions to the "stock" RCN kernel build:
>>> 
>>> I pull the ipipe-3.8 branch from git and use it to generate an ipipe
>>> patch file
>>> 
>>> The ipipe patch is applied to a BeagleBone patched kernel tree [1]
>>> 
>>> I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
>>> ipipe patched source tree
>>> 
>>> ...build continues as usual.
>>> 
>>> More testing needs to be done, but it looks good so far!
>>> 
>>> [1] There was one hunk I could not get to apply automatically.  The code
>>> in gpmc.c has changed extensively enough that git apply doesn't work
>>> with this file.  To work around this, I skip this file when applying the
>>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>> 
>>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>> 
>>> There's probably a better way to work around this problem, but this
>>> should do until the next official xenomai release comes out...any day
>>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>>> roll forward with updated ipipe or xenomai patches.
>> The general way to handle the non-mainline kernels is with a pre and
>> post patch. The pre patch removes the changes which conflicts, and the
>> post patch adds the merge.
>> 
>> As for the release date of 2.6.3 it should happen soon, but now that the
>> I-pipe support for 3.10 is almost there, I am going to wait for it to
>> have been tested (but not fully validated) so that 2.6.3 will be ready
>> for 3.10.
>> 
>>> Thanks again!!
>>> 
>> 
> 
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-24 17:10             ` Ralf Roesch
  2013-08-24 17:54               ` Michael Haberler
@ 2013-08-25  0:59               ` Charles Steinkuehler
  2013-08-25  7:24                 ` Ralf Roesch
  1 sibling, 1 reply; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-25  0:59 UTC (permalink / raw)
  To: Ralf Roesch; +Cc: xenomai

I will try to test this when I get a chance, but I'm headed out of town
so it may be a while.

This error, however, is identical to hangs I get when working with a bad
SD card.  I had a *LOT* of those for a while, mostly on one bad SD card
(that also gave hangs on x86 non-xenomai systems, so it _was_ a problem
with the SD card).  On the other SD cards I have, IIRC I got a few of
these hangs when I first started working with the BeagleBone and haven't
had any for quite some time.  Other than the one actually bad SD card,
it feels like the mmc driver can't handle the card re-mapping bad
sectors, but that's just a guess on my part.

I'm not positive if I've seen the problem on non-xenomai kernels or just
on the xenomai kernels I use for LinuxCNC.  It's quite possible there's
a bug either in the TI eMMC driver error handling, or perhaps the
xenomai patches either add a bug or 'tickle' a bug that's already
present.  Have you tried your test with a non-xenomai kernel?

On 8/24/2013 12:10 PM, Ralf Roesch wrote:
> Hi Gilles,
> Hi Charles,
> 
> I followed this thread highly interested and built my own kernel
> according your advices.
> 
> By using the linux-dev repository from Robert Nelson I have built an
> bootable kernel image for my BeagleBone Black:
> -rwxr-xr-x 1 ralf ralf  3484720 Aug 23 16:10 3.8.13-xenomai-bone26.zImage
> -rw-r--r-- 1 ralf ralf   112741 Aug 23 16:10 3.8.13-xenomai-bone26.config
> -rw-r--r-- 1 ralf ralf 11865475 Aug 23 16:10
> 3.8.13-xenomai-bone26-modules.tar.gz
> -rw-r--r-- 1 ralf ralf  1205333 Aug 23 16:10
> 3.8.13-xenomai-bone26-firmware.tar.gz
> -rw-r--r-- 1 ralf ralf    33431 Aug 23 16:10
> 3.8.13-xenomai-bone26-dtbs.tar.gz
> 
> For my tests I use following file system (also from R. Nelson):
> BBB-eMMC-flasher-debian-7.1-2013-07-22.img.xz
> found @ http://rcn-ee.net/deb/flasher/wheezy
> 
> If I execute the following commands:
> 1.) boot kernel
> (Info: uame -a Linux arm 3.8.13-xenomai-bone26 #2 SMP Sat Aug 24
> 17:14:39 CEST 2013 armv7l GNU/Linux)
> 2.) modprobe xeno_klat
> 3.) grep "TestConfig" /usr -r
> (du -h /usr 255M)
> 
> I can reproduce following error (log on serial console):
> Debian GNU/Linux 7 arm ttyO0
> 
> arm login:
> [  200.279217] INFO: task mmcqd/1:73 blocked for more than 60 seconds.
> [  200.285938] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [  200.294286] mmcqd/1         D c06976c8     0    73      2 0x00000000
> [  200.301177] [<c06976c8>] (__schedule+0x5b8/0x774) from [<c0695834>]
> (schedule_timeout+0x1c/0x21c)
> [  200.310609] [<c0695834>] (schedule_timeout+0x1c/0x21c) from
> [<c0697a50>] (wait_for_common+0x130/0x170)
> [  200.320537] [<c0697a50>] (wait_for_common+0x130/0x170) from
> [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74)
> [  200.330791] [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74) from
> [<c051d630>] (mmc_start_req+0x50/0x158)
> [  200.340758] [<c051d630>] (mmc_start_req+0x50/0x158) from [<c0528bf0>]
> (mmc_blk_issue_rw_rq+0xa4/0x348)
> [  200.350659] [<c0528bf0>] (mmc_blk_issue_rw_rq+0xa4/0x348) from
> [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450)
> [  200.360952] [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450) from
> [<c05298cc>] (mmc_queue_thread+0xa0/0x104)
> [  200.371017] [<c05298cc>] (mmc_queue_thread+0xa0/0x104) from
> [<c005a69c>] (kthread+0xa0/0xb0)
> [  200.380013] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
> (ret_from_fork+0x18/0x38)
> [  200.388616] Kernel panic - not syncing: hung_task: blocked tasks
> [  200.395001] [<c00138dc>] (unwind_backtrace+0x0/0xe0) from
> [<c06905d0>] (panic+0x84/0x1e0)
> [  200.403641] [<c06905d0>] (panic+0x84/0x1e0) from [<c00943d0>]
> (watchdog+0x1d4/0x234)
> [  200.411843] [<c00943d0>] (watchdog+0x1d4/0x234) from [<c005a69c>]
> (kthread+0xa0/0xb0)
> [  200.420115] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
> (ret_from_fork+0x18/0x38)
> [  200.428645] drm_kms_helper: panic occurred, switching back to text
> console
> [  200.435919] Rebooting in 5 seconds..
> U-Boot SPL 2013.04-00017-g5c4fa11 (May 03 2013 - 10:48:32)
> 
> I have no idea if this blocking is caused by hard- or software.
> Without performing step 2, I could not reproduce this error up to now.
> 
> May be you have an idea whats going wrong here?
> If you have an BBB available it would be great if you could try to
> reproduce this error.
> 
> Thanks and best regards
> Ralf
> 
> 
> On Wed Aug 21 2013 20:25:34 GMT+0200 (CEST), Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>>> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>>>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>>>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>>>>> Sorry if this is a total newbie question, but I see instructions
>>>>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>>>>> instructions for using the ipipe kernel source directly, but not
>>>>>> how to get from one to the other.
>>>>>>
>>>>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>>>>
>>>>> ./scripts/ipipe/genpatches.sh
>>>>>
>>>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>>>>> can try and apply to another tree, possibly additionally patching with
>>>>> pre and post patches (respectively before and after the I-pipe patch).
>>>> Yep, that sounds like exactly what I want!  Thanks for the help!!
>>>>
>>>> I'll report back if I run into more issues or if everything works out
>>>> OK.  I am trying to integrate the xenomai patches into a customized
>>>> version of Robert C. Nelson's BeagleBone kernel build scripts:
>>>>
>>>> https://github.com/cdsteinkuehler/linux-dev
>>> Thanks again for the help!
>>>
>>> I managed to get a working xenomai kernel from the automated builds.  I
>>> have only done light testing so far, but there didn't look to be any
>>> major issues with the process.
>>>
>>> Additions to the "stock" RCN kernel build:
>>>
>>> I pull the ipipe-3.8 branch from git and use it to generate an ipipe
>>> patch file
>>>
>>> The ipipe patch is applied to a BeagleBone patched kernel tree [1]
>>>
>>> I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
>>> ipipe patched source tree
>>>
>>> ...build continues as usual.
>>>
>>> More testing needs to be done, but it looks good so far!
>>>
>>> [1] There was one hunk I could not get to apply automatically.  The code
>>> in gpmc.c has changed extensively enough that git apply doesn't work
>>> with this file.  To work around this, I skip this file when applying the
>>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>>
>>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>>
>>> There's probably a better way to work around this problem, but this
>>> should do until the next official xenomai release comes out...any day
>>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>>> roll forward with updated ipipe or xenomai patches.
>> The general way to handle the non-mainline kernels is with a pre and
>> post patch. The pre patch removes the changes which conflicts, and the
>> post patch adds the merge.
>>
>> As for the release date of 2.6.3 it should happen soon, but now that the
>> I-pipe support for 3.10 is almost there, I am going to wait for it to
>> have been tested (but not fully validated) so that 2.6.3 will be ready
>> for 3.10.
>>
>>> Thanks again!!
>>>
>>
> 
> 


-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130824/4235bdc5/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] Building BeagleBone kernel from git
  2013-08-25  0:59               ` Charles Steinkuehler
@ 2013-08-25  7:24                 ` Ralf Roesch
  0 siblings, 0 replies; 24+ messages in thread
From: Ralf Roesch @ 2013-08-25  7:24 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On Sun Aug 25 2013 02:59:46 GMT+0200 (CEST), Charles Steinkuehler
<charles@steinkuehler.net> wrote:
> I will try to test this when I get a chance, but I'm headed out of town
> so it may be a while.
Thanks a lot Charles!
> This error, however, is identical to hangs I get when working with a bad
> SD card.  I had a *LOT* of those for a while, mostly on one bad SD card
> (that also gave hangs on x86 non-xenomai systems, so it _was_ a problem
> with the SD card).  On the other SD cards I have, IIRC I got a few of
> these hangs when I first started working with the BeagleBone and haven't
> had any for quite some time.  Other than the one actually bad SD card,
> it feels like the mmc driver can't handle the card re-mapping bad
> sectors, but that's just a guess on my part.
I was aware of this "bad SD card" problem.
Therefore I made my tests on the 2GB 8-bit eMMC on-board flash storage,
not using any SD card.
(as I said in my previous mall the eMMC containing my test file system
is flashed with the filesystem from Robert Nelson)
/dev/disk/by-uuid/b7d49609-1ac0-4727-9395-6a0477a63835 on / type ext4
(rw,noatime,errors=remount-ro,data=ordered)
/dev/disk/by-uuid/b7d49609-1ac0-4727-9395-6a0477a63835  1.7G  497M 
1.1G  31% /
So this problem is not only related to the SD card.

>
> I'm not positive if I've seen the problem on non-xenomai kernels or just
> on the xenomai kernels I use for LinuxCNC.  It's quite possible there's
> a bug either in the TI eMMC driver error handling, or perhaps the
> xenomai patches either add a bug or 'tickle' a bug that's already
> present.  Have you tried your test with a non-xenomai kernel?
Because this problem is not only related to the SD card it has likely
has to do with one of the bugs you mentioned.
We are looking for a suitable hardware platform which gives us good
realtime performance.
Therefore I tested only  the xenomai patched kernel up to now.

If you are lucky you can trigger this easy reproducible error with your
BBB which might help in debugging to sort out this error.

> On 8/24/2013 12:10 PM, Ralf Roesch wrote:
>> Hi Gilles,
>> Hi Charles,
>>
>> I followed this thread highly interested and built my own kernel
>> according your advices.
>>
>> By using the linux-dev repository from Robert Nelson I have built an
>> bootable kernel image for my BeagleBone Black:
>> -rwxr-xr-x 1 ralf ralf  3484720 Aug 23 16:10 3.8.13-xenomai-bone26.zImage
>> -rw-r--r-- 1 ralf ralf   112741 Aug 23 16:10 3.8.13-xenomai-bone26.config
>> -rw-r--r-- 1 ralf ralf 11865475 Aug 23 16:10
>> 3.8.13-xenomai-bone26-modules.tar.gz
>> -rw-r--r-- 1 ralf ralf  1205333 Aug 23 16:10
>> 3.8.13-xenomai-bone26-firmware.tar.gz
>> -rw-r--r-- 1 ralf ralf    33431 Aug 23 16:10
>> 3.8.13-xenomai-bone26-dtbs.tar.gz
>>
>> For my tests I use following file system (also from R. Nelson):
>> BBB-eMMC-flasher-debian-7.1-2013-07-22.img.xz
>> found @ http://rcn-ee.net/deb/flasher/wheezy
>>
>> If I execute the following commands:
>> 1.) boot kernel
>> (Info: uame -a Linux arm 3.8.13-xenomai-bone26 #2 SMP Sat Aug 24
>> 17:14:39 CEST 2013 armv7l GNU/Linux)
>> 2.) modprobe xeno_klat
>> 3.) grep "TestConfig" /usr -r
>> (du -h /usr 255M)
>>
>> I can reproduce following error (log on serial console):
>> Debian GNU/Linux 7 arm ttyO0
>>
>> arm login:
>> [  200.279217] INFO: task mmcqd/1:73 blocked for more than 60 seconds.
>> [  200.285938] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
>> disables this message.
>> [  200.294286] mmcqd/1         D c06976c8     0    73      2 0x00000000
>> [  200.301177] [<c06976c8>] (__schedule+0x5b8/0x774) from [<c0695834>]
>> (schedule_timeout+0x1c/0x21c)
>> [  200.310609] [<c0695834>] (schedule_timeout+0x1c/0x21c) from
>> [<c0697a50>] (wait_for_common+0x130/0x170)
>> [  200.320537] [<c0697a50>] (wait_for_common+0x130/0x170) from
>> [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74)
>> [  200.330791] [<c051c9a8>] (mmc_wait_for_req_done+0x1c/0x74) from
>> [<c051d630>] (mmc_start_req+0x50/0x158)
>> [  200.340758] [<c051d630>] (mmc_start_req+0x50/0x158) from [<c0528bf0>]
>> (mmc_blk_issue_rw_rq+0xa4/0x348)
>> [  200.350659] [<c0528bf0>] (mmc_blk_issue_rw_rq+0xa4/0x348) from
>> [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450)
>> [  200.360952] [<c0529290>] (mmc_blk_issue_rq+0x3fc/0x450) from
>> [<c05298cc>] (mmc_queue_thread+0xa0/0x104)
>> [  200.371017] [<c05298cc>] (mmc_queue_thread+0xa0/0x104) from
>> [<c005a69c>] (kthread+0xa0/0xb0)
>> [  200.380013] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
>> (ret_from_fork+0x18/0x38)
>> [  200.388616] Kernel panic - not syncing: hung_task: blocked tasks
>> [  200.395001] [<c00138dc>] (unwind_backtrace+0x0/0xe0) from
>> [<c06905d0>] (panic+0x84/0x1e0)
>> [  200.403641] [<c06905d0>] (panic+0x84/0x1e0) from [<c00943d0>]
>> (watchdog+0x1d4/0x234)
>> [  200.411843] [<c00943d0>] (watchdog+0x1d4/0x234) from [<c005a69c>]
>> (kthread+0xa0/0xb0)
>> [  200.420115] [<c005a69c>] (kthread+0xa0/0xb0) from [<c000dc00>]
>> (ret_from_fork+0x18/0x38)
>> [  200.428645] drm_kms_helper: panic occurred, switching back to text
>> console
>> [  200.435919] Rebooting in 5 seconds..
>> U-Boot SPL 2013.04-00017-g5c4fa11 (May 03 2013 - 10:48:32)
>>
>> I have no idea if this blocking is caused by hard- or software.
>> Without performing step 2, I could not reproduce this error up to now.
>>
>> May be you have an idea whats going wrong here?
>> If you have an BBB available it would be great if you could try to
>> reproduce this error.
>>
>> Thanks and best regards
>> Ralf
>>
>>
>> On Wed Aug 21 2013 20:25:34 GMT+0200 (CEST), Gilles Chanteperdrix
>> <gilles.chanteperdrix@xenomai.org> wrote:
>>> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>>>> On 8/20/2013 3:25 PM, Charles Steinkuehler wrote:
>>>>> On 8/20/2013 2:55 PM, Gilles Chanteperdrix wrote:
>>>>>> On 08/20/2013 09:49 PM, Charles Steinkuehler wrote:
>>>>>>> Sorry if this is a total newbie question, but I see instructions
>>>>>>> for using the prepare-kernel.sh script on a kernel directory, and 
>>>>>>> instructions for using the ipipe kernel source directly, but not
>>>>>>> how to get from one to the other.
>>>>>>>
>>>>>> You want the I-pipe patch. To generate it, in the I-pipe tree, try:
>>>>>>
>>>>>> ./scripts/ipipe/genpatches.sh
>>>>>>
>>>>>> You should then find a file ipipe-core-3.8.13-arm-1.patch which you
>>>>>> can try and apply to another tree, possibly additionally patching with
>>>>>> pre and post patches (respectively before and after the I-pipe patch).
>>>>> Yep, that sounds like exactly what I want!  Thanks for the help!!
>>>>>
>>>>> I'll report back if I run into more issues or if everything works out
>>>>> OK.  I am trying to integrate the xenomai patches into a customized
>>>>> version of Robert C. Nelson's BeagleBone kernel build scripts:
>>>>>
>>>>> https://github.com/cdsteinkuehler/linux-dev
>>>> Thanks again for the help!
>>>>
>>>> I managed to get a working xenomai kernel from the automated builds.  I
>>>> have only done light testing so far, but there didn't look to be any
>>>> major issues with the process.
>>>>
>>>> Additions to the "stock" RCN kernel build:
>>>>
>>>> I pull the ipipe-3.8 branch from git and use it to generate an ipipe
>>>> patch file
>>>>
>>>> The ipipe patch is applied to a BeagleBone patched kernel tree [1]
>>>>
>>>> I pull xenomai 2.6 (master) from git and run it's setup_kernel.sh on the
>>>> ipipe patched source tree
>>>>
>>>> ...build continues as usual.
>>>>
>>>> More testing needs to be done, but it looks good so far!
>>>>
>>>> [1] There was one hunk I could not get to apply automatically.  The code
>>>> in gpmc.c has changed extensively enough that git apply doesn't work
>>>> with this file.  To work around this, I skip this file when applying the
>>>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>>>
>>>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>>>
>>>> There's probably a better way to work around this problem, but this
>>>> should do until the next official xenomai release comes out...any day
>>>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>>>> roll forward with updated ipipe or xenomai patches.
>>> The general way to handle the non-mainline kernels is with a pre and
>>> post patch. The pre patch removes the changes which conflicts, and the
>>> post patch adds the merge.
>>>
>>> As for the release date of 2.6.3 it should happen soon, but now that the
>>> I-pipe support for 3.10 is almost there, I am going to wait for it to
>>> have been tested (but not fully validated) so that 2.6.3 will be ready
>>> for 3.10.
>>>
>>>> Thanks again!!
>>>>
>>
>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] Fix for awk vs. gawk
  2013-08-21 22:15             ` [Xenomai] [PATCH] Fix for awk vs. gawk Charles Steinkuehler
@ 2013-08-25 23:54               ` Gilles Chanteperdrix
  0 siblings, 0 replies; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-25 23:54 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/22/2013 12:15 AM, Charles Steinkuehler wrote:
> On 8/20/2013 6:12 PM, Gilles Chanteperdrix wrote:
>> On 08/21/2013 12:37 AM, Charles Steinkuehler wrote:
>>> Problem #1 (solved): The genpatches.sh script calls awk, but
>>> seems to be incompatible with the stock awk (mawk) on my Debian
>>> Wheezy system.  I was getting errors on all the match ($0, ...)
>>> lines until I installed gawk:
>> 
>> I knew that, sorry for not mentioning it. And by the way, if you
>> know how to rewrite this in portable awk, patches are welcome.
> 
> Here you go.  You have to do away with the character classes, but
> the gawk code is only using [:blank:] which is space and tab, so
> not a whole lot of horrible things to go wrong with multi-character
> international locales.  :)
> 
> On my system this produces the exact same output using mawk as the 
> existing code produces with gawk, but I only tested in the
> ipipe-3.8 branch.  That said, I think I properly converted the
> intent of the regex matching code into something most older awk
> implementations can understand.
> 
> It might not be as pretty as the gawk code (I'm more used to
> hacking sed than awk, and the gawk extensions _are_ nifty), but it
> should work with most awks now.
> 
Merged, thanks.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-08-21 18:25           ` Gilles Chanteperdrix
  2013-08-24 17:10             ` Ralf Roesch
@ 2013-08-27 19:59             ` Charles Steinkuehler
  2013-08-27 21:12               ` Gilles Chanteperdrix
  2013-09-10 18:48               ` Gilles Chanteperdrix
  1 sibling, 2 replies; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-27 19:59 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/21/2013 1:25 PM, Gilles Chanteperdrix wrote:
> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>> [1] There was one hunk I could not get to apply automatically.  The code
>> in gpmc.c has changed extensively enough that git apply doesn't work
>> with this file.  To work around this, I skip this file when applying the
>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>
>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>
>> There's probably a better way to work around this problem, but this
>> should do until the next official xenomai release comes out...any day
>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>> roll forward with updated ipipe or xenomai patches.
> 
> The general way to handle the non-mainline kernels is with a pre and
> post patch. The pre patch removes the changes which conflicts, and the
> post patch adds the merge.

I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
the files to my xenomai 2.6 repository (patch attached).

Note that I just added the files...I didn't do anything to try and
integrate these with the prepare_kernel.sh script (since I'm applying
the ipipe patch from git manually) or add documentation.  With this, the
patch generated from the current git ipipe-3.8 branch applies cleanly.

Anyway, the patch turned out to be quite simple and will hopefully roll
forward fairly well.

Thanks!

-- 
Charles Steinkuehler
charles@steinkuehler.net
-------------- next part --------------
From c4e1682055307758d39d2741a9149645645545ab Mon Sep 17 00:00:00 2001
From: Charles Steinkuehler <charles@steinkuehler.net>
Date: Tue, 27 Aug 2013 20:45:12 +0200
Subject: [PATCH] Add pre/post patch set for BeagleBone 3.8.13 kernel

Signed-off-by: Charles Steinkuehler <charles@steinkuehler.net>
---
 .../beaglebone/ipipe-core-3.8.13-beaglebone-post.patch |   16 ++++++++++++++++
 .../beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch  |   16 ++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
 create mode 100644 ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch

diff --git a/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-post.patch b/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
new file mode 100644
index 0000000..292b1c3
--- /dev/null
+++ b/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
@@ -0,0 +1,16 @@
+diff -uPr ipipe/arch/arm/mach-omap2/gpmc.c post/arch/arm/mach-omap2/gpmc.c
+--- ipipe/arch/arm/mach-omap2/gpmc.c	2013-08-27 20:34:22.366199351 +0200
++++ post/arch/arm/mach-omap2/gpmc.c	2013-08-27 20:16:56.990703412 +0200
+@@ -25,6 +25,12 @@
+ #include <linux/module.h>
+ #include <linux/interrupt.h>
+ #include <linux/platform_device.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include <linux/of_mtd.h>
++#include <linux/of_device.h>
++#include <linux/mtd/nand.h>
++#include <linux/pinctrl/consumer.h>
+ #include <linux/ipipe.h>
+ 
+ #include <linux/platform_data/mtd-nand-omap2.h>
diff --git a/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch b/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch
new file mode 100644
index 0000000..aa37724
--- /dev/null
+++ b/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch
@@ -0,0 +1,16 @@
+diff -uPr bb/arch/arm/mach-omap2/gpmc.c pre/arch/arm/mach-omap2/gpmc.c
+--- bb/arch/arm/mach-omap2/gpmc.c	2013-08-27 20:26:55.080672567 +0200
++++ pre/arch/arm/mach-omap2/gpmc.c	2013-08-27 20:31:15.727578153 +0200
+@@ -25,12 +25,6 @@
+ #include <linux/module.h>
+ #include <linux/interrupt.h>
+ #include <linux/platform_device.h>
+-#include <linux/of.h>
+-#include <linux/of_address.h>
+-#include <linux/of_mtd.h>
+-#include <linux/of_device.h>
+-#include <linux/mtd/nand.h>
+-#include <linux/pinctrl/consumer.h>
+ 
+ #include <linux/platform_data/mtd-nand-omap2.h>
+ 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-08-27 19:59             ` [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches Charles Steinkuehler
@ 2013-08-27 21:12               ` Gilles Chanteperdrix
  2013-08-27 21:13                 ` Gilles Chanteperdrix
  2013-09-10 18:48               ` Gilles Chanteperdrix
  1 sibling, 1 reply; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-27 21:12 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/27/2013 09:59 PM, Charles Steinkuehler wrote:
> I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
> the files to my xenomai 2.6 repository (patch attached).
> 
> Note that I just added the files...I didn't do anything to try and
> integrate these with the prepare_kernel.sh script (since I'm applying
> the ipipe patch from git manually) or add documentation.  With this, the
> patch generated from the current git ipipe-3.8 branch applies cleanly.
> 
> Anyway, the patch turned out to be quite simple and will hopefully roll
> forward fairly well.

Hi, thanks for the patch. The prepare-kernel script does not apply pre
and post patches automatically, but this could be arranged. The key
information to add to the documentation is the I-pipe repository/branch
and commit hash to which the patch applies.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-08-27 21:12               ` Gilles Chanteperdrix
@ 2013-08-27 21:13                 ` Gilles Chanteperdrix
  2013-08-27 21:57                   ` Charles Steinkuehler
  0 siblings, 1 reply; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-08-27 21:13 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/27/2013 11:12 PM, Gilles Chanteperdrix wrote:
> On 08/27/2013 09:59 PM, Charles Steinkuehler wrote:
>> I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
>> the files to my xenomai 2.6 repository (patch attached).
>>
>> Note that I just added the files...I didn't do anything to try and
>> integrate these with the prepare_kernel.sh script (since I'm applying
>> the ipipe patch from git manually) or add documentation.  With this, the
>> patch generated from the current git ipipe-3.8 branch applies cleanly.
>>
>> Anyway, the patch turned out to be quite simple and will hopefully roll
>> forward fairly well.
> 
> Hi, thanks for the patch. The prepare-kernel script does not apply pre
> and post patches automatically, but this could be arranged. The key
> information to add to the documentation is the I-pipe repository/branch
> and commit hash to which the patch applies.

I mean the git repository/branch and commit hash.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-08-27 21:13                 ` Gilles Chanteperdrix
@ 2013-08-27 21:57                   ` Charles Steinkuehler
  0 siblings, 0 replies; 24+ messages in thread
From: Charles Steinkuehler @ 2013-08-27 21:57 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 8/27/2013 4:13 PM, Gilles Chanteperdrix wrote:
> On 08/27/2013 11:12 PM, Gilles Chanteperdrix wrote:
>> On 08/27/2013 09:59 PM, Charles Steinkuehler wrote:
>>> I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
>>> the files to my xenomai 2.6 repository (patch attached).
>>>
>>> Note that I just added the files...I didn't do anything to try and
>>> integrate these with the prepare_kernel.sh script (since I'm applying
>>> the ipipe patch from git manually) or add documentation.  With this, the
>>> patch generated from the current git ipipe-3.8 branch applies cleanly.
>>>
>>> Anyway, the patch turned out to be quite simple and will hopefully roll
>>> forward fairly well.
>>
>> Hi, thanks for the patch. The prepare-kernel script does not apply pre
>> and post patches automatically, but this could be arranged. The key
>> information to add to the documentation is the I-pipe repository/branch
>> and commit hash to which the patch applies.
> 
> I mean the git repository/branch and commit hash.

Details below.

Let me know if I need to do anything else, or if this isn't the data you
were wanting.  There isn't really a specific kernel source git commit
this applies to, since I'm building the BeagleBone kernel by applying a
fairly large set of patches to the mainline kernel source (handled
automatically by a build script from Robert C Nelson).

The pre/post patches apply to what is currently the most recent
ipipe-3.8 version from git and the latest BeagleBone kernel:

ipipe details:
==============

Repository: git://git.xenomai.org/ipipe.git

Branch: ipipe-3.8

commit 54e4874873e9bc6c65c30ee36ac0278020ad4854
Author: Philippe Gerum <rpm@xenomai.org>
Date:   Wed Aug 21 19:02:42 2013 +0200

    ipipe: pass migration data along with SETAFFINITY event


Kernel source details:
======================
3.8.13-bone26.1 as generated by RCN's patch scripts:

Repositroy: https://github.com/RobertCNelson/linux-dev

Branch: am33x-v3.8

commit 3fc8a73d782231ab2750ff29793a760e8fa076bb
Author: Robert Nelson <robertcnelson@gmail.com>
Date:   Mon Aug 26 14:58:46 2013 -0500

    config: HID, these should have been enabled by default over a month
ago...

-- 
Charles Steinkuehler
charles@steinkuehler.net


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-08-27 19:59             ` [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches Charles Steinkuehler
  2013-08-27 21:12               ` Gilles Chanteperdrix
@ 2013-09-10 18:48               ` Gilles Chanteperdrix
  2013-09-10 21:20                 ` Charles Steinkuehler
  1 sibling, 1 reply; 24+ messages in thread
From: Gilles Chanteperdrix @ 2013-09-10 18:48 UTC (permalink / raw)
  To: Charles Steinkuehler; +Cc: xenomai

On 08/27/2013 09:59 PM, Charles Steinkuehler wrote:
> On 8/21/2013 1:25 PM, Gilles Chanteperdrix wrote:
>> On 08/21/2013 03:16 PM, Charles Steinkuehler wrote:
>>> [1] There was one hunk I could not get to apply automatically.  The code
>>> in gpmc.c has changed extensively enough that git apply doesn't work
>>> with this file.  To work around this, I skip this file when applying the
>>> ipipe patch, and use a manual fix-up of the trivial 2-line change:
>>>
>>> https://github.com/cdsteinkuehler/linux-dev/blob/am33x-v3.8-bone26-xenomai/patches/xenomai/0001-ipipe-core-3.8.13-arm-1.gpmc.patch
>>>
>>> There's probably a better way to work around this problem, but this
>>> should do until the next official xenomai release comes out...any day
>>> now, right?!?  :)  Anyway, it doesn't look like it will be that hard to
>>> roll forward with updated ipipe or xenomai patches.
>>
>> The general way to handle the non-mainline kernels is with a pre and
>> post patch. The pre patch removes the changes which conflicts, and the
>> post patch adds the merge.
> 
> I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
> the files to my xenomai 2.6 repository (patch attached).
> 
> Note that I just added the files...I didn't do anything to try and
> integrate these with the prepare_kernel.sh script (since I'm applying
> the ipipe patch from git manually) or add documentation.  With this, the
> patch generated from the current git ipipe-3.8 branch applies cleanly.
> 
> Anyway, the patch turned out to be quite simple and will hopefully roll
> forward fairly well.

Hi Charles,

The final version of the I-pipe patch for 3.8.13 is available, could you
check the patches you posted need rebasing?

Thanks in advance.
Regards.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches
  2013-09-10 18:48               ` Gilles Chanteperdrix
@ 2013-09-10 21:20                 ` Charles Steinkuehler
  0 siblings, 0 replies; 24+ messages in thread
From: Charles Steinkuehler @ 2013-09-10 21:20 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 9/10/2013 1:48 PM, Gilles Chanteperdrix wrote:
> On 08/27/2013 09:59 PM, Charles Steinkuehler wrote:

>> I made a pre/post patch set for the BeagleBone 3.8.13 kernel and added
>> the files to my xenomai 2.6 repository (patch attached).
>>
>> Note that I just added the files...I didn't do anything to try and
>> integrate these with the prepare_kernel.sh script (since I'm applying
>> the ipipe patch from git manually) or add documentation.  With this, the
>> patch generated from the current git ipipe-3.8 branch applies cleanly.
>>
>> Anyway, the patch turned out to be quite simple and will hopefully roll
>> forward fairly well.
> 
> Hi Charles,
> 
> The final version of the I-pipe patch for 3.8.13 is available, could you
> check the patches you posted need rebasing?

I have verified the patches still apply cleanly, and the resulting
kernel builds and operates as expected.

I used an ipipe patch generated from the ipipe.git repo, but I verified
it is identical to the ipipe patch in xenomai-2.6 master.

I didn't see the beaglebone 3.8.13 -pre and -post patches in the xenomai
2.6 git repository (just the older 3.2 version), but I used the same
ones I sent in previously.

Let me know if there is anything I need to do to assist with getting the
beaglebone 3.8.13 pre/post patches added to 2.6 master.

Thanks for all the great work, I'm looking forward to the next release!

-- 
Charles Steinkuehler
charles@steinkuehler.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130910/f5679637/attachment.pgp>

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2013-09-10 21:20 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 14:58 [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
2013-08-20 18:39 ` Gilles Chanteperdrix
2013-08-20 18:45   ` Sagar Behere
2013-08-21  5:53     ` Michael Haberler
2013-08-21  8:45       ` Jan Kiszka
2013-08-20 19:49   ` Charles Steinkuehler
2013-08-20 19:55     ` Gilles Chanteperdrix
2013-08-20 20:25       ` Charles Steinkuehler
2013-08-20 22:37         ` Charles Steinkuehler
2013-08-20 23:12           ` Gilles Chanteperdrix
2013-08-21 22:15             ` [Xenomai] [PATCH] Fix for awk vs. gawk Charles Steinkuehler
2013-08-25 23:54               ` Gilles Chanteperdrix
2013-08-21 13:16         ` [Xenomai] Building BeagleBone kernel from git Charles Steinkuehler
2013-08-21 18:25           ` Gilles Chanteperdrix
2013-08-24 17:10             ` Ralf Roesch
2013-08-24 17:54               ` Michael Haberler
2013-08-25  0:59               ` Charles Steinkuehler
2013-08-25  7:24                 ` Ralf Roesch
2013-08-27 19:59             ` [Xenomai] [PATCH] BeagleBone 3.8.13 pre/post patches Charles Steinkuehler
2013-08-27 21:12               ` Gilles Chanteperdrix
2013-08-27 21:13                 ` Gilles Chanteperdrix
2013-08-27 21:57                   ` Charles Steinkuehler
2013-09-10 18:48               ` Gilles Chanteperdrix
2013-09-10 21:20                 ` Charles Steinkuehler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.