It worked for me. Make sure you are in the right directory. Use "ls -l drivers/Kconfig" to make sure Kconfig file is there.
Thanks for your reply.
I am sure Kconfig is there, and I think I am in the correct directory in which is /home/user_name/linux-xlnx/
I am using xilinx 14.5, so I went through the document "ZedBoard_Open_Source_Linux_USB_Host_14_5-Tutorial" first, and then I started the following labs in "Zynq_Linux". Is it possible that the problem is coming from different xilinx SDK versions?
SDK version does not matter. "git apply" is a version control command to apply changes to file (like a patch). The error means the software either can't find the file, or the files has being change so much that the tool doesn't know how to apply the patch anymore
Looks like they have updated the repository recently, which is why the patch doesn't work anymore. You should try to revert to an earlier version of the code than try to apply the patch. Check out git reference for how to do that.
This problem is not your fault. it appears that the kernel tree got updated but this patch not yet. if you compare what the patch is trying to change (the numbers in the error are the line mubers) is different than what is actually in the files they want to change.
I suspect you will get the same problem as me after this but if you want to apply the patch you can adjust the patch to mimic the new environment.
line 29 -> change both 138's to the line before the last source in the drivers/Kconfig file. in my case: 162.
line 31 -> change the line to the last source of the same file. in my case source "drivers/ipack/Kconfig"
line 42 -> change the numbers to the last line of your drivers/Makefile and the numbers right after to 0 and 1. Additionally, after @@ add the last line of the Makefile.
in my case, it looks like this:
@@ -152,0 +152,1 @@ obj-$(CONFIG_PMODS) <twice a tab> += pmods/
below this line, remove the lines so "+obj-$(CONFIG_PL) <twice a tab> += pl/" is directly below it.
if you just copy-paste the lines in the correct location you should always have the right amount of tabs, this forum just doesnt seem to like spaces or tabs...
This should allow you to apply the patch as it does for me. i get stuck right after when i make the kernel as the compiling of the module goes wrong.
I am trying Lab 3_2, step 9.
When I type the command "git apply 0001-Xilinx-ARM-Driver-for-LED-brightness-device.patch," the console shows the following errors:
error: patch failed: drivers/Kconfig:138
error: drivers/Kconfig: patch does not apply
error: patch failed: drivers/Makefile:134
error: drivers/Makefile: patch does not apply
Does anyone have the same issue?