[Q] empty folder after git clone - Samsung Galaxy Nexus

at http://source.android.com/source/downloading.html there are a list of URL's to clone the android kernels from...
everytime I do "git clone https://android.googlesource.com/kernel/samsung.git"... the folder is empty...
I've tried it numerous times ( using Archlinux and Ubuntu as they both have different version's of git in their repo )
Is there something wrong with the repo?
I have tried
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
and all three are the same with just a ".git" inside and nothing else...
I've cloned the android framework folder fine with no issues using the "repo" script
edit: nevermind... solved it... forgot about the "git branch -a" command

Help!
sinatosk said:
at http://source.android.com/source/downloading.html there are a list of URL's to clone the android kernels from...
everytime I do "git clone https://android.googlesource.com/kernel/samsung.git"... the folder is empty...
I've tried it numerous times ( using Archlinux and Ubuntu as they both have different version's of git in their repo )
Is there something wrong with the repo?
I have tried
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
and all three are the same with just a ".git" inside and nothing else...
I've cloned the android framework folder fine with no issues using the "repo" script
edit: nevermind... solved it... forgot about the "git branch -a" command
Click to expand...
Click to collapse
Sorry to ask but i am total noob in using git and i am not able to understand how to use the command "git branch -a" ?
I am trying to get source code for galaxy nexus.

Related

How to build an AOSP Kernel?

So I pretty much would like to start building my own kernels and Roms from AOSP, but not sure where to start. I have downloaded the SDK already, and started downloaded some file with git and these commands:
git clone https://android.googlesource.com/kernel/omap
cd omap
git checkout origin/android-omap-tuna-3.0-mr0
but the guides I've been reading don't offer much more help. And then there is a toolchain of some sort? I can get my way around linux fairly well and have built my own kernels about a year and a half ago for my Vibrant, but took a completely different course.
Was wondering if someone could point me in the right direction, thanks!
You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.
RogerPodacter said:
You're on the right track. Use Linux ubuntu, install all the packages, the Android tool chain, then just clone the aokp kernel like you showed. But you had the wrong repo link. Go to team kangs github page, go to the nexus kernel, then at the top will be their git link in a box.
Git clone "link"
Then just run the make command in terminal. Make sure you navigated yo the downloaded kernel folder.
Click to expand...
Click to collapse
Thanks a lot, will try that. The link on their page is AOSP?
Sent from my Galaxy Nexus using XDA
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Sweet will continue with these steps and look onto the merge
Sent from my Galaxy Nexus using XDA
bk201doesntexist said:
The guy is asking us on how to clone AOSP tuna kernel tree, and you tell him to clone teamKang kernel project?
@op, no, you dont have the incorrect url. Clone from there, then checkout branch android-omap-3.0.
Type:
'make tuna_defconfig'
'make -j4'
You'll then have a zimage in arch/arm/boot, which you'll need to merge with a compatible ramdisk (either by fastboot or manually).
sent from my i9250
Click to expand...
Click to collapse
Oh holy crap haha I completely thought he asked about aokp kernel, my bad I didn't read.
AOSP kernel for HTC Explorer/Pico
Can you tell me how to build aosp kernel for htc explorer?
monishvster said:
Can you tell me how to build aosp kernel for htc explorer?
Click to expand...
Click to collapse
Just do the same thing, but instead sync the htc kernel rather than the nexus. Go search and find out if source code has been released for that phone.
Then just run the make command.
Somebody call 911, we've been hijacked
Note: 'make tuna_defconfig' is for maguro, i dont know what is the name of default config file for the htc, why should we? User should refer to htc explorer subforum @xda or to kernel documentation.
Sent from my i9250

how to create a kernel for JB ???

Hello guys, I want to compile a kernel, but I've never done before ... Who could help me??. thanks!
./build_kernel. sh
Sent From My Sprint Galaxy Nexus
Sync the repo, run the make command. Gotta do that on Linux OE a Mac.
Can you be more specific??
Uh...
http://source.android.com/source/building-kernels.html
The info is out there friend. The only thing missing from the above url is after you clone, you must checkout the repo:
Code:
git checkout origin/android-omap-tuna-3.0-jb-pre1

[Guide] Building from sources [Kernel only for now]

