harcokuppens / xenomai3_rpi_gpio

handling gpio input,read and interrupts on the raspberry pi 1/zero, 2, 3
21 stars 12 forks source link

apply kernel patches issue #1

Open deeptuuk opened 4 years ago

deeptuuk commented 4 years ago

hi man! i am stuck in the kernel patch, could you tell me why you fix the ipipe-core-4.9.51-arm-4.patch. and what is your methods. nearly i want to apply ipipe-core-4.9.51-arm-4.patch to linux 4.9.0, but i don't konw how to start with it. could you tell me how to modify it, and some tips or tools. thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!

harcokuppens commented 4 years ago

Hi,

Basicly it is just looking at the patch file source and try to fix it. Often a patch file is for an older version of the source files, and since then some of the source files could have changed.

First study how to apply the patch command. Read the documentation for patch. (eg. man patch)

So get the version of the original source where the patch file was meant for. The take a copy of the new source, and run the patch file and see where the errors in the patch file are. Then manually look at the patch file and the new and original source and try to figure out why it is going wrong.

Often the line numbers of the range for a patch can be off because some extra content is added to the source file far before the lines where the patch should be applied. But in general patch can deal with that, and find self the new range where it must apply the patch.

Sometimes something is changed in the context of the patch, but not the patch lines itself. Often you can fix it by fixing the context lines around the patch in the patch file. Because patch files display some context lines around the lines to change. If there for instance in the context a line is added then your patch doesn't work anymore. By adding this line manually to the patch file then it should work again.

However sometimes there are changes in the newer source which are not compatible anymore with the content of the patch. So then the only hope is to understand the code, and the idea of the patch and try to fix it yourself.

Sometimes it can be easy, but sometimes you need to do some smart patching.

good luck, Harco Kuppens

deeptuuk commented 4 years ago

ok,thanks for your reply. maybe it's so hard for me now,but i will never give up. for some reason, could you help fix the specific version of linux, i will send the version to your email, and could you send me the fixed patch. i will very appricate your help! and this is my gmail: zhouy2048@gmail.com

deeptuuk commented 4 years ago

linux-xlnx-xlnx_rebase_v4.9_2017.4.zip https://drive.google.com/file/d/1bBKDJBzPRiTak7AO3mh7jKz_excBxGQt/view?usp=drive_web ok,thanks for your reply. maybe it's so hard for me now,but i will never give up. for some reason, could you help fix the specific version of linux, i will send the version to your email, and could you send me the fixed patch. i will very appricate your help!

Harco Kuppens notifications@github.com 于2019年12月10日周二 下午6:23写道:

Hi,

Basicly it is just looking at the patch file source and try to fix it. Often a patch file is for an older version of the source files, and since then some of the source files could have changed.

First study how to apply the patch command. Read the documentation for patch. (eg. man patch)

So get the version of the original source where the patch file was meant for. The take a copy of the new source, and run the patch file and see where the errors in the patch file are. Then manually look at the patch file and the new and original source and try to figure out why it is going wrong.

Often the line numbers of the range for a patch can be off because some extra content is added to the source file far before the lines where the patch should be applied. But in general patch can deal with that, and find self the new range where it must apply the patch.

Sometimes something is changed in the context of the patch, but not the patch lines itself. Often you can fix it by fixing the context lines around the patch in the patch file. Because patch files display some context lines around the lines to change. If there for instance in the context a line is added then your patch doesn't work anymore. By adding this line manually to the patch file then it should work again.

However sometimes there are changes in the newer source which are not compatible anymore with the content of the patch. So then the only hope is to understand the code, and the idea of the patch and try to fix it yourself.

Sometimes it can be easy, but sometimes you need to do some smart patching.

good luck, Harco Kuppens

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/harcokuppens/xenomai3_rpi_gpio/issues/1?email_source=notifications&email_token=AHC7EGCZWSWZJCASOVQG3JTQX5UZFA5CNFSM4JY32KVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOXKAQ#issuecomment-563967234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHC7EGF5SLVT6HS6VW4KHRLQX5UZFANCNFSM4JY32KVA .

harcokuppens commented 4 years ago

sorry, I cannot do that, because that is a lot of work, which I don't have currently available, just try it yourself, and If you don't manage, You can always send the xenomai mailing list with specific patching problems you didn't  manage to solve.

best regards, Harco Kuppens

On 11/12/2019 03:04, deeptuuk wrote:

linux-xlnx-xlnx_rebase_v4.9_2017.4.zip https://drive.google.com/file/d/1bBKDJBzPRiTak7AO3mh7jKz_excBxGQt/view?usp=drive_web ok,thanks for your reply. maybe it's so hard for me now,but i will never give up. for some reason, could you help fix the specific version of linux, i will send the version to your email, and could you send me the fixed patch. i will very appricate your help!

Harco Kuppens notifications@github.com 于2019年12月10日周二 下午6:23写道:

Hi,

Basicly it is just looking at the patch file source and try to fix it. Often a patch file is for an older version of the source files, and since then some of the source files could have changed.

First study how to apply the patch command. Read the documentation for patch. (eg. man patch)

So get the version of the original source where the patch file was meant for. The take a copy of the new source, and run the patch file and see where the errors in the patch file are. Then manually look at the patch file and the new and original source and try to figure out why it is going wrong.

Often the line numbers of the range for a patch can be off because some extra content is added to the source file far before the lines where the patch should be applied. But in general patch can deal with that, and find self the new range where it must apply the patch.

Sometimes something is changed in the context of the patch, but not the patch lines itself. Often you can fix it by fixing the context lines around the patch in the patch file. Because patch files display some context lines around the lines to change. If there for instance in the context a line is added then your patch doesn't work anymore. By adding this line manually to the patch file then it should work again.

However sometimes there are changes in the newer source which are not compatible anymore with the content of the patch. So then the only hope is to understand the code, and the idea of the patch and try to fix it yourself.

Sometimes it can be easy, but sometimes you need to do some smart patching.

good luck, Harco Kuppens

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub

https://github.com/harcokuppens/xenomai3_rpi_gpio/issues/1?email_source=notifications&email_token=AHC7EGCZWSWZJCASOVQG3JTQX5UZFA5CNFSM4JY32KVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOXKAQ#issuecomment-563967234, or unsubscribe

https://github.com/notifications/unsubscribe-auth/AHC7EGF5SLVT6HS6VW4KHRLQX5UZFANCNFSM4JY32KVA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harcokuppens/xenomai3_rpi_gpio/issues/1?email_source=notifications&email_token=ABKRB4OI6Y3KAPHJNGYKLMTQYBDCZA5CNFSM4JY32KVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGRTHQI#issuecomment-564343745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKRB4LCPWVRS6LKY5HHWRDQYBDCZANCNFSM4JY32KVA.

FlyBoyA commented 8 months ago

Hi, Do you have any idea about the version of the kernel & ipipe like when I see the version of ipipe its not as latest as the version of rpi and its getting difficult to find the compatible version to patch

do you have any suggestions?