쓰고 보니 절대 심플 버전 아니다.
혹시 보시는 분들 절대로 기겁하지 말것!
작성자 : 유영창
마지막 수정일 : 2009-08-02
1. 개요
안드로이드를 coLinux 우분투 패키지로 설치하는 심플 버전이다.
이 문서에는 coLinux 설치법에 대한 내용은 기록하지 않는다.
FALINUX 포럼 사이트에 가서 참조 할것
2. 주의사항
안드로이드 패키지를 실행하려면 반드시 컴퓨터 메모리가 2G 이상일 것
그 외에는 실패한다.
coLinux 할당 메모리 반드시 1G 이상으로 설정할 것
루트 이미지 파일 크기는 10G 가 적당함
3. 환경
2G 물리 메모리 PC
운영체제 XP SP2
TAP 방식과 이더넷 브릿지 방식
colinux 0.7.4 버전
coLinux 설치 위치 - D:\colinux
이미지 설치 위치 - D:\colinux\ubuntu9_10G_android_bobo
4. 작업 시작
4.1 기본 환경 구축
>> coLinux 파일 받는 위치
http://sourceforge.net/projects/colinux/files/
coLinux-stable -> 0.7.4-linux-2.6.22.18
파일명 coLinux-0.7.4.exe
coLinux-0.7.4.exe 실행해서 설치
>> TAP 버전 문제 생겼을때
TAP 네트워크 드라이버 재설치
도스창에서 다음 명령들을 실행
상태 명령 : tapcontrol.exe hwids TAP0801co
제거 명령 : tapcontrol.exe remove TAP0801co
설치 명령 : tapcontrol install OemWin2k.inf tap0801co
>> 우분투 이미지 파일 받는 위치
http://sourceforge.net/projects/colinux/files/
Images 2.6.x Ubuntu - Ubuntu 9.04 ->
압축을 푼 파일 명
Ubuntu-9.04.ext3.1gb.fs
압축 해제 위치
D:\colinux\ubuntu9_10G_android_bobo
>> D:\colinux\_android_bobo.bat 생성
-[D:\colinux\_android_bobo.bat]-----------------------
colinux-daemon @ubuntu9_10G_android_bobo.conf -t nt
------------------------------------------------------
>> D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf 생성
-[D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf]----------------------
kernel=vmlinux
mem=512
ro
initrd=ubuntu9_10G_android_bobo\initrd.gz
cobd0=ubuntu9_10G_android_bobo\Ubuntu-9.04.ext3.1gb.fs
cobd1=ubuntu9_10G_android_bobo\swap.img
root=/dev/cobd0
eth0=tuntap,"TAP"
cofs0=C:\
cofs1=D:\
------------------------------------------------------------------------------------------
>> 도스창 또는 파일 탐색기로 D:\colinux\_android_bobo.bat 실행
>> 윈도우 서비스로 등록하려면
서비스에 등록 : colinux-daemon.exe @ubuntu9_10G_android_bobo.conf --install-service "coLinux"
서비스에 제거 : colinux-daemon.exe --remove-service "coLinux"
서비스 실행 : net start "coLinux"
>> 트레이 아이콘 방식으로 동작 시키려면
포터블 우분투에서 TrayRun.exe 를 추출해서
D:\colinux\ 에
복사해 넣는다.
_run_android_bobo.bat 파일을 만든다.
-[D:\colinux\_run_android_bobo.bat]-------------------------------------------------------
start trayrun.exe cmd /c _android_bobo.bat
exit
------------------------------------------------------------------------------------------
이후 _run_android_bobo.bat를 실행한다.
>> colinux 부팅 후 login 한다.
사용자 : root
암호 : root
>> telnet 패키지 인스톨
apt-get install xinetd
apt-get install telnet
apt-get install telnetd
apt-get update
>> /etc/xinetd.d/telnet 파일 작성
cd /etc/xinetd.d
vi telnet
-[/etc/xinetd.d/telnet]----------------------
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
-----------------------------------------------
>> 필요하다면 네트워크 고정 IP 로 만든다.
/etc/network/interfaces 을 수정하여 eth0 주소 변경
예) 192.168.10.61 로 변경
-[/etc/network/interfaces]----------------------
auto eth0
iface eth0 inet static
address 192.168.10.61
netmask 255.255.0.0
gateway 192.168.10.1
-----------------------------------------------
>> 네트워크 재 적용
/etc/init.d/networking restart
>> xinetd 재 실행
/etc/init.d/xinetd restart
>> 사용자 추가
adduser user
암호는 user 로 한다. ^^
>> 외부에서 telnet 으로 접속 시험
>> root로 변경
su
>> TrayIcon 형식으로 실행하기
포터블 우분투에서 TrayRun.exe 파일을 D:\colinux\ 에 복사
( 이과정을 수행하기 위해서는 포터블 우분투를 반드시 사전에 설치 해야 한다. )
_run_android_bobo.bat 파일 생성
-[_run_android_bobo.bat]----------------------
start trayrun.exe cmd /c _android_bobo.bat
exit
-----------------------------------------------
>> 용량 키우기
도스창에서
fsutil file createnew append.img 9663676416
copy /b Ubuntu-9.04.ext3.1gb.fs+append.img rootfs_10G.img
del append.img
>> D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf 수정
-[D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf]----------------------
kernel=vmlinux
mem=1024
ro
initrd=ubuntu9_10G_android_bobo\initrd.gz
cobd0=ubuntu9_10G_android_bobo\rootfs_10G.img
cobd1=ubuntu9_10G_android_bobo\swap.img
root=/dev/cobd0
eth0=tuntap,"TAP"
cofs0=C:\
cofs1=D:\
------------------------------------------------------------------------------------------
>> 크기 변경
coLinux 부팅 후
resize2fs -f /dev/cobd0
>> 우분투 개발 패키지 설치
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
sudo apt-get install valgrind
sudo apt-get install wget
>> 우분투 한글 설정
sudo apt-get install language-pack-ko
sudo locale-gen ko_KR.EUC-KR
>> 삼바 환경 구축
sudo apt-get install samba smbfs
-[/etc/samba/smb.conf]----------------------
[global]
dos charset = cp949
unix charset = euc-kr
workgroup = FAL
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = false
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
socket options = TCP_NODELAY
[project]
path = /project
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes
------------------------------------------------------------------------------------------
>> 삼바 실행
/etc/init.d/samba restart
>> TFTP 환경 구축
sudo apt-get install tftp tftpd
>> /etc/xinetd.d/tftp 파일 작성
cd /etc/xinetd.d
vi tftp
-[/etc/xinetd.d/tftp]----------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
-----------------------------------------------
>> tftp 서비스 제공 디렉토리 생성
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
>> xinetd 제 실행
/etc/init.d/xinetd restart
>> nfs 환경 구축
sudo apt-get install nfs-kernel-server nfs-common portmap
>> /etc/exports 파일 작성
cd /etc/
vi exports
-[/etc/exports]---------------------------------------------------
/nfs 192.168.10.0/255.255.0.0(rw,insecure,subtree_check,sync)
------------------------------------------------------------------
>> nfs 서비스 디렉토리 생성
mkdir /nfs
chmod 777 /nfs
>> ufw 패키지 설치
sudo apt-get install ufw
>> 방화벽 무효화
sudo ufw disable
>> 맨페이지 설치
sudo apt-get install man
>> C 라이브러리 맨페이지 설치
sudo apt-get install manpages-dev glibc-doc
>> 한글 EUC-KR 설정
sudo apt-get install language-pack-ko
sudo locale-gen ko_KR.EUC-KR
>> /etc/environment 에 EUC-KR 설정 항목 추가
vi /etc/environment
LANG="ko_KR.EUC-KR"
재 부팅
>> 맨 페이지 한글화
sudo apt-get install manpages-ko
4.2 안드로이드 패키지 설치
>> 패키지 받을 디렉토리 작성
cd /
mkdir project
cd project
mkdir abobo
cd abobo
mkdir bin
mkdir android
>> REPO 스크립트 처리
cd bin
wget http://android.git.kernel.org/repo
chmod 755 repo
cp repo /bin
>> 안드로이드 패키지 받기
cd ../android
repo init -u git://android.git.kernel.org/platform/manifest.git
Your Name [root]: root <-- root 입력
Your Email [root@colinux.(none)]: bmfrog2@gmail.com <-- 구글 이메일 계정 입력
is this correct [yes/no]? yes <-- 반드시 yes
repo sync
대략 1시간 가량 걸린다.
>> 빌드 시작
export ANDROID_JAVA_HOME=$JAVA_HOME
make
3시간 쯤 걸리나...
4.2 안드로이드 커널 설치
>> 커널 다운로드 받기
cd /project/abobo/
git clone git://android.git.kernel.org/kernel/common.git kernel
cd kernel
git checkout --track -b android-2.6.29 origin/android-2.6.29
git branch
>> 개발 툴 체인 있는 곳
android/prebuilt/linux-x86/toolchain/
>> Kernel 빌드 참고
- msm : 퀄컴 커널
make msm_defconfig ARCH=arm
make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
- goldfish : 에뮬레이터 커널
make goldfish_defconfig ARCH=arm
make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
- s3c6400 : 삼성 S3C6410 커널
make s3c6400_defconfig ARCH=arm
make zImage ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
>> Kernel 빌드 과정
Makefile 수정
-[Makefile]--------------------------------------------------------------------------------------------------
193 # ARCH ?= $(SUBARCH)
194 # CROSS_COMPILE ?=
195
196 ARCH := arm
197 CROSS_COMPILE := /project/abobo/android/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
-------------------------------------------------------------------------------------------------------------
make menuconfig
make zImage
---- 참고 -----------------------------------------------------------------------------------------------------------------
메이크 파일에서
:= 단순한 변수 대입만 된다.
?= 이전에 선언된 적이 없을 경우만 대입
= 이전에 선언된 변수가 포함되면 해당 변수를 적용한 확장 형태로 대입된다.
방화벽 사용
sudo ufw enable
방화벽 전체 해제
sudo ufw disable
전부 닫고 포트 6112 만 열기
sudo ufw enable
sudo ufw default deny
sudo ufw allow 6112
혹시 보시는 분들 절대로 기겁하지 말것!
작성자 : 유영창
마지막 수정일 : 2009-08-02
1. 개요
안드로이드를 coLinux 우분투 패키지로 설치하는 심플 버전이다.
이 문서에는 coLinux 설치법에 대한 내용은 기록하지 않는다.
FALINUX 포럼 사이트에 가서 참조 할것
2. 주의사항
안드로이드 패키지를 실행하려면 반드시 컴퓨터 메모리가 2G 이상일 것
그 외에는 실패한다.
coLinux 할당 메모리 반드시 1G 이상으로 설정할 것
루트 이미지 파일 크기는 10G 가 적당함
3. 환경
2G 물리 메모리 PC
운영체제 XP SP2
TAP 방식과 이더넷 브릿지 방식
colinux 0.7.4 버전
coLinux 설치 위치 - D:\colinux
이미지 설치 위치 - D:\colinux\ubuntu9_10G_android_bobo
4. 작업 시작
4.1 기본 환경 구축
>> coLinux 파일 받는 위치
http://sourceforge.net/projects/colinux/files/
coLinux-stable -> 0.7.4-linux-2.6.22.18
파일명 coLinux-0.7.4.exe
coLinux-0.7.4.exe 실행해서 설치
>> TAP 버전 문제 생겼을때
TAP 네트워크 드라이버 재설치
도스창에서 다음 명령들을 실행
상태 명령 : tapcontrol.exe hwids TAP0801co
제거 명령 : tapcontrol.exe remove TAP0801co
설치 명령 : tapcontrol install OemWin2k.inf tap0801co
>> 우분투 이미지 파일 받는 위치
http://sourceforge.net/projects/colinux/files/
Images 2.6.x Ubuntu - Ubuntu 9.04 ->
압축을 푼 파일 명
Ubuntu-9.04.ext3.1gb.fs
압축 해제 위치
D:\colinux\ubuntu9_10G_android_bobo
>> D:\colinux\_android_bobo.bat 생성
-[D:\colinux\_android_bobo.bat]-----------------------
colinux-daemon @ubuntu9_10G_android_bobo.conf -t nt
------------------------------------------------------
>> D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf 생성
-[D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf]----------------------
kernel=vmlinux
mem=512
ro
initrd=ubuntu9_10G_android_bobo\initrd.gz
cobd0=ubuntu9_10G_android_bobo\Ubuntu-9.04.ext3.1gb.fs
cobd1=ubuntu9_10G_android_bobo\swap.img
root=/dev/cobd0
eth0=tuntap,"TAP"
cofs0=C:\
cofs1=D:\
------------------------------------------------------------------------------------------
>> 도스창 또는 파일 탐색기로 D:\colinux\_android_bobo.bat 실행
>> 윈도우 서비스로 등록하려면
서비스에 등록 : colinux-daemon.exe @ubuntu9_10G_android_bobo.conf --install-service "coLinux"
서비스에 제거 : colinux-daemon.exe --remove-service "coLinux"
서비스 실행 : net start "coLinux"
>> 트레이 아이콘 방식으로 동작 시키려면
포터블 우분투에서 TrayRun.exe 를 추출해서
D:\colinux\ 에
복사해 넣는다.
_run_android_bobo.bat 파일을 만든다.
-[D:\colinux\_run_android_bobo.bat]-------------------------------------------------------
start trayrun.exe cmd /c _android_bobo.bat
exit
------------------------------------------------------------------------------------------
이후 _run_android_bobo.bat를 실행한다.
>> colinux 부팅 후 login 한다.
사용자 : root
암호 : root
>> telnet 패키지 인스톨
apt-get install xinetd
apt-get install telnet
apt-get install telnetd
apt-get update
>> /etc/xinetd.d/telnet 파일 작성
cd /etc/xinetd.d
vi telnet
-[/etc/xinetd.d/telnet]----------------------
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
-----------------------------------------------
>> 필요하다면 네트워크 고정 IP 로 만든다.
/etc/network/interfaces 을 수정하여 eth0 주소 변경
예) 192.168.10.61 로 변경
-[/etc/network/interfaces]----------------------
auto eth0
iface eth0 inet static
address 192.168.10.61
netmask 255.255.0.0
gateway 192.168.10.1
-----------------------------------------------
>> 네트워크 재 적용
/etc/init.d/networking restart
>> xinetd 재 실행
/etc/init.d/xinetd restart
>> 사용자 추가
adduser user
암호는 user 로 한다. ^^
>> 외부에서 telnet 으로 접속 시험
>> root로 변경
su
>> TrayIcon 형식으로 실행하기
포터블 우분투에서 TrayRun.exe 파일을 D:\colinux\ 에 복사
( 이과정을 수행하기 위해서는 포터블 우분투를 반드시 사전에 설치 해야 한다. )
_run_android_bobo.bat 파일 생성
-[_run_android_bobo.bat]----------------------
start trayrun.exe cmd /c _android_bobo.bat
exit
-----------------------------------------------
>> 용량 키우기
도스창에서
fsutil file createnew append.img 9663676416
copy /b Ubuntu-9.04.ext3.1gb.fs+append.img rootfs_10G.img
del append.img
>> D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf 수정
-[D:\colinux\ubuntu9_10G_android_bobo\ubuntu9_10G_android_bobo.conf]----------------------
kernel=vmlinux
mem=1024
ro
initrd=ubuntu9_10G_android_bobo\initrd.gz
cobd0=ubuntu9_10G_android_bobo\rootfs_10G.img
cobd1=ubuntu9_10G_android_bobo\swap.img
root=/dev/cobd0
eth0=tuntap,"TAP"
cofs0=C:\
cofs1=D:\
------------------------------------------------------------------------------------------
>> 크기 변경
coLinux 부팅 후
resize2fs -f /dev/cobd0
>> 우분투 개발 패키지 설치
sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
sudo apt-get install valgrind
sudo apt-get install wget
>> 우분투 한글 설정
sudo apt-get install language-pack-ko
sudo locale-gen ko_KR.EUC-KR
>> 삼바 환경 구축
sudo apt-get install samba smbfs
-[/etc/samba/smb.conf]----------------------
[global]
dos charset = cp949
unix charset = euc-kr
workgroup = FAL
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = false
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
socket options = TCP_NODELAY
[project]
path = /project
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes
------------------------------------------------------------------------------------------
>> 삼바 실행
/etc/init.d/samba restart
>> TFTP 환경 구축
sudo apt-get install tftp tftpd
>> /etc/xinetd.d/tftp 파일 작성
cd /etc/xinetd.d
vi tftp
-[/etc/xinetd.d/tftp]----------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
-----------------------------------------------
>> tftp 서비스 제공 디렉토리 생성
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
>> xinetd 제 실행
/etc/init.d/xinetd restart
>> nfs 환경 구축
sudo apt-get install nfs-kernel-server nfs-common portmap
>> /etc/exports 파일 작성
cd /etc/
vi exports
-[/etc/exports]---------------------------------------------------
/nfs 192.168.10.0/255.255.0.0(rw,insecure,subtree_check,sync)
------------------------------------------------------------------
>> nfs 서비스 디렉토리 생성
mkdir /nfs
chmod 777 /nfs
>> ufw 패키지 설치
sudo apt-get install ufw
>> 방화벽 무효화
sudo ufw disable
>> 맨페이지 설치
sudo apt-get install man
>> C 라이브러리 맨페이지 설치
sudo apt-get install manpages-dev glibc-doc
>> 한글 EUC-KR 설정
sudo apt-get install language-pack-ko
sudo locale-gen ko_KR.EUC-KR
>> /etc/environment 에 EUC-KR 설정 항목 추가
vi /etc/environment
LANG="ko_KR.EUC-KR"
재 부팅
>> 맨 페이지 한글화
sudo apt-get install manpages-ko
4.2 안드로이드 패키지 설치
>> 패키지 받을 디렉토리 작성
cd /
mkdir project
cd project
mkdir abobo
cd abobo
mkdir bin
mkdir android
>> REPO 스크립트 처리
cd bin
wget http://android.git.kernel.org/repo
chmod 755 repo
cp repo /bin
>> 안드로이드 패키지 받기
cd ../android
repo init -u git://android.git.kernel.org/platform/manifest.git
Your Name [root]: root <-- root 입력
Your Email [root@colinux.(none)]: bmfrog2@gmail.com <-- 구글 이메일 계정 입력
is this correct [yes/no]? yes <-- 반드시 yes
repo sync
대략 1시간 가량 걸린다.
>> 빌드 시작
export ANDROID_JAVA_HOME=$JAVA_HOME
make
3시간 쯤 걸리나...
4.2 안드로이드 커널 설치
>> 커널 다운로드 받기
cd /project/abobo/
git clone git://android.git.kernel.org/kernel/common.git kernel
cd kernel
git checkout --track -b android-2.6.29 origin/android-2.6.29
git branch
>> 개발 툴 체인 있는 곳
android/prebuilt/linux-x86/toolchain/
>> Kernel 빌드 참고
- msm : 퀄컴 커널
make msm_defconfig ARCH=arm
make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
- goldfish : 에뮬레이터 커널
make goldfish_defconfig ARCH=arm
make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
- s3c6400 : 삼성 S3C6410 커널
make s3c6400_defconfig ARCH=arm
make zImage ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
>> Kernel 빌드 과정
Makefile 수정
-[Makefile]--------------------------------------------------------------------------------------------------
193 # ARCH ?= $(SUBARCH)
194 # CROSS_COMPILE ?=
195
196 ARCH := arm
197 CROSS_COMPILE := /project/abobo/android/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
-------------------------------------------------------------------------------------------------------------
make menuconfig
make zImage
---- 참고 -----------------------------------------------------------------------------------------------------------------
메이크 파일에서
:= 단순한 변수 대입만 된다.
?= 이전에 선언된 적이 없을 경우만 대입
= 이전에 선언된 변수가 포함되면 해당 변수를 적용한 확장 형태로 대입된다.
방화벽 사용
sudo ufw enable
방화벽 전체 해제
sudo ufw disable
전부 닫고 포트 6112 만 열기
sudo ufw enable
sudo ufw default deny
sudo ufw allow 6112

이올린에 북마크하기
Prev
Rss Feed