element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Avnet Boards General Lab 3_2 git apply failed
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 4 replies
  • Subscribers 365 subscribers
  • Views 597 views
  • Users 0 members are here
Related

Lab 3_2 git apply failed

Former Member
Former Member over 12 years ago

Hi,

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?

Thanks

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 12 years ago

    It worked for me.  Make sure you are in the right directory. Use "ls -l drivers/Kconfig" to make sure Kconfig file is there.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Hi thchiou,

    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?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube