Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to checkout msm source code for Android Hammerhead kernel

To checkout source code for msm Hammerhead android kernel, I followed the following steps.

[1] Downloaded msm kernel source for android.

$ git clone https://android.googlesource.com/kernel/msm.git

[2] Checked commit message for Hammerhead kernel in my AOSP.

commit 8b392a30f1228e890fa0f7b39598f3b1c73cea94

Author: The Android Open Source Project
Date: Thu Dec 5 15:38:00 2013 -0800

Snapshot to fc777b6d3b2b20ba7270059dd2df284c94844abf

Change-Id: I81ee5ccb10876cbc1413442a7bc256e888c0fcdd

[3] In msm directory where i downloaded source code in [1],

git checkout fc777b6d3b2b20ba7270059dd2df284c94844abf

I get the following error

fatal: reference is not a tree: fc777b6d3b2b20ba7270059dd2df284c94844abf

How can i get the correct SHA1 for msm kernel corresponding to kernel binaries ?

like image 345
Anup Warnulkar Avatar asked Mar 21 '23 16:03

Anup Warnulkar


1 Answers

Finally found the solution. Google changed the way they are adding new kernel binaries to AOSP code. Instead of using SHA1 as commit message, they are using snapshot id.

Below are the steps to checkout the correct version of msm code.

[1] Run the following command on your existing kernel binary found in device/lge/hammerhead-kernel.

bzgrep -a 'Linux version' vmlinux.bz2

[2] This will give you the following output. May be a different SHA1 in your case.

Linux version 3.4.0-gadb2201 ([email protected]) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT Wed Nov 20 14:42:53 PST 2013
Linux version CIFS VFS Client for Linux<7>%s: sess setup type %d

[3] The required SHA1 ID is adb2201. Note: skip the letter 'g'.

[4] Now checkout with this SHA1 in your msm directory.

git checkout adb2201

Now you are on the same branch in kernel source as the kernel binary in AOSP code.

like image 177
Anup Warnulkar Avatar answered May 16 '23 06:05

Anup Warnulkar