Hi Andreas,

my intension is to create a patch file (containing the firmware) which will be applied at the kernel.prepare step using the series file. (Then at the kernel.compile step the firmware should be compiled into the kernel.)


Best regards,

Matthias

------ Originalnachricht ------
Von: "Andreas Bießmann" <andreas.biessm...@corscience.de>
An: ptxdist@pengutronix.de; "Matthias Klein" <matthias.kl...@optimeas.de>
Gesendet: 28.01.2013 15:31:38
Betreff: Re: [ptxdist] Binary patches
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.kl...@optimeas.de
 <mailto:matthias.kl...@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 via email to