2. Ubuntu download compiled Linux kernel

Source: Internet
Author: User
Tags git clone

I. INTRODUCTION

As Loro says, there is no Linux kernel code in the Android source code. It uses pre-compiled kernel, which you can see using the ADB shell cat Proc/version, as follows:

[Email protected]:~/working_directory$ adb shell Cat proc/version

Linux version 2.6.29-00261-g0097074-dirty ([email protected]) (GCC version 4.4.0 (gcc)) #20 Wed Mar 09:54:02 PDT 2010

[Email protected]:~/working_directory$


From the kernel version you can see the current use or Google in the 2010 compiled kernel, how to download/compile/run their own kernel it?


Two. Download kernel

Please refer to Lao Luo's blog for download methods.

http://blog.csdn.net/luoshengyang/article/details/6564592

But there is a place to note, similar to the 1th post, because the address is the wall, can not download the success (at least I did not succeed ...)

So we have to go to the mirror station of Tsinghua University to download


Https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git

1. Create a new kernel directory

mkdir kernel

CD kernel


2. Git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git


Enter the Goldfish directory when clone is complete

3. CD Goldfish


4. Git branch-a View Remote branch

[Email protected]:~/working_directory/kernel/goldfish$ git branch-a

* Master

Remotes/origin/head-Origin/master

remotes/origin/android-3.10

remotes/origin/android-3.18

remotes/origin/android-3.4

remotes/origin/android-goldfish-2.6.29

remotes/origin/android-goldfish-3.10

Remotes/origin/android-goldfish-3.10-l-mr1-dev

Remotes/origin/android-goldfish-3.10-m-dev

Remotes/origin/android-goldfish-3.18-dev

remotes/origin/android-goldfish-3.4

Remotes/origin/android-goldfish-3.4-l-mr1-dev

Remotes/origin/linux-goldfish-3.0-wip

Remotes/origin/master

[Email protected]:~/kerle_test/goldfish$


5. Switch to the Android-goldfish-2.6.29 branch, as this branch and the 2.3 version are the closest.

git checkout-b android-goldfish-2.6.29 origin/android-goldfish-2.6.29


6. View local branch and remote branch correspondence

Git branch-avv


* android-goldfish-2.6.29 4bb8fa0 [origin/android-goldfish-2.6.29] goldfish:add encrypted SD Card Support.

Master 1b8b73f [Origin/master] Empty Commit

Remotes/origin/head-Origin/master

remotes/origin/android-3.10 1d0f729 Android:base-cfg:add Config_ip_multicast

remotes/origin/android-3.18 2771f08 Android:base-cfg:add Config_ip_multicast

remotes/origin/android-3.4 4e97def Selinux:nlmsgtab:add Sock_destroy to the NetLink mapping tables

remotes/origin/android-goldfish-2.6.29 4bb8fa0 Goldfish:add encrypted SD Card support.

remotes/origin/android-goldfish-3.10 1db7499 Merge branch ' android-3.10 ' into android-goldfish-3.10

Remotes/origin/android-goldfish-3.10-l-mr1-dev 70edbbb ranchu:32 bit framebuffer support

Remotes/origin/android-goldfish-3.10-m-dev 8839123 mm/pagewalk.c:fix walk_page_range () access of wrong PTEs

Remotes/origin/android-goldfish-3.18-dev dfc5f3c arm:goldfish:Update Goldfish defconfigs

remotes/origin/android-goldfish-3.4 2011b1c Merge branch ' android-3.4 ' into android-goldfish-3.4

Remotes/origin/android-goldfish-3.4-l-mr1-dev 2d58ef9 x86:goldfish:Enable Required NetFilter features

REMOTES/ORIGIN/LINUX-GOLDFISH-3.0-WIP C423BB8 X86:add x86 support to the Golfish framebuffer driver.

Remotes/origin/master 1b8b73f Empty Commit



You can see our local android-goldfish-2.6.29 Branch and Remote branch "4bb8fa0 [origin/android-goldfish-2.6.29] goldfish:add encrypted SD Card Support. " is the corresponding.


At this point, the kernel code is finished downloading.


In addition, I found that the default download kernel folder is goldfish, do not know why Lao Luo is common, perhaps his git command to specify a folder bar.


Three. Compiling kernel

If you compile kernel, please refer to Lao Luo's method, configure the cross-compilation environment, compile with make command

http://blog.csdn.net/luoshengyang/article/details/6564592


Ps:

Make Menuconfig is the boot configuration menu, and you can configure compilation options.


Four. Run your own kernel

Emulator-kernel./kernel/common/arch/arm/boot/zimage


Lao Luo's order is emulator-kernel./kernel/common/arch/arm/boot/zimage &


But it's not possible to find this & to work.





This article is from the "www.bogo.com" blog, make sure to keep this source http://483181.blog.51cto.com/473181/1742558

2. Ubuntu download compiled Linux kernel

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.