포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

안녕하세요.

고도리입니다.

오늘서부터 슬슬 안드로이드에 대해서 얘기해 볼까 합니다.
어디까지 설명할 수 있을지 모르겠지만, 띄엄띄엄 글을 올리겠습니다.

이번에는 커널에 대한 부분은 뺐습니다.

조만간에 커널에 대한 부분을 소스와 함께 올리도록 하겠습니다.

그럼...

=====================================================
0. ubuntu 설치
관련된 부분은 network server부분들입니다. DIY.....^^

1. android compile하기 위한 package install

//  한줄입니다.

sudo apt-get install --fix-missing git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

2. android download

superuser권한으로

# curl http://android.git.kernel.org/repo > /usr/local/bin/repo
# chmod a+x /usr/local/bin/repo
# mkdir /root/android
# cd /root/android
# repo init -u git://android.git.kernel.org/platform/manifest.git
# repo sync


3. compile

이 밑의 두 줄은 추후에 .bashrc에 추가

# export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
# export ANDROID_JAVA_HOME=$JAVA_HOME
# cd /root/android

이 상태서 그냥 make를 하면 다음과 같은 부분때문에 system halt 가 된다.

E/BatteryService( 1661): Could not open '/sys/class/power_supply/ac/online'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/usb/online'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/present'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/capacity'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/batt_vol'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/batt_temp'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/status'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/health'
E/BatteryService( 1661): Could not open '/sys/class/power_supply/battery/technology'


여러가지 방법이 있지만, 일단은 android source에서 관련된 부분을 없앤다.

frameworks/policies/base/phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java 에서 아래 부분을 주석처리
298 line

        if (batteryLevel == 0 &&
                pluggedInStatus != BATTERY_STATUS_CHARGING &&
                pluggedInStatus != BATTERY_STATUS_UNKNOWN) {
            ShutdownThread.shutdownAfterDisablingRadio(mContext, false);
        }


# make


다 만들어진 후

 

4. android root filesystem with NFS

// make rootfs with nfs
cd  out/target/product/generic
mkdir /root/androidfs
cp -a root/*   /root/androidfs
cp -a data/*   /root/androidfs/data/
cp -a system/* /root/androidfs/system/


cd /root/androidfs
chown -R root.root *
chmod -R 777 data system

이렇게 해서 root filesystem을 만든 후에
init.rc를 nfs로 부팅할 수 있도록 수정한다.


5. init.rc를 수정
==> 첨부되는 init.rc 파일 참조

 

6. vi /etc/exports해서 다음과 같은 줄을 추가해 주고

/root/androidfs     *(rw,no_root_squash,no_all_squash)

 

7. nfs-server를 재동작시킨다.

/etc/init.d/nfs-kernel-server restart

 

8. target의 bootloader에서 다음과 같이 bootargs를 수정해서 부팅한다.

setenv bootargs init=/init root=/dev/nfs rw nfsroot=192.168.0.199:/root/androidfs,timeo=14,retrans=6,nolock,tcp ip=192.168.0.101:192.168.0.199:192.168.0.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 ethaddr=00:40:5c:26:0a:5b


9. 안드로이드를 처음 부팅할때는 시간이 많이 걸린다.
nfs not reponding이란 글자가 많이 나오겠지만..

될때까지 부팅하면 됩니다.....^^

"사람은 자기가 보고 싶은 현실만 볼 뿐이다." - Gaius Julius Caesar
첨부
엮인글 :
http://www.aesop.or.kr/index.php?mid=Board_Documents_Android_Frameworks&document_srl=34733&act=trackback&key=a3f

진태영

2010.02.22 00:41:32
*.209.52.25

늦은 댓글인데, 정말 멋지셨네요 ^^

요즘 안드로이드 공부중이라... 지난 게시물 모조리 읽고 있습니다.  ^^

List of Articles
번호 제목 글쓴이 날짜 조회 수sort
44 aesop-6410용 android 2.6.24 source file [12] 고현철 2009-04-12 12131
43 Google Android Kernel-2.6.29 file 관리자 2009-04-14 12085
42 [Android 분석 및 포팅] Binder의 동작원리 - #1 servicemanage... file [7] 고도리 2011-06-30 12009
41 Android에서 yaffs2 image 만들때 oobfree 따르도록 수정 file [1] 2009-04-16 11896
40 Google Android 커널 버전별 Testing Report [2] 김재훈 2009-05-17 11493
39 AudioPolicyService와 AudioFlinger 및 HAL의 연결 구조 JhoonKim 2010-04-08 11301
38 Vmware에서 x86으로 안드로메다 포팅 법 [1] 2009-07-15 11075
37 누가 Android 에 tslib를 포팅해 놓은듯 합니다. file 최종환 2009-11-11 11062
36 aesop 안드로이드 보드의 3D 성능 측정을 부탁드립니다. file [8] 최영빈 2009-07-09 11041
35 android gstreamer 동작화면 file [10] 고현철 2009-07-07 11025
34 Android 동작시 Battery 관련 /sys 파일 에러 & Power off ... [2] 2009-05-09 11010
33 이솝 임베디드 포럼 - 10월 31일 Google Android Seminar 발표 ... file [16] 관리자 2009-10-28 10898
32 Android yaffs image 흠..oob가 이상합니다. 2009-04-16 10888
31 AudioSystem과 AudioSystem.java를 이용한 JNI 단에서의 연결 [1] JhoonKim 2010-04-14 10871
30 안드로이드 실행 시 미디어 서버 pending 현상 원인 중 한가지 file 박병구 2009-08-22 10810
29 Android Battery 드라이버...ㅎㅎㅎ-.-; [3] 2009-06-02 10769
28 Android Battery 부분 조금 정리해 놓은것 file [2] 최종환 2009-11-04 10726
27 cupcake, android 1.0/1.5의 의미 2009-05-20 10710
26 MV6410용 aesop-android-2.6.29 입니다. (CS8900 관련) file [4] 2009-06-17 10621
25 Android home key is not working(home key 동작 안 할경우 ) [1] 고현철 2009-09-10 10597

사용자 로그인