Hello everyone.
This guide will help you in building a kernel from source for your Nexus 10
Later, when 4.2 hits AOSP, i'll add a guide for building that too
You will need a computer running Linux / OSX to build the kernel, natively, or via a VM.
This guide assumes you’re running any Linux distro.
Getting a toolchain:
You need a toolchain to build the kernel.
The preferred one is Google’s toolchain, the same they use to build AOSP.
In a terminal, type:
Code:
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/[/url]
export PATH=$PATH:$(pwd)/arm-linux-androideabi-4.6/bin
export CROSS_COMPILE=arm-linux-androideabi-
TIp: paste the export statements in your ~/.bashrc to have them exported each login.
Getting the kernel source:
The kernel source for Nexus devices is available from Google’s servers.
Source : https://android.googlesource.com/kernel/exynos
Github Mirror: https://github.com/chirayudesai/android_kernel_exynos
Open the terminal, and type the below commands to get the kernel source on your computer.
Code:
mkdir -p android/kernel
cd android/kernel
For Nexus 10, we get the exynos kernel sources.
Code:
git clone [url]https://android.googlesource.com/kernel/exynos[/url]
Next, we change our directory to the newly fetched source.
Type
Code:
cd exynos
Figuring out what to build:
Now, we need to figure out which revision to build.
You need to be exactly sure about this, otherwise there are chances that the compiled kernel won’t work.
The commit to build upon can be found by a few ways.
To get the kernel sources matching the device tree, type the below in the device tree.
Code:
git log kernel
Then type the below in the kernel tree
Code:
git checkout <commit>
The commit of the version running on the current review units is 52f6ab1 (probably), which is same as branch android-exynos-manta-3.4-jb-mr1-fr .
Compiling:
Name of defconfig: manta_defconfig
cd to the directory of the kernel source, then type the below in a terminal.
Code:
export ARCH=arm
export SUBARCH=arm
Code:
make <name_of_defconfig>
make
The kernel image will be ready at arch/arm/boot/zImage
To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Nice work, it's been nice to see some instructions on building additional kernel modules too.
Sent from my GT-I9300 using Tapatalk 2
Great guide! I look forward to seeing your tutorial on compiling 4.2 from source .
Sent from my SCH-I535 using xda premium
Super awesome! I'm currently thoroughly:good: learning the rom building process with my nexus... ill get to this!
looking forward towards the development
Great! This is very helpful and useful
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
matt95 said:
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
Click to expand...
Click to collapse
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
cdesai said:
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
Click to expand...
Click to collapse
oh, now i get this :good:
i was able to make a build tonight from aosp, waiting for my device to arrive & then ill be able to test. but as far as i could tell the output sizes were pretty on compared to the factory image files i extracted http://renzy.me/aoi
...just realized i didnt extract proprietary binaries.
Hello, Cdesai.
Thanks for your guide!
I will do my best to learn it.
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
jrod091 said:
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
Click to expand...
Click to collapse
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
renzyyy said:
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
Click to expand...
Click to collapse
yeah that's true, but for instance with HTC S-OFFed devices you don't even need to flash the boot.img....
cdesai said:
... To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Click to expand...
Click to collapse
you can extract the contents from the factory image & use getramdisk.py to get the ramdisk.img out of the current boot.img (or use this ramdisk.img)
then once youve compiled the kernel successfully, use mkbootimg from android_bootimg_tools.tar.gz to repack your boot.img.
if you want to just test...
fastboot boot [new-boot.img]
and flash if satisfied...
fastboot flash boot [new-boot.img]
just tested out if anyone wants some verification... screenshot
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Is there any chance of this becoming an OC kernel in the future?
craigacgomez said:
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Click to expand...
Click to collapse
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
sam3000 said:
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
Click to expand...
Click to collapse
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
craigacgomez said:
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
Click to expand...
Click to collapse
I had actually just got to the point of realising I could make it work by explicitly setting the unc path in mount command options. The missing patch would explain it.

Feel like a Noob.. How to build Cyanogenmod <nightly> for d850

