mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.biessmann@corscience.de>
To: ptxdist@pengutronix.de, Matthias Klein <matthias.klein@optimeas.de>
Subject: Re: [ptxdist] Binary patches
Date: Mon, 28 Jan 2013 15:31:38 +0100	[thread overview]
Message-ID: <51068BCA.4040806@corscience.de> (raw)
In-Reply-To: <emaf3af07a-4ae2-422a-8881-4f00e80256b8@nb-mak>

Hi Matthias,

On 28.01.2013 14:19, Matthias Klein wrote:
> Does anyone have a tip howto make a binary patch for ptxdist ?

What is your intention here? Do you want a binary BLOB which should be
applied later on or would you like to have a patch that contains a
binary BLOB (your firmware file).

> ------ Originalnachricht ------
> Von: "Matthias Klein" <matthias.klein@optimeas.de
> <mailto:matthias.klein@optimeas.de>>
> An: ptxdist@pengutronix.de <mailto:ptxdist@pengutronix.de>
> Gesendet: 23.01.2013 11:54:55
> Betreff: [ptxdist] Binary patches
>> Hello,
>>  
>> I try to create a patch file for the kernel which adds a binary file
>> (firmware blob).
>> I tried git diff --binary but then I get following error from patch:
>>  
>> applying 'firmware.diff'
>> patch: **** Only garbage was found in the patch input.
>>  
>> How can I create a patch for binary files?

I used to put commits into the patch directory that can be sent via
email (aka 'git format-patch). If you export you patch that way git will
handle binary files probably:

---8<---
diff --git a/CKFA.bin b/CKFA.bin
new file mode 100755
index
0000000000000000000000000000000000000000..9befbf415a9fd8bcc19655ca1dc50966d248ebba
GIT binary patch
literal 6668
zcmbtZ3w)DBwx91y`ZfLf<Y`}~vGPa>FOhY<B9MGZ)AUJ+H4EN?Jo-okn_eCttS?$9
zP*ODI0|OKva4nDz*5!(Ny{v*D0akga
...
--->8---

vs

---8<---
diff --git a/CKFA.bin b/CKFA.bin
new file mode 100755
index 0000000..9befbf4
Binary files /dev/null and b/CKFA.bin differ
--->8---

BTW the preferred way to fill the patches directory is:

% ./p clean <package>
% mkdir -p patches/<package>-<version>
% touch patches/<package>-<version>/series
% ./p extract --git <package>
% cd platform-<config>/build-target/<package>-<version>

make your changes in this git reposritory

% git ptx-patches
% cd -
% ./p clean <package>
% ./p extract <package>

And watch the patching foo

Best regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2013-01-28 14:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 10:54 Matthias Klein
2013-01-28 13:19 ` Matthias Klein
2013-01-28 14:31   ` Andreas Bießmann [this message]
2013-01-28 14:38     ` Matthias Klein
2013-01-28 15:06       ` Andreas Bießmann
2013-01-29  8:39         ` Matthias Klein
2013-01-29  9:58           ` Andreas Bießmann
2013-01-29 10:20             ` Juergen Beisert
2013-01-29 10:26               ` Matthias Klein
2013-01-29 11:12                 ` Andreas Bießmann
2013-01-29 12:06                   ` Bernhard Walle
2013-01-29 12:30                     ` Bernhard Walle
2013-01-29 13:29                       ` Andreas Bießmann
2013-01-29 13:40                         ` Bernhard Walle
2013-01-29 10:29               ` Bernhard Walle
2013-01-28 19:14       ` Robert Schwebel
2013-01-29 13:12       ` Bernhard Walle
2013-01-29 13:45         ` Matthias Klein
2013-01-31 10:32     ` Alexander Stein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51068BCA.4040806@corscience.de \
    --to=andreas.biessmann@corscience.de \
    --cc=matthias.klein@optimeas.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox