How do I get Ezekeel's patches of BLN, ...? - Nexus S Q&A, Help & Troubleshooting

I want to get Ezekeel's patches of BLN, live oc to build my first jellybean kernel.
I have currently applied _thalamus' work.
I tried this http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
On https://github.com/Ezekeel/GLaDOS-nexus-s/tree/bln
But I get
git remote add remoterepo https://github.com/Ezekeel/GLaDOS-nexus-s.git -b bln
fatal: Not a git repository (or any of the parent directories): .git
[email protected]:~/patch/bln$ git remote add remoterepo https://github.com/Ezekeel/GLaDOS-nexus-s.git
fatal: Not a git repository (or any of the parent directories): .git
[email protected]:~/patch/bln$
Click to expand...
Click to collapse
Am I doing something wrong?

you have to git merge the branch of Ezekeel's repo that has the feature you want
git remote add remoterepo http://.....
git remote update
git checkout your working branch
git merge remoterepo/BLN (e. g.)
:highfive:

Hmm thanks. I am trying it out now.
I hope it's compatible with Jellybean.
I tried to update the kernel to 3.0.38 but it prompts me every time if I am sure. And sometimes I have errors patching.

djjonastybe,
Thanks for your "How to compile a kernel" tutorial in the developers section. Using that I was able to 'roll my own' kernel the way I wanted it (stock JB kernel merged to latest linux version + voodoo.)
Although I didn't use it, I experimented with Ezekeel's BLX. I was unable to 'git merge' it into the aforementioned kernel from the BLX branch. (Every file had a conflit, and although git has a steep learning curve I am guessing the reason is it was merged into ICS.) I was able to get it to work using 'git cherry-pick', and I am guessing BLD is the same.
Once I had compiled my kernel I used 'dsixda-Android-Kitchen' as a frontend to unpack boot.img. I replaced zImage and repacked boot.img.
I registered with this forum to ask a question, but through trial and error I found that that it was important to use the ramdisk associated with the target ROM, rather than the stock ramdisk. Many CWM updater-scripts do this 'on the fly'...
(I was surprised to see that several kernel installers also copy a few .ko modules into /system/modules. One was for BLN, but I did not research the reason for the others...)
...
I have been reading [and reading] and 'crackflashing' for around a year, but this is my first post. I would like to thank everyone who shared up-to and including the following: CM team, koush, ezeekel, thalamus, adamg, kibmcz, legolas93, Steven676, AOKP team and mathkid. (I couldn't think of everyone, but if you have contributed then thank you!.)
--== HurryNwait ==--
Nexus S + CM10 v1.10 + my custom kernel

Related

[HowTo] Compile the Kernel Source Code for the HTC One XL

Hi guys!
Someone requested a tutorial on how to build the kernel source code, so I thought I might as well do it I'll give you a bit more information too.
Maybe this will kick start kernel development a little bit too. Who knows.
Anyway:
1. Set up your build environment as per this guide by AOSP here: http://source.android.com/source/initializing.html
This guide will be primarily aimed at Ubuntu, but it should be easy enough to do on other Linux PCs. Ubuntu is highly recommended. And don't ask about Windows.
2. Download the toolchains: http://code.google.com/p/rohan-kernel-evita/downloads/detail?name=toolchains.tar.gz&can=2
I've hosted both GCC 4.4 and GCC 4.6 (prebuilt) on my Google Code page. These are for Linux.
Download the toolchain package here: http://code.google.com/p/rohan-kernel-evita/downloads/detail?name=toolchains.tar.gz&can=2
Then un-tar the archive and extract it to your home folder so that the path to the toolchain directories are ~/toolchain/whatever-one-you-want
3. At this point you can decide which kernel source you want to download. There are really two sources.
The first choice is getting it from HTC Dev directly. This is good if you want to build your kernel for a Sense 4 ICS ROM. If you want to build for AOSP/JB, then scroll down below all the following HTC stuff.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
To use HTC's source:
Go to HTCdev.com and make an account. Then download the source code for our device (I'd recommend the "One X" source under carrier "AT&T" version "2.20". Let the zip file download and extract it to your home folder (so the path is /home/user/evita-ics..../
To build HTC's source, run these commands:
Code:
cd ~/evita-ics-whatever_the_directory_is_named
export ARCH=arm
make elite_defconfig
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
In the command above, there is "-j#". Replace the "#" with the number of CPUs you have.
Ask me about it if you need help. That should be it! Let the build go and in a few minutes you should have a zImage file located at ~/evita-ics-..../arch/arm/boot. That is the actual kernel.
To test out the zImage (kernel), connect your device via fastboot mode and type:
Code:
fastboot boot /path/to/zImage
Combined with the ramdisk, thats what makes the boot.img file. Eventually if you want to distribute your kernel, you should use an installer that injects the zImage into the boot.img or combine the zImage with a ramdisk to make a boot.img. I can do a tutorial on that later on as well.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
To get the "other" source:
This source is based off of HTC's source and includes other devices as well in it (the One S and Evo 4G LTE). Its good if you want to build JB AOSP kernels.
To download this kernel source do this:
Code:
mkdir ~/kernel
cd ~/kernel
git clone https://github.com/CyanogenMod/android_kernel_htc_msm8960.git -b android-msm-evita-3.0
This version also includes a number of optimizations and odd bug fixes present in the HTC version.
To build this second source, run these commands:
Code:
cd ~/kernel/android_kernel_htc_msm8960
export ARCH=arm
make elite_defconfig
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/arm-eabi-
In the command above, there is "-j#". Replace the "#" with the number of CPUs you have.
Ask me about it if you need help. That should be it! Let the build go and in a few minutes you should have a zImage file located at ~/evita-ics-..../arch/arm/boot. That is the actual kernel.
To test out the zImage (kernel), connect your device via fastboot mode and type:
Code:
fastboot boot /path/to/zImage
Combined with the ramdisk, thats what makes the boot.img file. Eventually if you want to distribute your kernel, you should use an installer that injects the zImage into the boot.img or combine the zImage with a ramdisk to make a boot.img. I can do a tutorial on that later on as well.
-----------------------------------------------------------------------------
The second option is also a bit better as it uses the 4.6 toolchain instead of GCC 4.4. HTC's source doesn't work with GCC 4.6 so it can't be used without changes that the second source has.
If you have any questions, feel free to post here, message me on twitter (@rohanXm), chat me on IRC (#HTC-One-XL) or PM me!
If this helped you, please consider hitting the donation link under my username on the left. Donations are never required but always appreciated.
Instead of downloading cm10 the readme inclided with the HTC source has directions for getting a tool chain which will compile the source.
Sent from my HTC One X using Tapatalk 2
Perfect. Now I just have to read.
Sent from my HTC One XL bumping it
rohan32 said:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jb
Click to expand...
Click to collapse
FYI, It looks like the branch name has changed. When I changed "jb" to "jellybean" the repo init command worked.
Rohan. You are one bad MF'er
Sent from my twin turbo'ed OneXL rocking rezound beats
rohan32 said:
2. You can either try to find a standalone package of the precompiled toolchain, or you are going to need to download a ROMs source. I'd recommend downloading a ROMs source since I've never found a good toolchain that worked for me. If you find one that works, post below
For now we will download CM10 since that seems like the defacto standard.
Click to expand...
Click to collapse
I downloaded the 2.20.502.7 kernel source and when I extracted it there was a file named evita_readme.txt which gave another, possibly more "official", location for downloading a toolchain:
--Please follow below command to download the official android toolchain: (arm-eabi-4.4.3)
git clone https://android.googlesource.com/platform/prebuilt
Click to expand...
Click to collapse
I just performed a build with this toolchain but got this error when I attempted to load zImage via fastboot:
c:\>fastboot flash boot zImage
sending 'boot' (5140 KB)...
OKAY [ 1.044s]
writing 'boot'...
FAILED (remote: image error! (BootMagic check fail))
finished. total time: 1.077s
Click to expand...
Click to collapse
I'm not sure if this is caused by the toolchain or if I screwed something up. Have you ever seen this error before?
EDIT: Ok I see what I did incorrectly. The zImage needs to be "Combined with the ramdisk". You wouldn't know how to perform this operation... would you?
denversc said:
I downloaded the 2.20.502.7 kernel source and when I extracted it there was a file named evita_readme.txt which gave another, possibly more "official", location for downloading a toolchain:
I just performed a build with this toolchain but got this error when I attempted to load zImage via fastboot:
I'm not sure if this is caused by the toolchain or if I screwed something up. Have you ever seen this error before?
EDIT: Ok I see what I did incorrectly. The zImage needs to be "Combined with the ramdisk". You wouldn't know how to perform this operation... would you?
Click to expand...
Click to collapse
You are trying to flash a zImage
To my knowledge, only booting zImages work on this device. For the time being just boot the zImage (use fastboot boot zImage)
I will make a tutorial on how to combine the zImage created with a ramdisk to make a boot.img when I get the chance
denversc said:
FYI, It looks like the branch name has changed. When I changed "jb" to "jellybean" the repo init command worked.
Click to expand...
Click to collapse
Oops, my bad! That was a mistake. AOKP uses -jb and CM uses -jellybean so I got them switched fixed now
Out of any device I've seen more people actually interested in helping and learning to help then any other community. I've watched noobs become less noobish.. I've watched skizz learn how to make themes. Hell I've learned 10 fold what I knew before this phone myself.
That is beautiful, and now such an informed, helpful post such as this.
Have great Sunday you guys! I think I might give this a shot!
Sent from my One X
I'll streamline this process in a bit, so that you don't need to download CM10
Edit: cleaned up post, now I'm uploading just the toolchains. Its a tar.gz archive, around 150mb. Much better than downloading the entire CM10 source
rohan32 said:
You are trying to flash a zImage. To my knowledge, only booting zImages work on this device. For the time being just boot the zImage (use fastboot boot zImage)
Click to expand...
Click to collapse
Thanks for your response, rohan. You are absolutely right: I was incorrectly attempting to flash zImage straight to the boot partition, and the error produced by flashboot was justified. I have since successfully "tested out" my compiled zImage by flashing it via "fastboot boot zImage" and it worked like a charm! I ported the modifications from sbryan's Blackout BeastMode kernel and I am now able to OC to 2106 MHz and UC to 192 MHz. It's been running solid for the past few hours at least
Of course, the kernel reverts back to the one stored in the boot partition after a reboot, and I want my shiny new kernel to "stick". I've done a bit of research on this topic and found some information about combining my zImage with a ramdisk into a "real" boot.img but have not yet been successful in creating a boot.img which does not bootloop after flashing it.
For example, I found an article on xda called Basic Kernel Kitchen for Minor Kernel Tweaking which points to a "kitchen sink" tool for creating a boot.img from a zImage and a ramdisk. My problem is that I don't know where to get or how to make a ramdisk. So I tried using the ramdisk from the boot.img of the ROM that I am currently running (CleanROM 4.5 DE) but just got into a bootloop. I've since been doing some yard work today so haven't gotten back to investigating further.
I also found another program named abootimg which can also produce a boot.img from a zImage abd a ramdisk, but when I tried it an error message about my zImage being "too big" was produced.
If it's not obvious yet, I am kind of fumbling around in the dark as compiling and deploying custom kernels is completely new to me! But this post was the most valuable resource I've come across in getting to this point. Thanks so much for writing it! I eagerly await your next article about creating the boot.img
---------- Post added at 06:05 PM ---------- Previous post was at 05:50 PM ----------
rohan32 said:
cleaned up post
Click to expand...
Click to collapse
Thanks for cleaning up the post rohan. I have a few follow-up questions/comments:
missing toolchains link -- the post says "Download the toolchains:" but there is no link to download anything... did you forget to paste the link?
official toolchain -- That's great that you uploaded the toolschains to save tonnes of bandwidth. The CM10 source was taking a VERY long time for me to grab. However, I imagine some people (like me) would prefer to get the toolchain from an "official" source. In the "evita_readme.txt" file of the kernel sources downloaded from HTC dev it instructs one to use the official sources from "git clone https://android.googlesource.com/platform/prebuilt". This is the toolchain that I used and it successfully built the zImage.
ko files -- I noticed in the ZIP file for Blackout BeastMode, in additional to installing the zImage it also puts a bunch of "ko" (kernel modules I believe) into the /system partition (eg. qce40.ko). Should I also be deploying .ko files from my build to the device?
Thanks!
denversc said:
Thanks for your response, rohan. You are absolutely right: I was incorrectly attempting to flash zImage straight to the boot partition, and the error produced by flashboot was justified. I have since successfully "tested out" my compiled zImage by flashing it via "fastboot boot zImage" and it worked like a charm! I ported the modifications from sbryan's Blackout BeastMode kernel and I am now able to OC to 2106 MHz and UC to 192 MHz. It's been running solid for the past few hours at least
Of course, the kernel reverts back to the one stored in the boot partition after a reboot, and I want my shiny new kernel to "stick". I've done a bit of research on this topic and found some information about combining my zImage with a ramdisk into a "real" boot.img but have not yet been successful in creating a boot.img which does not bootloop after flashing it.
For example, I found an article on xda called Basic Kernel Kitchen for Minor Kernel Tweaking which points to a "kitchen sink" tool for creating a boot.img from a zImage and a ramdisk. My problem is that I don't know where to get or how to make a ramdisk. So I tried using the ramdisk from the boot.img of the ROM that I am currently running (CleanROM 4.5 DE) but just got into a bootloop. I've since been doing some yard work today so haven't gotten back to investigating further.
I also found another program named abootimg which can also produce a boot.img from a zImage abd a ramdisk, but when I tried it an error message about my zImage being "too big" was produced.
If it's not obvious yet, I am kind of fumbling around in the dark as compiling and deploying custom kernels is completely new to me! But this post was the most valuable resource I've come across in getting to this point. Thanks so much for writing it! I eagerly await your next article about creating the boot.img
---------- Post added at 06:05 PM ---------- Previous post was at 05:50 PM ----------
Thanks for cleaning up the post rohan. I have a few follow-up questions/comments:
missing toolchains link -- the post says "Download the toolchains:" but there is no link to download anything... did you forget to paste the link?
official toolchain -- That's great that you uploaded the toolschains to save tonnes of bandwidth. The CM10 source was taking a VERY long time for me to grab. However, I imagine some people (like me) would prefer to get the toolchain from an "official" source. In the "evita_readme.txt" file of the kernel sources downloaded from HTC dev it instructs one to use the official sources from "git clone https://android.googlesource.com/platform/prebuilt". This is the toolchain that I used and it successfully built the zImage.
ko files -- I noticed in the ZIP file for Blackout BeastMode, in additional to installing the zImage it also puts a bunch of "ko" (kernel modules I believe) into the /system partition (eg. qce40.ko). Should I also be deploying .ko files from my build to the device?
Thanks!
Click to expand...
Click to collapse
Hey!
Sorry, set it to upload then got distracted Link posted
The reason why your boot.imgs bootloop is because there is a special ramdisk address that needs to be set when combining the ramdisk with the zImage, and most kitchens don't support this. You also need to set the address after setting the base value.
I will post a guide on how to make it a real boot.img whenever I get the chance.
I'm telling you people, Rohan is a BOSS. Most helpful dev I know.
Sent from my HTC One XL using xda app-developers app
rohan32 said:
Hey!
Sorry, set it to upload then got distracted Link posted
The reason why your boot.imgs bootloop is because there is a special ramdisk address that needs to be set when combining the ramdisk with the zImage, and most kitchens don't support this. You also need to set the address after setting the base value.
I will post a guide on how to make it a real boot.img whenever I get the chance.
Click to expand...
Click to collapse
I have the zImage thanks to your tutorial, but I want to know how to create the kernel zip, whenever you have time will be amazing if you can post a guide, I'm really looking forward to that guide, because i haven't been able to locate a guide that works
Sent from my HTC One XL using xda premium
rohan32 said:
Hi guys!
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/arm-eabi-
Click to expand...
Click to collapse
This is the correct make for "other source" kernel.
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/[COLOR="Red"]arm-linux-androideabi-[/COLOR]
Can you make a tutorial on how to insert governors into a kernel?
Compiling problem
Hey man,
Please help me I followed your article but when I try copile with:
make -j2 ARCH=arm CROSS_COMPILE=~/toolchain/arm-eabi-4.4.3/bin/arm-eabi
I got something like this:
/home/martin/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Thanks
UPDATE:
now its work
I went deeper and install lib32z1 with "sudo apt-get install lib32z1"... now its work
My device repositories are not available on github, But I got device tree and vendor blobs by making changes in similar device repo. That reference device's kernel's lineageos_defconfig is situated in htc msm8974 kernel repo. So how can I get lineageos_defconfig for my device, and which other my device related kernel files(.dtsi or any other) I have to push in htc msm8974 repo and get those files to make things ready for build?
Please help......

Requesting Repository Forks

If you wish to request omni forks a repository from AOSP, in order to implement a patch into omni, please post this request here. Eventually this will be carried out via jira (http://jira.omnirom.org)
When posting, please give the path to the repository, and a link to what you want to merge, or a description.
For example if you wish to cherry pick a patch into it, a link to the patch and brief description of the reason for the patch.
We'll then have that repository forked and made available on github and gerrit, permitting you to submit your change.
Before you request, please check on github to ensure it isn't already forked!
For example :
frameworks/base - Needing forked so I can introduce multi window functionality (link here to information)
hardware/broadcom/libbt - Mainly for board-specific configurations (link), but newer CM commits also look promising.
If new device bringups aren't planned yet, ignore the followings:
device/lge/p880 and kernel/lge/p880 - Device bringup (kernel has a non-standard naming at CM repo, it should be android_kernel_lge_x3 (x3 is the board name))
vendor/lge (maybe Omni should create one from scratch)
Adam77Root said:
hardware/broadcom/libbt - Mainly for board-specific configurations (link), but newer CM commits also look promising.
If new device bringups aren't planned yet, ignore the followings:
device/lge/p880 and kernel/lge/p880 - Device bringup (kernel has a non-standard naming at CM repo, it should be android_kernel_lge_x3 (x3 is the board name))
vendor/lge (maybe Omni should create one from scratch)
Click to expand...
Click to collapse
We do have a vendor/lge with just mako, although I'm not sure if its current location.
Vendor blob repos are a legal mess, which is why CM kept them at TheMuppets. We'll likely do something similar if we haven't already (I haven't synced since coming home.) Among other reasons to keep them separate is in the case of a DMCA takedown - usually that happens only to a single repo (see the HTC vendor repos earlier this year) but there's always the risk that damage might be more widespread.
android_external_clang
http://review.cyanogenmod.org/#/c/29799/2
Needed for building my msm8960 device (Motorola Photon Q, xt897c).
arrrghhh said:
android_external_clang
http://review.cyanogenmod.org/#/c/29799/2
Needed for building my msm8960 device (Motorola Photon Q, xt897c).
Click to expand...
Click to collapse
CM bootable recovery and some commits over system core
Black_Prince said:
CM bootable recovery and some commits over system core
Click to expand...
Click to collapse
No for CWM - We're working on forking TWRP in, but some fixes still need to be made to allow it to work on devices with unified recovery/boot image. (Probably one of the biggest holdups for the exynos 4210 family - Sonys with unified boot/recovery can at least use Dees_Troy's FOTAKernel trick).
Getting CWM to build in a tree requires hacks all over the tree in multiple repositories. TWRP is much more self-contained, but needs some tweaks to the build system in order to get it to build properly on a userdebug (as opposed to eng) build.
Entropy512 said:
No for CWM - We're working on forking TWRP in, but some fixes still need to be made to allow it to work on devices with unified recovery/boot image. (Probably one of the biggest holdups for the exynos 4210 family - Sonys with unified boot/recovery can at least use Dees_Troy's FOTAKernel trick).
Getting CWM to build in a tree requires hacks all over the tree in multiple repositories. TWRP is much more self-contained, but needs some tweaks to the build system in order to get it to build properly on a userdebug (as opposed to eng) build.
Click to expand...
Click to collapse
Hmm but until the twrp is ported should i test build for some galaxy devices like SG S2 note 1 with cwm ?
It will make me to push changes to git in device tree ... and will be easy to add support
Black_Prince said:
Hmm but until the twrp is ported should i test build for some galaxy devices like SG S2 note 1 with cwm ?
It will make me to push changes to git in device tree ... and will be easy to add support
Click to expand...
Click to collapse
I'll pull up a remote to use for bootable/recovery until we fork (unless plodey already forked it) from TWRP, won't be able to provide it until tonight.
However, right now, it will only build a working recovery if you do an eng build instead of userdebug. If Dees_Troy's talk at BABBQ is ever posted, that's what I was talking about when I trolled him at the end.
Something like:
Code:
. build/envsetup.sh && brunch custom_n7000-eng
or something like that.
Old
def WriteRawImage(self, mount_point, fn):
"""Write the given package file into the partition for the given
mount point."""
fstab = self.info["fstab"]
if fstab:
p = fstab[mount_point]
partition_type = common.PARTITION_TYPES[p.fs_type]
args = {'device': p.device, 'fn': fn}
if partition_type == "MTD":
self.script.append(
'write_raw_image(package_extract_file("%(fn)s"), "%(device)s");'
% args)
elif partition_type == "EMMC":
self.script.append(
'package_extract_file("%(fn)s", "%(device)s");' % args)
Requested
def WriteRawImage(self, mount_point, fn):
"""Write the given package file into the partition for the given
mount point."""
fstab = self.info["fstab"]
if fstab:
p = fstab[mount_point]
partition_type = common.PARTITION_TYPES[p.fs_type]
args = {'device': p.device, 'fn': fn}
if partition_type == "MTD":
self.script.append(
'package_extract_file("%(fn)s", "/tmp/boot.img");'
'write_raw_image("/tmp/boot.img", "%(device)s");' % args
% args)
elif partition_type == "EMMC":
self.script.append(
'package_extract_file("%(fn)s", "%(device)s");' % args)
elif partition_type == "BML":
self.script.append(
('assert(package_extract_file("%(fn)s", "/tmp/%(device)s.img"),\n'
' write_raw_image("/tmp/%(device)s.img", "%(device)s"),\n'
' delete("/tmp/%(device)s.img"));') % args)
else:
raise ValueError("don't know how to write \"%s\" partitions" % (p.fs_type,))
Flash error in write raw image ...
Also can u cherry pick these commits https://github.com/CyanogenMod/android_system_core/commits/cm-10.2/mkbootimg/unpackbootimg.c
My internal SD card isnt got recognsied , there must be some commits missing in vold ...
I dont even know it got formatted or what in flashing ...
All things working WIFI BLUTOOTH TETHERING CALL DATA MSG MMS OMNITORCH
Also u may have look over https://github.com/CyanogenMod/andr...mmit/f22626cdbecfe27c96f205710173458eab14e1a1
and https://github.com/CyanogenMod/andr...mmit/aee5f78ddec238cec016849acaf1d3007b8b1507
https://android.googlesource.com/platform/hardware/broadcom/libbt
Must haz patch:
https://github.com/CyanogenMod/andr...mmit/4028192a4fe8289bf9b7fb202a2bb2c0d85d98c3
//edit: xplod sorted it out already.
android_packages_apps_PackageInstaller
For
HALO and a feat which enables us to see version of the installed and gonna install app
I need this to make it work with my Samsung galaxy s4
I'm not sure if this is the correct thread, but the following two would be great for i9305 support
smdk4412-qcom-common -> needed for i9305 and t0lte (EDIT: I see this one has now been added)
Thanks!
Hey @pulser_g2,
wondering if i could have the following repositories added in for jf devices,
all features are fully functional with these repositories : branch: cm-10.2 for all
device_samsung_jf-common
android_device_samsung_jflteatt
android_kernel_samsung_jf
CyanogenMod/android_hardware_samsung
CyanogenMod/android_device_samsung_msm8960-common
CyanogenMod/android_device_samsung_qcom-common
@pulser_g2
I just talked to @maxwen and he told me i should post here the needed stuff:
I managed to fix the radio issues today on m7, but i need additionally these commits:
https://github.com/TheMuppets/proprietary_vendor_htc/commit/7bbbe83823525090e7d94c47b439c09a254b380f
https://github.com/TheMuppets/proprietary_vendor_htc/commit/19ed957678d13b489da78d704b27811030688078
https://github.com/TheMuppets/proprietary_vendor_htc/commit/51b006bc8f05757c7dd82361ce6d985e996af360
and please DO NOT merge this: https://github.com/TheMuppets/proprietary_vendor_htc/commit/2b86687a460030199fa42d49207957ce285c1a53
as its not needed and breaks build (I allready have everything in m7-common so no need for vendor)
Thanks in advance
@pulser_g2
we dont need to update anything, please forget my post above, i managed to get it working without all these commits and the right vendor
hardware/qcom/gps - Needing forked so I can build the needed GPS module into my Omnirom build.
The link to this repository is: https://github.com/CyanogenMod/android_hardware_qcom_gps/tree/cm-10.2
I hope it gets included, this saves me a ton of time pulling stuff from other repositories.
Greetings PsychoGame
Galaxy S I9000 (galaxysmtd)
@pulser_g2 Device repos are already forked. Kernel is missing: https://github.com/OmniGalaxyS/android_kernel_samsung_aries
It has android-4.3 and android-4.4 branches up.
Device rocking with Omni!
See you!
Fail
PsychoGame said:
hardware/qcom/gps - Needing forked so I can build the needed GPS module into my Omnirom build.
The link to this repository is: https://github.com/CyanogenMod/android_hardware_qcom_gps/tree/cm-10.2
I hope it gets included, this saves me a ton of time pulling stuff from other repositories.
Greetings PsychoGame
Click to expand...
Click to collapse
I also need android_hardware_qcom_gps (probably best from https://github.com/markcs/android_hardware_qcom_gps/tree/cm-11.0)

[KERNEL][DEV-ONLY][SGH-T959V/W] Kernel Cleanup [GingerBread][2013/12/17]

[INTRO]
Well, hello there stranger.
This is a development only thread. If you are having a problem building, installing, using the kernel or it's source code, please turn to the Q&A Thread.
If you found a bug and have a log from dmesg or logcat, or have a patch, this is where to comment on development activities.
I'm trying to keep this a short OP, because you all know the problems we've had in the past with this kernel, so @jeffsf and myself are going through the stock drop and cleaning out any unused code so we can easily port forward and possibly figure out aries kernel issues.
Currently, as you can see in the OP title, this is for GingerBread. I know, nothing terribly new. But that tag will change. Right now, it's in the cleanup phase. This OP will probably change a lot to keep up to date with the development conversations that will follow in this thread.
I've already started a bunch of work, but I'm always open to help.
[GOALS]
Clean out any code that is different from v2.6.35.7 that has nothing to do with SGS4G.
Clean up code that is different (inline) to use "#if defined" so that this platform could be disabled, and another platform could be enabled cleanly with Kconfig. (think about multiple phones in one source tree...)
Once code is cleaned up (section mismatches removed, warnings caused by code we've added, etc..) and tested, porting to newer kernel versions like 3.0.x and 3.4.x becomes much easier.
If you plan on helping out, I have a few rules:
This is a long term project. I'm looking at 3.4.x and 3.10.x android kernels. You won't find fancy bells and whistles here. As this project progresses, releases will be cut. At release points, other developers are welcome to fork and add features. I will start different branches for 'porting' and for 'features' to keep track of the two activities so we can keep moving forward.
Every commit must be tested. Make sure it boots, and area's you've affected work properly. No new build warnings or section mismatches.
Try to keep your commits targeted... An example of a non targeted commit was the v2.6.35.7 merge I made. I also cleaned up a few things that should have been done in separate commits. Oh well. The rest of the commits I made were exactly what I mean.
make it awesome, I think this device can keep working for a while and be up to date!
Try to use ./scripts/checkpatch.pl to check the changes you made to a file. Fix the errors and warnings, only on code you have changed. If it is a lint error/warning in code that is upstream code, leave it alone. We are not maintaining the kernel, we are only maintaining the changes we are making to it.
Either use 'git format-patch' to send me patches or fork the repo, make changes to your local fork, and open a pull request.
[PROGRESS]
I've cleaned out a ton of other platform cruft that has nothing to do with SGS4G, as seen here.
I tried to merge 2.6.35.14, but tfsr broke. So moving to MTD.
It would be nice to not have to rebuild a ROM over and over. Anyone feel up for making a GB MTD rom?
[BUILDING]
I use linux to build. Other platforms: Your Mileage May Vary!
Code:
sudo mkdir -p /build/galaxys4gmtd /opt
sudo chown -R $(id -un):$(id -gn) /build /opt
curl -O ~/Downloads/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 http://sourceforge.net/projects/bhundven.u/files/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2/download
cd /opt
tar jxf ~/Downloads/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
cd /build/galaxys4gmtd
git clone https://github.com/bhundven/android_kernel_samsung_galaxys4gmtd
git clone https://github.com/bhundven/android_initramfs_samsung_galaxys4g
cd android_kernel_samsung_galaxys4gmtd
git checkout -b android-samsung-2.6.35-galaxys4g-scrub-deux origin/android-samsung-2.6.35-galaxys4g-scrub-deux
./build.sh
the file in 'out/galaxys4g/arch/arm/boot/zImage' is the kernel image you'd flash to the kernel partition.
[BRANCHES]
I have a few guidelines for branching and branch names.
Name them what they are. Long branch names allow everyone to read it and know what it is.
A few of them are upstream like 'linux-2.6.35.7' is a branch of the tag 'v2.6.35.7'.
Ones that are named too similarly, like the aosp and cyanogen(aries) 2.6.35 samsung kernels get the name prepended for clarity:
Code:
cm-aries_android-samsung-2.6.35
aosp_android-samsung-2.6.35-gingerbread
As for working branches, I name it:
android-samsung-<version>-<board>-<branch topic>
Where version would be the full minor version, like 2.6.35 or 3.0. Not the full version including the stable version number.
Board is the board name. 'galaxys4g' is what we've always used for BML kernels, and 'galaxys4gmtd' for MTD kernels.
This kernel will eventually be MTD, hence the repository name.
The branch topic is something you could describe in <= 3 words.
Current branch topics:
scrub: no numbers, so the original addition of the sgs4g code.
upgrade: merged in the linux-2.6.35.7 branch (technically, the v2.6.35.7 tag in this case)
scrub-deux: After merging v2.6.35.7, there are a few rather large commits with the initial source drop and file permission fixes that make it hard to diff through commits. This branch was branched from tag v2.6.35.7 and had the difference of 'linux-2.6.35.7..android-samsung-2.6.35-galaxys4g-upgrade' applied to HEAD. This allows us to start chopping up that one large patch into smaller commits that are more easily merged/rebased to other branches (for porting).
Future branches coming up will have to do with the results of cutting up the one patch. One for drivers (each driver), one for sound, one for architecture specific, etc.
Once things are broken down this way, a lot of code will have been cleaned up and as I said in the scrub-deux branch description, it will make merging, rebasing, and cherry-picking these changes for porting purpouses.
[RELEASES]
There are currently no planed releases.
Since it looks like I'll have to start moving to MTD sooner rather then later, I'm also looking at skipping ICS and JB, and going to KK.
As for testing the build, I'm using the Stock_KJ6_+_root-One-Click.jar
Let the rom settle after it boots up, and power it off. Heimdall flash the built zImage. TADA.
If you don't understand what I just said, don't forget to ask in the the Q&A Thread.
[SOURCE]
Source
Wiki
Issue Tracker
If you're interested in helping out, or just got here because you searched "flash kernel" or the like, I prefer heimdall to manage "raw" flashing. I find it to be very robust and also runs on Linux and Mac OS.
http://forum.xda-developers.com/showthread.php?t=755265
http://glassechidna.com.au/heimdall/
https://github.com/Benjamin-Dobell/Heimdall
This is not a one-click kind of thing (though you could use one of the one-click installers to get back to GB).
I'm a command-line guy for simple tasks, so I use (v1.3.x)
Code:
heimdall flash --kernel path/to/kernel/boot.img
Edit -- When I tried to flash on my Mac using v1.4.0 (ignoring @bhundven warnings in the next post), I found that I needed to match the returned PIT partition name to get it to work:
Code:
heimdall flash --KERNEL path/to/kernel/boot.img
Make sure for now that you only use the 1.3.1 version found here.
checkpatch.log
Attached to this post is the latest checkpatch.pl output of the files different from upstream.
Generated by:
Code:
for i in $(git diff --name-only linux-2.6.35.7..android-samsung-2.6.35-galaxys4g-upgrade); do
echo -e "\nRunning checkpatch.pl on: ${i}\n";
./scripts/checkpatch.pl -f ${i};
done 2>&1 | tee out/checkpatch.log

[FAQ/HOWTO] An introduction to how-to-build a kernel for MT6589

Hi guys,
I was working on this since some time and here it is
Please read FAQ first
FAQ :
Can I compile a MT6589 kernel for every phone ?
As you know, a MT6589 kernel won't fit in every MT6589 smartphone because of specific configs/files in the kernel source tree.
So, if you compile my kernel which is expected to work on a Faea F2S don't expect it to work on a Acer Liquid E3 for example.
Conclusion : You have to get the kernel source for your phone​
How can I check my kernel source ?
Of course, this is not enough to see "source code for ZTE N986", you have to check if it's full or not and if it works.
Most people don't know what is working kernel source. You just have to read the GPL guidelines that every manufacturer have to complain with :
“ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. ”
The part which has not to be included is the toolchain but there should reference to it (which toolchain to use)
For MT6589 kernel, the toolchains arm-eabi-4.6 and arm-linux-androideabi-4.6 should be used. (mtk used arm-linux-androideabi-4.6 for kernel but it should be arm-eabi-4.6)
So now you know which toolchain to grab and then for kernel source you have to check this minimal structure :
bionic
kernel
mediatek
build
config
custom
kernel
platform​README​
If I have kernel source, can I build it for my device ?
Erm... Sometimes the structure is here but the kernel source is messy... Why ?
Because you were not provided the matching source of the kernel used on your smartphone and the reasons are multiple (I won't give details).
So, the idea is to run a first build. If you get errors, then check the step above about toolchain and structure.
The next step for fixing errors is to play with source. Good luck for that.​
What are the benefits of a custom kernel for MT6589 ?
First big benefit is to introduce kitkat compatibility because there was an issue on android binder driver in mtk kernel source.
Next benefit is to be able to remove some stuff from mtk which is useless on user side and waste ressources (a lot of debug for example).
Others benefits will be in optimizations or new features (see frandom for example)​
HOWTO :
Build from my repo (specific devices supported) - It's not for compiling your kernel source but to understand how kernel build works​I explain how to build from my repo first because it can help you to understand how you should build kernel source
Prerequisites : A build environment (actually Ubuntu Saucy x64 with build-essentials, ccache, repo, java, perl v5.14+ and openssl) and I won't explain how to get one as there is multiple howto on the net.
For repo, the idea is to create a bin directory in your $HOME (usually /home/accountname/), copy repo binary inside it and then add this bin to $PATH var.
BE CAREFULL TO WHAT YOU DO WITH $PATH VAR ! I always see people doing :
Code:
export PATH=/home/foo/bin
this is erasing $PATH var, just check before and after with echo $PATH
So the idea is to introduce your path AFTER the actual $PATH var
This is easy...
Code:
export PATH=[COLOR="red"]$PATH:[/COLOR]/home/foo/bin
And of course, $PATH is reset once you close terminal and I won't explain how to set $PATH automatically.
Once you got this, everything should be working and it will be easy
Code:
mkdir workdir
cd workdir
repo init -u https://github.com/Dr-Shadow/android_kernel_mt6589_manifest.git -b master
repo sync
Then you should get this in your workdir :
kernel
manifest
mtk-tools
out
ramdisk
scripts
toolchain​Just do :
Code:
cd kernel
./certificates.sh
./build.sh
./certificates.sh is needed only once (it's for signing flashable zip and it will setup some keys for it, just reply to questions and don't add passphrase)
And of course, the build.sh contains most things you need to know on steps for building kernel (which commands to use) and you need to know how it works ​Build from your own kernel source​
I'm building the doc... I have to remind which vars need to be overriden
Reserved
Reserved #2
Thanks for making this thread brother it will help us to learn... Subscribed
Looking forward to the how-to to build with your own kernel source.
Dr-Shadow said:
Hi guys,
I was working on this since some time and here it is
Click to expand...
Click to collapse
Thank you Dr-Shadow! This is very cool. I'm going to try it out!
Great
It's always nice to see further development on MTK Based Devices.
Regards
I'll chip in and say thanks too. Finally getting around to trying to compile Alcatel's OneTouch Hero (aka TCL Y910) provided sources.
I might be in as well with A820, but I'm relatively new to Android and have only done porting of 4.1 and 4.2 so far.
Haven't built anything although I have some knowledge about the source code and SDK, which I've only used for reference purposes and the tools from it.
Will try to compile the stock kernel this weekend, but I'm not quite sure if something else is needed, even if the kernel source seems complete to me.
I'm a quick learner and have a lot of programming experience in other technologies, even thought I'm more of a front-end developer these days.

[SCRIPT] Cherry-pick script for automatically patching Android platforms

Those of you maintaining unofficial ROMs that need some device specific patches to the android platform that are not (yet) merged into the official sources often face the same problem: When syncing with upstream you either have to cherry-pick your patches again manually, or for those changes that are not committed there may be merge errors.
Additionally, when there are many patches in various repos it can get hard to keep track of them.
I faced the same situation while working on my phone, which needs changes not merges into any official sources except for NamelessROM. And those of you who know me, know that I like scripts doing the work for me.
So I decided to write a tiny script to do all that for me.
Sure, I could have written a script like
Code:
cd frameworks/base
git cherry-pick <blah>
git cherry-pick <blah2>
cd ../../system/core
git cherry-pick <blah3>
But I just don't like hardcoding, and maintaining the script would also be way, way harder.
So I came up with this solution:
Storing the fetch URLs as well as the commit IDs in arrays. Then I can call one after another fully automatic via for-loops.
One issue remained, though: if a cherry-pick fails the next commits would also fail. Which is why the repo gets automatically reset if a cherry-pick doesn't apply properly.
An example script can be found HERE or in the attachments.
Now, the most important part for you: How do you make the script compatible with your ROMs sources?
There are just a few values you have to take care of:
Code:
##### Definable values
remote_name="p880-dev_autofetch"
paths="frameworks/native frameworks/base frameworks/opt/telephony"
commit_id[frameworks_native]='8465cdba74a038bb29598cfb4f48754b83124f48 208b1fcc0df405dc15582798c4e5406ba16201a9 49beaf826eb1c4eae3fe3202ef682a5973213c2d c83b9661c0fca41a5f43473def58379c7d7ae7d7 0c880a230ef4331cc071d45b6b06a8b0572c5a8f'
commit_id[frameworks_base]='45b92f41db68285e87980fafaa263511a6568705'
commit_id[frameworks_opt_telephony]='e7490c2c565d388212d84f627fb59c2bcccf8d61'
repo_url[frameworks_native]='[email protected]:laufersteppenwolf/android_frameworks_native.git'
repo_url[frameworks_base]='[email protected]:laufersteppenwolf/android_frameworks_base-1.git'
repo_url[frameworks_opt_telephony]='[email protected]:laufersteppenwolf/android_frameworks_opt_telephony.git'
#####
remote_name specifies the name that should be used for fetching (doesn't really matter, it just helps keeping track of what this remote is)
paths specifies the paths to the repos the script is gonna cycle through.
commit_id[name] specifies the commit IDs of the repo "name". While "name" is the path to the repo, but with underscores instead of slashes. Example: if your path is "system/core", the name you have to specify would be "system_core".
repo_url[name] specifies the URL of the repo to fetch. The naming is the same as in commit_id with underscores.
That's it. You can specify as many repos as you need, the script will cycle one after the other.
For an example on how to update the script with more repos, you may want to take a look at THIS commit
Now, how to use the script?
It's as simple as it could be:
Set up the build environment (. build/envsetup.sh)
Execute the script from whereever you want (. cherry-pick.sh)
If you're running the script for the first time or the fetched repo needs an update, you have to add the --fetch argument to (re-)fetch the repo again. (. cherry-pick.sh --fetch)
If you happen to have questions or suggestions, please feel free to let me know!
Mine!
@laufersteppenwolf Nice bro!
Interesting idea.
Will test it soon.
Does it also work for revert commits ?
(They usually take me to nano and I have to ctrl+x to apply them)
Thank you
m0d said:
Interesting idea.
Will test it soon.
Does it also work for revert commits ?
(They usually take me to nano and I have to ctrl+x to apply them)
Thank you
Click to expand...
Click to collapse
Yeah, sure, with a few modifications the script should also be able to revert commits
EDIT: Feel free to test with THIS script after you specified your commits you want to revert. But please note that I did not yet test it.
laufersteppenwolf said:
Yeah, sure, with a few modifications the script should also be able to revert commits
EDIT: Feel free to test with THIS script after you specified your commits you want to revert. But please note that I did not yet test it.
Click to expand...
Click to collapse
I am trying to set up the script,
How must one go setting up repo url for:
https://android-review.googlesource.com/#/c/104728/
5a6037f1c8b5ff0cf263c9e63777444ba239a056
git fetch https://android.googlesource.com/platform/hardware/qcom/bt refs/changes/28/104728/1 && git cherry-pick FETCH_HEAD​
I tried checking for the following,
commit_id[hardware_qcom_bt]='5a6037f1c8b5ff0cf263c9e63777444ba239a056'
repo_url[hardware_qcom_bt]='[email protected]latform_hardware_qcom_bt.git'
repo_url[hardware_qcom_bt]='[email protected]latform_hardware_qcom_bt.git'
commit_id[platform_hardware_qcom_bt]='5a6037f1c8b5ff0cf263c9e63777444ba239a056'
repo_url[platform_hardware_qcom_bt]='[email protected]latform_hardware_qcom_bt.git'​They all gave me:
Code:
*************************************************************
* Entering hardware/qcom/bt
*************************************************************
*************************************************************
* All commits applied successfully!
*************************************************************
There seems to be an error as it always says - * All commits applied successfully!
But, when I check for the commit changes they are not present.
Also,
Is it possible to have a revert in the cherry-pick script? As in before a particular cherry-pick I need to revert a commit,
so I need to check if the commit is a cherry pick or a revert,
Where as now it is sort of hard-coded:
for commit in ${commit_id[${commit_path}]}; do
sleep 1
cherry-pick "$commit"
done​and
for commit in ${commit_id[${commit_path}]}; do
sleep 1
revert "$commit"
done​An if else needs to be added somehow,
will try to test once I get the script to start working
Hi there!
I know this thread hasn't had activity for years but it is the only possible resource I find for minimally automating security patching our rom sources... I am new to building and have a couple of viable nougat builds almost ready for Xiaomi Mi Mix, and a third one with more problems. One of the last things I am working on is security patching my working directories and as I have no background in programming or linux or any technical stuff in general, I get quite lost about git cherry-picking, git fetching, patching, merging, etc.
From what I see here this script could make the whole thing easier but I do not know if it works. Anybody out there willing to give me a hand here?
Thanks in advance

Categories

Resources