Skip to contentSkip to conversation

Porting ipipe to vendor specific kernel. Newbie question.

Xenomai Alexey Shaposhnikov 2 participants 6 messages Oct 4, 2014 – Oct 6, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

I trying to port Xenomai 2.6 on Cubieboard (Allwinner A10 based), but encounter following problems:

1) How to port core patch on newer (than 3.4.6) kernel? Just run genpatches.sh give errors "unknown architecture for driver" and incomplete patch.
2) Starting (approximately) from version 3.4.29 linux-sunxi kernel have code backported from 3.5 (mainstream) kernel (arch/arm/include/asm/mmu_context.h for example), so generated for 3.4 kernel core patch can't be applied. Is there a (correct) way to backport those parts of ipipe patch without direct patch file edit and manual copy-paste hunks?

Signature · 1 line
Alexey Shaposhnikov.
#1 lore raw
Quoted 7 lines · Alexey Shaposhnikov

I trying to port Xenomai 2.6 on Cubieboard (Allwinner A10 based), but encounter following problems:

1) How to port core patch on newer (than 3.4.6) kernel? Just run genpatches.sh give errors "unknown architecture for driver" and incomplete patch.

You have to modify genpatches.sh to add the architecture of the missing files. This may be easier with versions of genpatches.sh for newer kernel versions (the last I-pipe version supported is 3.14.17).

Quoted 6 lines

2) Starting (approximately) from version 3.4.29 linux-sunxi kernel have code backported from 3.5 (mainstream) kernel (arch/arm/include/asm/mmu_context.h for example), so generated for 3.4 kernel core patch can't be applied. Is there a (correct) way to backport those parts of ipipe patch without direct patch file edit and manual copy-paste hunks?

Work with git, but you will still have to back-port changes from later kernels, and manually.

As a general advice, you may also want to have a look at:
http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/

Note that I believe someone already did the port to allwinner a10, I made comments on these patches, new versions never were posted.

--
Gilles.

#2 lore raw
Quoted 6 lines · On Sat, 4 Oct 2014 13:17:06 +0200 Gilles Chanteperdrix…
Quoted 3 lines

1) How to port core patch on newer (than 3.4.6) kernel? Just run genpatches.sh give errors "unknown architecture for driver" and incomplete patch.

You have to modify genpatches.sh to add the architecture of the missing files. This may be easier with versions of genpatches.sh for newer kernel versions (the last I-pipe version supported is 3.14.17).

Already tried this. But in result the script parse every driver code change since 3.4.6 and make over four hundreds errors about missing architecture for files like usb/serial/whiteheat.c

Quoted 2 lines

Note that I believe someone already did the port to allwinner a10, I made comments on these patches, new versions never were posted.

I've seen this in mailing list archive. But pre/post patches have not been preserved so I prefer to start from scratch instead of reverse engineering these 6MB of code.

Signature · 1 line
Alexey Shaposhnikov
#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · Alexey Shaposhnikov
Quoted 3 lines · On Sat, 4 Oct 2014 13:17:06 +0200 Gilles Chanteperdrix…
Quoted 3 lines

1) How to port core patch on newer (than 3.4.6) kernel? Just run genpatches.sh give errors "unknown architecture for driver" and incomplete patch.

Quoted 7 lines
Quoted 3 lines

You have to modify genpatches.sh to add the architecture of the missing files. This may be easier with versions of genpatches.sh for newer kernel versions (the last I-pipe version supported is 3.14.17).

Already tried this. But in result the script parse every driver code change since 3.4.6 and make over four hundreds errors about missing architecture for files like usb/serial/whiteheat.c

That is because genpatches.sh uses the stable kernel as a base for the patch by default. You have to pass as argument to genpatches.sh the hash of the commit you want it to use as base if you do not want that default behaviour.

--
Gilles.

#5 lore raw
Quoted 8 lines · On Sun, 5 Oct 2014 15:52:08 +0200 Gilles Chanteperdrix…
Quoted 3 lines

Already tried this. But in result the script parse every driver code change since 3.4.6 and make over four hundreds errors about missing architecture for files like usb/serial/whiteheat.c

That is because genpatches.sh uses the stable kernel as a base for the patch by default. You have to pass as argument to genpatches.sh the hash of the commit you want it to use as base if you do not want that default behaviour.

Maybe I was misunderstood due to my terrible English... Current linux-sunxi kernel is based on 3.4.103 mainstream kernel, so I trying to port ipipe core patch from 3.4.6 for 3.4.103. For this I:

a)got sources from repository: "git clone -b legacy/core-3.4
git://git.xenomai.org/ipipe.git"
b)run genpatches.sh with this command: "./scripts/ipipe/genpatches.sh v3.4.103" and get this:

===
./scripts/ipipe/genpatches.sh v3.4.103
reference: v3.4.103, kernel version: 3.4.6
Error unknown architecture for driver acpi/ac.c ipipe-core-3.4.6-h8300-.patch
ipipe-core-3.4.6-avr32-.patch
ipipe-core-3.4.6-frv-.patch
ipipe-core-3.4.6-parisc-.patch
ipipe-core-3.4.6-score-.patch ipipe-core-3.4.6-powerpc-4.patch ipipe-core-3.4.6-microblaze-.patch ipipe-core-3.4.6-xtensa-.patch
ipipe-core-3.4.6-um-.patch
ipipe-core-3.4.6-unicore32-.patch ipipe-core-3.4.6-ia64-.patch
ipipe-core-3.4.6-arm-4.patch
ipipe-core-3.4.6-s390-.patch
ipipe-core-3.4.6-cris-.patch
ipipe-core-3.4.6-x86-4.patch
ipipe-core-3.4.6-sparc-.patch
ipipe-core-3.4.6-tile-.patch
ipipe-core-3.4.6-mips-.patch
ipipe-core-3.4.6-alpha-.patch
ipipe-core-3.4.6-sh-.patch
ipipe-core-3.4.6-mn10300-.patch
ipipe-core-3.4.6-m32r-.patch
ipipe-core-3.4.6-m68k-.patch ipipe-core-3.4.6-blackfin-4.patch
===
(If use script from ipipe-3.14 branch then it not make all those crippled patches, but generate four hundreds errors about missing architecture)

So I'm definitely doing something wrong, but can't figure what.

Signature · 1 line
Alexey Shaposhnikov
#6 lore raw
Quoted 2 lines · Alexey Shaposhnikov

./scripts/ipipe/genpatches.sh v3.4.103
reference: v3.4.103, kernel version: 3.4.6

You are generating I-pipe patches for the diff between v3.4.103 and v3.4.6. This is probably not what you want to do.

If you want to generate I-pipe patch for 3.4.6 branch, then simply run genpatches.sh v3.4.6 or genpatches.sh with no argument.

But these patches are available here:
http://download.gna.org/adeos/patches/v3.x/arm/older/

What I would do if I were you is:

git checkout -b my-3.4 legacy/core-3.4
git merge v3.4.103

Fix the conflicts.

genpatches.sh v3.4.103, in order to generate patches for the 3.4.103 branch.

Then git merge sun-xi

Fix the conflicts and get the port running

Then follow:
http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/#Working_with_vendor_forks

To generate pre- and post- patches for the patches for 3.4.103 generated above.

Alternatively,

run genpatches.sh sun-xi

in order to generate an all-in-one adeos patch for the sun-xi kernel. It may also make sense since the kernel 3.4 is a bit old now (more than 2 years), so we are not going to include a new version of it in a next release of xenomai.

Signature · 1 line
                                                                Gilles.