[Patch] Incremental patch for updating from 2.6.35.7 to .14

Diewi

Senior Member
Jul 7, 2008
378
243
0
As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14. Might be useful for some kernel developers. I was stuck at bootloop after updating the initramfs.cpio with the updated modules, but this has nothing to do with the patch itself. If wanted I can also upload the original incremental patches.
I hope this gets integrated in some kernels soon (I heard others expermented with this as well), as it will fix the Android OS bug.

Regards,
Diewi
 

Attachments

netchip

Senior Member
Sep 2, 2011
1,154
630
0
As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14. Might be useful for some kernel developers. I was stuck at bootloop after updating the initramfs.cpio with the updated modules, but this has nothing to do with the patch itself. If wanted I can also upload the original incremental patches.
I hope this gets integrated in some kernels soon (I heard others expermented with this as well), as it will fix the Android OS bug.

Regards,
Diewi
Hey man,
Thanks, I need this :D
You can teach me howto make patches for kernels?
How to patch up the kernel for example? You are just legend :)

Netchip
 

Diewi

Senior Member
Jul 7, 2008
378
243
0
Hey netchip,

of course I can ;)

First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.

BTW, I'm assuming you're in a UNIX environment.

(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) is uncompressed.


I'll just attach the incremental patchset for completeness :) (bzip compressed patches)
 

Attachments

Last edited:
  • Like
Reactions: kgp700 and netchip

netchip

Senior Member
Sep 2, 2011
1,154
630
0
Hey netchip,

of course I can ;)

First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.

BTW, I'm assuming you're in a UNIX environment.

(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) in uncompressed.


I'll just attach the incremental patchset for completeness :) (bzip compressed patches)
Thanks for your answer :)
Where can I get normally the incremental patches?
Kernel.org?
Also, if you are interested in building a kernel with me, send me a PM, and I will answer :D

Sent from my GT-I9100
 

Diewi

Senior Member
Jul 7, 2008
378
243
0
Yes, usually at kernel.org. But lately they are only hosting the latest incremental patch for the longterm support kernels (2.6.32 and 2.6.33). Also the latest incremental patches (up to 4 minor versions in the past) for the latest kernel.

These particular patches I found using google that directed to some outdated mirrors. I just needed to adapt the version numbers of the patch and search for this string.
 

sibere

Retired Recognized Developer
May 14, 2006
2,055
375
0
Paris
While waiting for my Note, I just have downloaded kernel sources and my linux box is cross compiling the sources with the recommended toolchain (4.4.0) as I write this post :)
I just noticed that the process reports quite a few warnings...

When I have my Note, I will try a few things like undervolt (already located the bit of relevant code for this) and will add "interactive" CPU governor which is far better than the default "on demand" for interactivity.

If everything goes well, I will add this upgrade too :)

Edit:
right. Done. Waiting for the phone to test this first almost stock kernel
Code:
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
 
Last edited:

RiverSource

Senior Member
Sep 22, 2010
187
299
0
As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14.
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?

I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.

Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.

I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
 

Attachments

sibere

Retired Recognized Developer
May 14, 2006
2,055
375
0
Paris
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?

I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.

Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.

I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
Dunno if it's making a huge difference, but your GCC is 4.5.4 whereas the recommended is 4.4.0
Code:
> cat Readme_Kernel.txt 
################################################################################

1. How to Build
        - get Toolchain
                From android git server , codesourcery and etc ..
                 - arm-eabi-4.4.0
 

RiverSource

Senior Member
Sep 22, 2010
187
299
0
No, the Toolchain makes no big difference. I hoped the newer Linaro one optimzes better, but at least with CF Bench there was no big difference between 4.4.0, 4.4.3 or 4.5.4 (the results where slightly better than with stock kernel, 13300 points in stead of 13000 with stock).
 

netchip

Senior Member
Sep 2, 2011
1,154
630
0
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?

I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.

Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.

I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
How did you have included samsung drivers in a vanilla kernel?
I know now how to patch up, but how works your way?
 

Diewi

Senior Member
Jul 7, 2008
378
243
0
No, I didn't test the patch very well. I just compiled the kernel with the patches and added CF's initramfs.cpio (packed) to the zImage file. It did boot up, but wlan didn't work, as the modules in the initramfs were not compiled for this build. The "about" page showed the minor version ".14".
I used codesurgery version 2010.09.51 for this test.

@netchip:
I found a good guide how to extract the samsung specific patches in this thread (bottom of OP):
http://forum.xda-developers.com/showthread.php?t=784270
Maybe we see a 3.1 kernel soon :D
 

netchip

Senior Member
Sep 2, 2011
1,154
630
0
No, I didn't test the patch very well. I just compiled the kernel with the patches and added CF's initramfs.cpio (packed) to the zImage file. It did boot up, but wlan didn't work, as the modules in the initramfs were not compiled for this build. The "about" page showed the minor version ".14".
I used codesurgery version 2010.09.51 for this test.

@netchip:
I found a good guide how to extract the samsung specific patches in this thread (bottom of OP):
http://forum.xda-developers.com/showthread.php?t=784270
Maybe we see a 3.1 kernel soon :D
You have a dump of vanilla 2.6.35.7?
Compare these, and you have the drivers, hmm I go try.
 

Diewi

Senior Member
Jul 7, 2008
378
243
0
Or you could use the patched Samsung kernel (2.6.35.14) and compare this to the vanilla kernel. I'm absolutely not sure if this would bring any benefits, but I think that way the patches backported by Samsung would get filtered out.

Sent from my GT-N7000 using XDA App
 

netchip

Senior Member
Sep 2, 2011
1,154
630
0
Or you could use the patched Samsung kernel (2.6.35.14) and compare this to the vanilla kernel. I'm absolutely not sure if this would bring any benefits, but I think that way the patches backported by Samsung would get filtered out.

Sent from my GT-N7000 using XDA App
That's also a good idea!
 

kgp700

Senior Member
Nov 8, 2009
218
181
0
Seoul
Hey netchip,

of course I can ;)

First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.

BTW, I'm assuming you're in a UNIX environment.

(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) is uncompressed.


I'll just attach the incremental patchset for completeness :) (bzip compressed patches)
thanks!!
i'm build galaxy s2 kernel
i hope patch 2.6.35.7 to 2.6.35.14

no problem at use Incr_PatchSet_2.6.35.7-14.zip file?

and SGN_2.6.35.7-14.patch.zip better than Incr_PatchSet_2.6.35.7-14.zip?

(sorry my bad english)
 
Last edited:

kgp700

Senior Member
Nov 8, 2009
218
181
0
Seoul
As you are trying to apply the patch to a s2-kernel, I would advise you to use the original incremental patchset. You only need to go through the *.rej files and check weather the source needs a modification (see http://linuxhaven.de/dlhp/HOWTO/DE-Kernel-HOWTO-5.html). The all-in-one patch is made by a diff of the original and the patched Galaxy Note kernel, so you might miss something.
successful upgrade to 2.6.35.14
thanks:D