patch apply error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

patch apply error

跳至解决方案
11,481 次查看
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.

标签 (1)
0 项奖励
回复
1 解答
11,449 次查看
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 项奖励
回复
4 回复数
11,408 次查看
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 项奖励
回复
11,461 次查看
joanxie
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
11,458 次查看
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 项奖励
回复
11,450 次查看
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 项奖励
回复