2007 2013 Kandroid
www.kandroid.org »
kandroid s/w fundamentals 교육 »
Android Open Source 
▶ HTC Android Kernel Open Source
▶ Samsung Android Kernel Open Source
▶ Motorola Android Kernel(+α) Open Source
▶ LGE Android Kernel(+α) Open Source
새로운 안드로이드버젼(ICS)의 공식 git 저장소
작성자 인베인
작성일 2011-12-19 (월) 18:49
ㆍ추천: 0  ㆍ조회: 9046      
IP: 211.xxx.252


   새로운 안드로이드버젼의 공식  git 저장소
 ========================================
                 
최근에 Full 오픈소스로써 릴리즈된 안드로이드의 ICS버젼 관련하여
git 명령을 이용하여 소스의 변화를 체크하고 다운로드 하는 방법에 대해 간단히 정리해보았습니다.

의외로 기존의 체계에서 새로 바뀐 현재의 다운로드 체계를 아직 혼돈을 가지고 계시는 분들이
많은것 같아 그분들을 위해 간단히 정리한 것이니 안드로이드의 소스 이해 및 공부에 도움되셨으면 합니다.

[CONTENTS]
1. AOSP's official git tree
2. How to download android kernel source
3. How to download/build android platform source
4. How to find out what branches are available using git
5. How to download Toolchain related sources for android
 


1. AOSP's official git tree
Before) http://android.git.kernel.org <-- kernel.org 서버들이 SSH 후킹을 통한 해킹을 당하면서 2011년 10월부터 운영 중지
After)  https://android.googlesource.com


2. How to download android kernel source

For Common Kernel:
RHEL6$> git ls-remote https://android.googlesource.com/kernel/common.git
RHEL6$> git clone  https://android.googlesource.com/kernel/common.git

For Goldfish(for Emulator) Kernel:
RHEL6$> git ls-remote https://android.googlesource.com/kernel/goldfish.git
RHEL6$> git clone  https://android.googlesource.com/kernel/goldfish.git

For OMAP:
RHEL6$> git ls-remote https://android.googlesource.com/kernel/omap.git
RHEL6$> git clone https://android.googlesource.com/kernel/omap.git

For Samsung:
RHEL6$> git ls-remote https://android.googlesource.com/kernel/samsung.git
RHEL6$> git clone https://android.googlesource.com/kernel/samsung.git
RHEL6$> firefox http://opensource.samsung.com

For Nvidia:
RHEL6$> firefox http://nv-tegra.nvidia.com/gitweb/
RHEL6$> git ls-remote https://android.googlesource.com/kernel/tegra.git
RHEL6$> git clone https://android.googlesource.com/kernel/tegra.git

To understand 'ls-remote' command
RHEL6$> git ls-remote https://android.googlesource.com/kernel/common.git

fe8bf45a464d5dc6eea5c7269b35d142bd23be99            HEAD
d9c240d6a0fbbff0d49d0f04b86ef3045b49d3e2               refs/heads/android-2.6.39 <-- Linux 2.6.39 base
e0de0a507d83e84c833d01de9e46a44b12419431            refs/heads/android-3.0 <-- Linux 3.0.X base
fe8bf45a464d5dc6eea5c7269b35d142bd23be99            refs/heads/master


RHEL6$> git clone  https://android.googlesource.com/kernel/common.git
RHEL6$> du -sh ./common/
               498M            ./common/
RHEL6$> cd ./common/
RHEL6$> git checkout android-3.0
RHEL6$> git branch
* android-3.0
 master

RHEL6$> gitk

For reference,  a lot of communities are supporting mirror site for android kernel git source.
*  Entire git website: http://android.git.linaro.org/gitweb
*  Common kernel: http://android.git.linaro.org/gitweb?p=kernel/common.git;a=summary
*  OMAP kernel: http://android.git.linaro.org/gitweb?p=kernel/omap.git;a=summary
*  Domestic AOSP mirror site:  http://git.insignal.co.kr



3. How to download/build android platform source
RHEL6$> curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
RHEL6$> $ repo init -u https://android.googlesource.com/platform/manifest
  repo init -u https://android.googlesource.com/platform/manifest -b   android-4.0.3_r1
RHEL6$> repo sync
     ... Have lunch time to save your valuable time ...
Fetching projects: 100% (228/228), done.
Syncing work tree: 100% (228/228), done.

RHEL6$> source build/envsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash

RHEL6$> lunch full-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================

RHEL6$> make -jN   <--  현재 가지고 있는 물리적 CPU 갯수 X 1.2의 값을  "N"값으로 사용하는 것이 좋습니다. 
RHEL6$> ls -al ./out/target/product/generic/*.img
-rw-rw-r-- 1 invain invain      162,940 Dec 11 19:59 ./out/target/product/generic/ramdisk.img
-rw------- 1 invain invain 173,513,472 Dec 11 20:21 ./out/target/product/generic/system.img
-rw------- 1 invain invain        80,256 Dec 11 20:02 ./out/target/product/generic/userdata.img
RHEL6$> ls -al ./out
13G ./out


4. How to find out what branches are available using git

RHEL6$> mkdir /opt/kandroid
RHEL6$> pushd /opt/kandroid
RHEL6$> git clone https://android.googlesource.com/platform/manifest.git
RHEL6$> cd manifest
RHEL6$> git branch -a | sed -n '/^  r/s,.*/,,p'|sort -u|column
RHEL6$> popd
RHEL6$> rm -rf /opt/kandroid


5. How to download Toolchain related sources for android
RHEL6$> git clone https://android.googlesource.com/toolchain/gcc.git
RHEL6$> git clone https://android.googlesource.com/toolchain/gmp.git
RHEL6$> git clone https://android.googlesource.com/toolchain/build.git
RHEL6$> git clone https://android.googlesource.com/toolchain/mpc.git
RHEL6$> git clone https://android.googlesource.com/toolchain/mpfr.git
RHEL6$> git clone https://android.googlesource.com/toolchain/gdb.git

END.
이름아이콘 들풀
2011-12-21 04:58
5번 Toolchain 관련 소스들 정보 좋네요..천천히 관심을 가져봐야겠네요..!!
인베인 Nice catch. 12/21 07:31
   
이름아이콘 초보화가
2011-12-30 08:30
좋은 자료 감사합니다.
인베인 넵... 감사합니다. ^^ 12/30 11:58
인베인 한가지 팁을 댓글하자면,
ICS버젼부터는 전체소스 컴파일시에 make 및 javadoc 프로세스/쓰레드가 메모리 먹는게 거의 하마 수준입니다. 따라서, 물리메모리를 4G이상 소유하는게 유익합니다. 아니면 어떻게 되냐구요? OOM(Out Of Memory Killer)현상을 종종만나게 되면서 전체소스 컴파일이 실패하게 되는 현상(SIGKILL)을 자주 목격하게 될겁니다. 이부분에 대해 OS레벨에서의 몇가지 생각이 있긴한데 시간여유가 없으므로 내년으로 Toss..^^
12/31 16:02
   
이름아이콘 훈HOON
2013-03-15 17:31
감사합니다. 수고하셨습니다. ^^
인베인 You are welcome. :) 3/20 08:09
   
 
덧글 쓰기 0
32000
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.
    N     분류     제목    글쓴이 작성일 조회
65 9회 kandroid 컨퍼런스를 기다리며~ [10]+8 행복아 2012-02-01 2437
64 안드로이드 전체소스의 맵(OS+플랫폼) [8]+7 인베인 2012-01-19 6040
63 안드로이드 그래픽스와 9회 kandroid 컨퍼런스 들풀 2012-01-04 2435
62 ICS4.0 (Prelink와 ASLR)와 9회 kandroid 컨퍼런스 [2]+3 들풀 2012-01-04 3026
61 [완결] 안드로이드 커널피쳐가 리눅스 메인라인에 들어오다... [4]+3 인베인 2011-12-20 2788
60 새로운 안드로이드버젼(ICS)의 공식 git 저장소 [3]+4 인베인 2011-12-19 9046
59 Gif파일 만들기 [2] 별찌 2011-12-05 1765
58 [덧글필독]안드로이드 system_server 디버깅 기법 [2]+8 들풀 2011-10-23 5864
57 ICS버젼 쓰레드의 TLS 동작구조(ver 0.3) [6]+10 인베인 2011-10-18 4293
56 [Android-MMF] 안드로이드 미디어 프레임워크의 개요 - 04.. [4]+1 소오강호 2011-05-29 8364
55 [Android-MMF] 안드로이드 미디어 프레임워크의 개요 - 03.. [2] 소오강호 2011-05-29 7542
54 [Android-MMF] 안드로이드 미디어 프레임워크의 개요 - 02.. [4] 소오강호 2011-05-14 7438
53 [Android-MMF] 안드로이드 미디어 프레임워크의 개요 - 01.. [9]+1 소오강호 2011-05-10 13152
52 안드로이드 Gingerbread Source Open 및 Build [6]+3 lesmin 2010-12-20 9706
51 Optimus-Q 리눅스 커널 오픈소스 URL [1] onjo 2010-10-01 4632
50 Galaxy-S 리눅스 커널 오픈소스 URL [2] 들풀 2010-07-21 9814
49 안드로이드 Froyo Source Open [5]+1 lesmin 2010-06-24 11803
48 안드로이드 내장 APKs 개발방법(초안) [28]+20 들풀 2010-03-05 33776
47 모토로이 소스 공개 [7]+3 Beto 2010-03-01 14875
46 안드로이드 2.1 Source Open [3]+2 자하랑 2010-01-21 12558
45 Android 1.6 브랜치 업데이트(1.3->1.4) [2]+1 인베인 2009-10-24 3769
44 SH4 CPU 아키텍쳐 지원을 위한 Android [2]+1 인베인 2009-09-17 4604
43 Samsung Galaxy 안드로이드 커널 빌드 [7]+14 들풀 2009-09-15 10935
42 Online PDK(Platform Dev. Kit) - donut [2]+1 들풀 2009-09-01 4784
41 MIPS용 안드로이드 소스코드 릴리즈 및 빌드방법.. [4]+6 인베인 2009-08-11 8873
40 iPAQ HX4700 PDA에 안드로이드를 포팅하자 [9] 좋은이 2009-08-10 8103
39 CENTOS 5.5에서 Android PDK설치방법 (Froyo브랜치) [1] 인베인 2009-07-27 13088
38 Ubuntu 9.04 + Android 1.5 Build [4] bluedisk 2009-05-06 8530
37 Android Porting on x86 PC [10]+1 SPARC 2009-04-29 10434
36    Re.. 질문이요. VBoxManage convertfromraw 문제 [8] coojin 2009-05-15 10273
35 Create AVDs for SDK 1.5 [1] 이광우 2009-04-28 10326
34 [빙고]1.5 SDK Win & Linux 링크입니다 참고하세요 [13]+10 와이드오픈 2009-03-10 5110
33 ADT 0.9 Cupcake 용 [5] 자하랑 2009-02-10 3623
32    Re..No resource identifier found for attribute... [2] Leone 2009-02-18 4874
31 X86용으로 안드로이드 포팅하기(on Virtualbox) [7]+2 인베인 2009-02-09 10246
30 REAL TARGET BOARD 없이 안드로이드 포팅기술 익히기.. [17]+15 좋은이 2009-01-30 14980
29    Re..REAL TARGET BOARD 없이 안드로이드 포팅기술 익히기.. [4]+2 NPain 2009-03-21 5442
28    Re..REAL TARGET BOARD 없이 안드로이드 포팅기술 익히기.. [5] 딱신 2009-03-18 3836
27 Dalvik JNI 를 이용한 cpp 함수 추가 및 SDK 에서 사용하기.. [9] unbiari 2008-12-26 8427
26 안드로이드 전체소스 빌드(For X86) - Fedora 사용자.. [3] 인베인 2008-12-24 17567
25    Re..ASUS/EEE LapTop PC의 플랫폼 드라이버 코드 [2] 인베인 2009-02-09 2661
24    Re..안드로이드 전체소스 빌드(For X86) - Fedora 사용자.. 인베인 2008-12-29 3061
23 안드로이드 전체소스 빌드(For X86) - Ubuntu사용자.. [14] 인베인 2008-12-24 11799
22 안드로이드 Native Development Kit(NDK) 사용법 [18]+3 들풀 2008-12-11 16773
21    Android NDK r3 공식 릴리즈 [3]+1 들풀 2010-03-09 4236
20    Re..android-ndk-1.6_r1 미리보기 [3]+1 들풀 2009-09-20 3700
19    Re.. android-ndk-1.5_r1 사용법 [windows] [7]+3 들풀 2009-06-29 8964
18 안드로이드 SDK Build 방법 [5] 들풀 2008-12-09 12035
17 Android Porting Guide for TI OMAP Zoom [1] 들풀 2008-12-07 4886
16 Git Community Book [3] 들풀 2008-12-07 3378
15 android build system [8]+2 베이징숀 2008-11-19 8233
14 Android Telephony for CDMA [1] 들풀 2008-11-28 4483
13 안드로이드 PDK (Platform Development Kit) [1] 들풀 2008-10-28 7957
12 Mac OS에서 Android 소스 받기 및 빌드 [10]+5 ratharn 2008-10-27 8881
11 Android 전체소스 빌드 방법(For ARM) on Fedora 배포판 -2008.. [8]+1 invain 2008-10-26 10698
10    Re.. Fedora배포판에서 Cupcake빌드시의 TroubleShooting.. 인베인 2010-03-18 3519
9 [Samsung SC32442]용 Android 소스 빌드 [7] 들풀 2008-10-26 7338
8    Re.. sc32442 안드로이드 탑재 screen shot [15]+5 들풀 2009-01-12 3628
7    Neo 1973 phone [9] 들풀 2008-11-06 3421
6 안드로이드 전체 소스 코드 빌드 방법 [54]+7 들풀 2008-10-24 45666
5    HTC_DREAM Build (Donut) [6]+1 불타는주작 2009-08-04 3651
4    안드로이드 cupcake 빌드방법 [5]+5 들풀 2009-01-28 6362
3    안드로이드 플랫폼 개발을 위해 Eclipse 사용하기.. 들풀 2008-12-07 8332
2    안드로이드 소스 코드 빌드 테스트 [8]+1 들풀 2008-10-27 8518
1 안드로이드 오픈 소스 [7] 들풀 2008-10-22 12985
1