OK. I thought this would be easy.
I've built for TI based platforms and know a bit about the process..
So I went to the site of sites https://wiki.cyanogenmod.org/w/Build_for_d855 though for the d855 and thought that I could glean enough to get things runing using the manifest stored in the current cm-12.1 that is in my d850..
Got a sweet build environment.. 16 core/32hypercore with 48GB ram and 1TB SDD RAID.
Got the code downloaded using
repo init -u https://github.com/CyanogenMod/android.git -b cm-12.0 << Maybe I should have used 12.1 but ignore for now
repo sync << Waited a long time and it loaded up a ton of stuff so that looks good..
Now I try to do something I've done on TI platforms
source build/envsetup.sh << but I get an error
The error is
bash: build/envsetup.sh: line 1: syntax error near unexpected tokin '{'
bash: build/envsetup.sh: line 1: function hmm() {
Ive looked and I cant figure out why this doesnt work...
ARGH!!!
Update
Well the only update I have now is that I got the manifest out of my d850 and placed it into the repo and did a repo sync and I saw that the repo updated the branches to 5.1.1 stuff..
Still cant get the source build/envsetup.sh to work... same error...
did you update all the repos to 5.1.1?
try ". build/envsetup.sh" (yeah it's a period before build ) instead of "source build/envsetup.sh"
i also need to know what OS are you using on your environment.. i advice UBUNTU 14.04 64bit to build android since is the most compatible try to use that maybe it can help..
http://forum.xda-developers.com/lg-g3/development/guide-how-to-build-cyanogenmod-12-t2953132 this is my old guide to build cyanogenmod (it's referred for cm12 since it's old but might still help)

Help with cherry picking and making fixes to a ROM (cm13)

so I decided to try and make unofficial cm13 builds for d2att, but the network isn't working, and I need help learning how to fix bugs
I feel like I can follow the instructions in this guide: http://forum.xda-developers.com/showthread.php?t=2763236
but I don't know what I should cherry pick to fix the network issue UPDATE: network fixed! / where to look / what to do in general
Here's my development thread:
http://forum.xda-developers.com/galaxy-s3-att/development/rom-unofficial-cm13-d2att-t3280433
Also, how do I use themuppets for the proprietary blobs? For that build, ^^^ I just used the extract-files.sh while running matrixzone's build (linked in my development thread) thanks @jason2678
oh and how do I set the number of threads to use when using the brunch command? All i remember is you type "-j#" or something with # being the number of threads you want to assign I'll just stick to using brunch
For the muppets I add this line to ./.repo/local_manifests/roomservice.xml when I build for this phone:
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-13.0" />
Do another repo sync after adding that to roomservice and you'll sync all the blobs from TheMuppets. That's probably overkill because it gets you all kinds of other samsung stuff, but if you have hard drive space and bandwidth its dead simple and gets a working build with no fuss. You probably just need d2att, d2-common, msm8960-common, and qcom-common to build for this phone.
I always set j = # cores X 2, but that's just something I read to do somewhere.
And if you haven't done it yet set up ccache unless you have a really awesome machine to build with. Saves you tons of time.
Good luck. :good:
Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
Code:
brunch d2att
The build starts.
and entering
Code:
brunch d2att -j8
gives an error, saying I have an invalid lunch combo
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Also, I have ccache set to 100GB
thanks so much!
Sent from my SAMSUNG-SGH-I747 using Tapatalk
Arunscape said:
Thanks! You helped me with themuppets but idk where to type the -j# because as soon as I enter
I do remember when I tried compiling slimkat a year ago, the build command was
Code:
make -j# bacon
would that work for compiling cyanogenmod instead of typing in brunch? nope doesn't work What's the difference? lol
Click to expand...
Click to collapse
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.
jason2678 said:
Bacon is the code name for oneplus one; sorry if you know that and were just giving an example command. That command might be giving errors if you haven't run breakfast for bacon. The syntax looks right. I think this should start a build:
Code:
breakfast d2att
. build/envsetup.sh
make -j# d2att
But I usually just do
Code:
brunch d2att
to kick off a build.
I haven't been messing with this too much lately. This phone isn't my daily driver anymore, and my daughter doesn't take too kindly to when I want to take her phone to flash an experimental build.
Click to expand...
Click to collapse
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^
Arunscape said:
ohhhhhhh I see that makes sense, so brunch is just a shortcut basically so you can type less I'll try it out and report back myself ^_^
Click to expand...
Click to collapse
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.
jason2678 said:
Yeah, and now that I've had a few cups of coffee I think I mislead you on that earlier post. bacon is the codename for the 1+1, but I think it is also CMs shortcut for building the compiled ROM into a flashable zip.
Code:
. build/envsetup.sh
brunch d2att
is the same thing as
Code:
. build/envsetup.sh
breakfast d2att && mka bacon
You're right, it just saves you a little typing. Pretty much every I've fiddled with (Slim, PAC, CM, Chroma) has some shortcut way like that to kick off a build. Sorry about that.
Click to expand...
Click to collapse
Yep that code above works, but I still can't specify the amount of threads I want to use.
Example: if I type
Code:
source build/envsetup.sh
breakfast d2att
make -j4 bacon
I get an error
but if I only type
Code:
source build/envsetup.sh
breakfast d2att
make bacon
it works
I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.
jason2678 said:
I think with CM it is recommended to just use brunch or mka. mka is supposed to automatically take advantage of all the threads available. That way you don't have to worry about how many cores, Intel or AMD, is HyperThreading available, etc. You don't even need to specify -j, it should just go to an optimized default for your hardware.
If you use make it might only be using a portion of the power of a modern, multi-core processor.
Click to expand...
Click to collapse
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
I'll just stick to using brunch.
Arunscape said:
oh. I thought mka was a typo lol.
update: I just tried building with mka and it returned an error also. but brunch works fine
Click to expand...
Click to collapse
shows what I now
now I'm wondering how to add/remove apps from the source code so that when I build, certain apps are pre-installed.
Example: removing cyanogenmod's file manager and installing es file explorer
removing trebuchet and replacing it with google now launcher
installing youtube

Categories

Resources