Jump to content

CREATE_PATCHES and how to diff two folders and copy over just the diffs or something


Recommended Posts

Posted

I have playing with compile.sh CREATE_PATCHES=yes

There is a guide here https://zuckerbude.org/armbian-using-create-patches/

I also read this before https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-patches

 

So if someone is a profession developer and understands how to use diff and patch commands, then please understand that I am not, so please help but keep it as newbie as you can.

 

So when I came across this CREATE_PATCHES option I though, ooh that's clever.  I can make changes to u-boot or kernel source and it will create the patch files for me, and then I can put those patch files on my github fork of build, or in userpatches or whatever and it will automate the changes.  Very clever.  I think I have understood that that is what it is for.

 

But what if I have an entire u-boot source folder that someone else from an entirely different Linux distro already did?  But which is a patched version of the one that Armbian build is using for some very similar board. So probably the difference isn't that great.

 

Is there a clever way to run compile.sh CREATE_PATCHES and then when it stops to somehow diff the "build/cache/sources/u-boot-rockchip64/stable-4.19-rock3" folder (for example) that it's prompting me to change with the local complete u-boot folder that I already have either locally or on github, make the diff output only copy the changes that the other Linux distro guy did, and then press enter in the compile.sh window so that it kind of reverse engineers all of those diffs and makes an armbian patch file that will automate the whole thing?

 

Is that even realistic or is it just mad and I completely misunderstood or something?

Posted

Depending on how different the u-boot sources are, the patches may or may not work.

 

You can always make those changes by hand to create a new set of patches, but might be some work.

 

Unfortunately, if it were simple, Armbian would not be dropping support for some boards.

Posted
On 12/5/2021 at 11:20 PM, dieselnutjob said:

So if someone is a profession developer and understands how to use diff and patch commands, then please understand that I am not, so please help but keep it as newbie as you can.

 

If you are not yet understanding the basics around diff/patch (which are nearly the same thing), and for that matter, git itself, I would respectfully submit that spending a little time learning these tools will greatly help you on your journey.

 

If you are interested, I could recommend some good resources.

 

It sounds to me (after reading the rest of your post) that a little light has gone off, and you now understand the reason why these tools are used.  And to answer your question, no you are not wrong in the general thrust of your thinking.  In fact doing something like that (creating a patch) is actually very easy with some basic understanding of git.

 

Whether the specific combination of patches will work however is a whole another story; I don't want to speak for tparys but I assume that is what he meant with his "not simple" comment.

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines