patch apply error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

patch apply error

Jump to solution
3,083 Views
Enuwai
Contributor III

I got the following error when applying the patch in section 5.2 of AN12195.

$ git apply 0002-Add-remote-core-share-memory-driver.patch
0002-Add-remote-core-share-memory-driver.patch:1277: trailing whitespace.

error: patch failed: drivers/mxc/Makefile:10
error: drivers/mxc/Makefile: patch does not apply
$

The target Linux version is L4.9.51.
I used the file attached to AN12195SW for the patch.

Labels (1)
0 Kudos
1 Solution
3,051 Views
joanxie
NXP TechSupport
NXP TechSupport

you can find that the patch name is imx_4.9.88_2.0.0_ga_patches, so the SW we released are for 4.9.88, document is just for an example

View solution in original post

0 Kudos
4 Replies
3,010 Views
RachelGomez123
Contributor I

Troubleshoot Git Patch Error: patch does not apply
This error occurs when Git can not determine how to apply your patch. Below is a command you can use to fix this error.

git apply --reject --whitespace=fix mychanges.patch
Note the --reject argument. We use it to instruct Git to patch the files it can and create a .rej file containing what it cannot figure out how to patch.

Then, you can manually resolve the conflicts. Alternatively, you can use the command below.

git apply --ignore-space-change --ignore-whitespace mypatch.patch

 

Regards,

Rachel Gomez

0 Kudos
3,063 Views
joanxie
NXP TechSupport
NXP TechSupport

this patch is for 4.9.88, pls upgrade your bsp to test again

0 Kudos
3,060 Views
Enuwai
Contributor III

Hi Joanxie,

thank you for your reply.
Build passed with imx_4.9.88_2.0.0_ga.
In AN12195, chapter 5.1.1, the linux-imx branch is now imx_4.9.51_imx8m_ga, but is it correct imx_4.9.88_2.0.0_ga?

Best Regards

0 Kudos
3,052 Views
joanxie
NXP TechSupport
NXP TechSupport

you can find that the patch name is imx_4.9.88_2.0.0_ga_patches, so the SW we released are for 4.9.88, document is just for an example

0 Kudos