MIME-Type Description File Extension
application/acad AutoCAD drawing files dwg
application/clariscad ClarisCAD files ccad
application/dxf DXF (AutoCAD) dxf
application/msaccess Microsoft Access file mdb
application/msword Microsoft Word file doc
application/octet-stream Uninterpreted binary bin
application/pdf PDF (Adobe Acrobat) pdf
application/postscript Postscript, encapsulated Postscript, ai, ps, eps
Adobe Illustrator
application/rtf Rich Text Format file rtf rtf
application/vnd.ms-excel Microsoft Excel file xls
application/vnd.ms-powerpoint Microsoft PowerPoint file ppt
application/x-cdf Channel Definition Format file cdf
application/x-csh C-shell script csh csh
application/x-dvi TeX dvi dvi dvi
application/x-javascript Javascript source file js
application/x-latex LaTeX source file latex
application/x-mif FrameMaker MIF format mif
application/x-msexcel Microsoft Excel file xls
application/x-mspowerpoint Microsoft PowerPoint file ppt
application/x-tcl TCL script tcl
application/x-tex TeX source file tex
application/x-texinfo Texinfo (emacs) texinfo, texi
application/x-troff troff file t, tr, roff t, tr, roff
application/x-troff-man troff with MAN macros man
application/x-troff-me troff with ME macros me
application/x-troff-ms troff with MS macros ms
application/x-wais-source WAIS source file src
application/zip ZIP archive zip
audio/basic Basic audio (usually m-law) au, snd
audio/x-aiff AIFF audio aif, aiff, aifc
audio/x-wav Windows WAVE audio wav
image/gif GIF image gif
image/ief Image Exchange Format file ief
image/jpeg JPEG image jpeg, jpg jpe
image/tiff TIFF image tiff, tif
image/x-cmu-raster CMU Raster image ras
image/x-portable-anymap PBM Anymap image format pnm
image/x-portable-bitmap PBM Bitmap image format pbm
image/x-portable-graymap PBM Graymap image format pgm
image/x-portable-pixmap PBM Pixmap image format ppm
image/x-rgb RGB image format rgb
image/x-xbitmap X Bitmap image xbm
image/x-xpixmap X Pixmap image xpm
image/x-xwindowdump X Windows Dump (xwd) xwd
multipart/x-gzip GNU ZIP archive gzip
multipart/x-zip PKZIP archive zip
text/css Cascading style sheet css
text/html HTML file html, htm
text/plain Plain text txt
text/richtext MIME Rich Text rtx
text/tab-separated- values Text with tab-separated values tsv
text/xml XML document xml
text/x-setext Struct-Enhanced text etx
text/xsl XSL style sheet xsl
video/mpeg MPEG video mpeg, mpg, mpe
video/quicktime QuickTime video qt, mov
video/x-msvideo Microsoft Windows video avi
video/x-sgi-movie SGI movie player format movie


MIME 확장명

파일 확장명 

 application/x-silverlight-app  .xap
 application/manifest  .manifest 
 application/x-ms-application  .application 
 application/x-ms-xbap  .xbap
 application/octet-stream  .deploy
 application/vnd.ms-xpsdocument  .xps 
 application/xaml+xml  .xaml
 application/vnd.ms-cab-compressed  .cab
 application/vnd.openxmlformats-officedocument.wordprocessingml.document  .docx
 application/vnd.openxmlformats-officedocument.wordprocessingml.document  .docm
 application/vnd.openxmlformats-officedocument.presentationml.presentation  .pptx
 application/vnd.openxmlformats-officedocument.presentationml.presentation  .pptm
 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet  .xlsx
 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet  .xlsm
 application/msaccess  .accdb
 application/x-mspublisher  .pub
 image/svg+xml  .svg
 application/xhtml+xml  .xht
 application/xhtml+xml  .xhtml

After lot of struggling I was able to build 4.03 with following steps. This
worked for me and might not work for every one. I have ubuntu 11.10.

1. Install gcc4.4
apt-get gcc-4.4 and gcc-4.4-multilib and do

2. Use this command to build
make CC=gcc-4.4 CXX=g++-4.4

3. Get the extra binaries for the device if you are building for device
http://code.google.com/android/nexus/drivers.html#toroiml74k

4. Make following changes before build.

Edit following files from Android root folder as per the below diff

 vim build/core/combo/HOST_linux-x86.mk
 vim
external/chromium/testing/gtest/include/gtest/internal/gtest-param-util.h
 vim external/gtest/include/gtest/internal/gtest-param-util.h
 vim external/llvm/lib/Support/Mutex.cpp
 vim external/llvm/lib/Support/Signals.cpp
 vim external/llvm/lib/Support/Threading.cpp
 vim external/mesa3d/src/glsl/linker.cpp
 vim external/oprofile/libpp/format_output.h
 vim frameworks/compile/slang/Android.mk

Make following changes

project build/
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 5ae4972..fc997f2 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -53,6 +53,8 @@ HOST_GLOBAL_CFLAGS += \
        -include $(call select-android-config-h,linux-x86)

 # Disable new longjmp in glibc 2.11 and later. See bug 2967937.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+#HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+

 HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined

project external/chromium/
diff --git a/testing/gtest/include/gtest/internal/gtest-param-util.h
b/testing/gtest/include/gtest/internal/gtest-param-util.h
index 0f7b331..0176a80 100644
--- a/testing/gtest/include/gtest/internal/gtest-param-util.h
+++ b/testing/gtest/include/gtest/internal/gtest-param-util.h
@@ -37,6 +37,7 @@
 #include <iterator>
 #include <utility>
 #include <vector>
+#include <cstddef>

 // scripts/fuse_gtest.py depends on gtest's own header being #included
 // *unconditionally*.  Therefore these #includes cannot be moved

project external/gtest/
diff --git a/include/gtest/internal/gtest-param-util.h
b/include/gtest/internal/gtest-param-util.h
index 5559ab4..1572064 100644
--- a/include/gtest/internal/gtest-param-util.h
+++ b/include/gtest/internal/gtest-param-util.h
@@ -33,7 +33,7 @@

 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-
+#include <cstddef>
 #include <iterator>
 #include <utility>
 #include <vector>

project external/llvm/
diff --git a/lib/Support/Android.mk b/lib/Support/Android.mk
index 4a36e4a..f1978f5 100644
--- a/lib/Support/Android.mk
+++ b/lib/Support/Android.mk
@@ -102,3 +102,8 @@ LOCAL_MODULE_TAGS := optional

 include $(LLVM_DEVICE_BUILD_MK)
 include $(BUILD_STATIC_LIBRARY)
+
+
+
+
+
diff --git a/lib/Support/Mutex.cpp b/lib/Support/Mutex.cpp
index 8874e94..1a5be09 100644
--- a/lib/Support/Mutex.cpp
+++ b/lib/Support/Mutex.cpp
@@ -13,7 +13,8 @@

 #include "llvm/Config/config.h"
 #include "llvm/Support/Mutex.h"
-
+#undef ENABLE_THREADS
+#undef HAVE_PTHREAD_H
 //===----------------------------------------------------------------------===//
 //=== WARNING: Implementation here must contain only TRULY operating system
 //===          independent code.
diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp
index a117893..2f9c412 100644
--- a/lib/Support/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -18,6 +18,7 @@
 namespace llvm {
 using namespace sys;

+#undef HAVE_DLFCN_H
 //===----------------------------------------------------------------------===//
 //=== WARNING: Implementation here must contain only TRULY operating system
 //===          independent code.
diff --git a/lib/Support/Threading.cpp b/lib/Support/Threading.cpp
index 8f0bb93..24a45e4 100644
--- a/lib/Support/Threading.cpp
+++ b/lib/Support/Threading.cpp
@@ -17,6 +17,8 @@
 #include "llvm/Config/config.h"
 #include <cassert>

+#undef LLVM_MULTITHREADED
+
 using namespace llvm;

 static bool multithreaded_mode = false;

project external/mesa3d/
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index f8b6962..f31e5b5 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -67,6 +67,7 @@
 #include <cstdio>
 #include <cstdarg>
 #include <climits>
+#include <stddef.h>

 #include <pixelflinger2/pixelflinger2_interface.h>

@@ -1762,4 +1763,4 @@ done:
    }

    //hieralloc_free(mem_ctx);
-}
\ No newline at end of file
+}

project external/oprofile/
diff --git a/libpp/format_output.h b/libpp/format_output.h
index b6c4592..0423448 100644
--- a/libpp/format_output.h
+++ b/libpp/format_output.h
@@ -91,7 +91,8 @@ protected:
                symbol_entry const & symbol;
                sample_entry const & sample;
                size_t pclass;
-               mutable counts_t & counts;
+               //mutable counts_t & counts;
+               counts_t & counts;
                extra_images const & extra;
                double diff;
        };

project frameworks/base/
diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk
index 831d9e3..b07b01c 100644
--- a/libs/utils/Android.mk
+++ b/libs/utils/Android.mk
@@ -61,7 +61,7 @@ LOCAL_SRC_FILES:= $(commonSources)

 LOCAL_MODULE:= libutils

-LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
+LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
 LOCAL_C_INCLUDES += external/zlib

 ifeq ($(HOST_OS),windows)

project frameworks/compile/slang/
diff --git a/Android.mk b/Android.mk
index a783ba9..d9fa88e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -19,7 +19,9 @@ ifeq ($(TARGET_BUILD_APPS),)

 LOCAL_PATH := $(call my-dir)

-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
-Werror
+//local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
-Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
+
 ifneq ($(TARGET_BUILD_VARIANT),eng)
 local_cflags_for_slang += -D__DISABLE_ASSERTS
 endif

Hope this helps.

On Tue, Jan 17, 2012 at 2:15 PM, Jean-Baptiste Queru <j...@android.com>wrote:

오픈 소스 삼성에 있는 방법을 그대로 했는데, 갤탭에 이미지를 굽는 것만 하고 그 이상이 되지 않는다.  결국 컴파일만 한 것 같다.

먼가 더 있는 것 같은데.. 찾기 어렵다.  하여튼 실패기도 넣는 것도 좋을 것 같아서 적어본다.

 

--------------------------------

 

기존 정보는 오픈소스 삼성 싸이트(https://opensource.samsung.com)에 공개되어 있다.

갤럭시탭 소스는 두가지 버전이 있다. 해외버전인 gt-p1000과 국내버전인 SHW-M180 버전이 있다. 나는 국내버전의 LGT 용만 가지고 테스트하려고 한다.


https://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=gt-p1000
https://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=m180

 

<운영체제 확인>

$ dpkg -s libc6  | grep Archite
Architecture: i386

이러면  32 비트, amd64가 나오면 64비트이다.

진저브레드 이상 컴파일하려면 64비트에서 돌리는 것이 편하다.

다운로드 링크 –> http://www.ubuntu.com/download/ubuntu/download

 

* 참고 32비트에서 컴파일 하려면. 좀 귀찮은 작업을 해야 한다.

아래와 같은 에러 문구가 나와서 여기저기 손봐야 한다.

build/core/main.mk:76: ************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:79: ************************************************************
build/core/main.mk:80: *** stop.  Stop.

1. 32비트 운영체제일 때는  ./build/core/main.mk 파일을 아래와 같이 주석을 추가한다. .

73 ifeq ($(BUILD_OS),linux)
74 build_arch := $(shell uname -m)
75 ifneq (64,$(findstring 64,$(build_arch)))
76 $(warning ************************************************************)
77 $(warning You are attempting to build on a 32-bit system.)
78 $(warning Only 64-bit build environments are supported beyond froyo/2.2.)
79 $(warning ************************************************************)
80 $(error stop)
81 endif
82 endif

=>

73 #ifeq ($(BUILD_OS),linux)
74 #build_arch := $(shell uname -m)
75 #ifneq (64,$(findstring 64,$(build_arch)))
76 #$(warning ************************************************************)
77 #$(warning You are attempting to build on a 32-bit system.)
78 #$(warning Only 64-bit build environments are supported beyond froyo/2.2.)
79 #$(warning ************************************************************)
80 #$(error stop)
81 #endif
82 #endif

 

2. 다음 mk 파일에서 m64->m32로 변경한다.

./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
./external/clearsilver/cs/Android.mk

LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += –m64

->

LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += –m32

 

 

 

<갤탭 소스 다운로드>

LGT 의 갤럭시탭 소스를 다운받는다.

https://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=m180

image

 

최신버전은 update3을 다운받는다. 다운받아서 내용을 보면, 달랑 kernel과 readme.txt 파일밖에 없다.

image

 

readme.txt 파일에 따르면, update2.zip 파일에 있는 플랫폼 파일을 다운받으라고 한다. 다운받고 커널 파일과 플랫폼 파일을 합친다.

<NOTICE>

The Platform opensource code is the same as that of TF09 version.

Get TF09 version opensource code - filename: SHW-M180L_Opensource_Update2.zip
(download site: opensource.samsung.com)
Unzip it, then you will see the file SHW-M180L_Platform_Gingerbread.tar.gz

 

파일을 모아본다.

image

 

tar.gz으로 묶인 플랫폼 소스의 readme.txt 파일을 보면, build 설명 방법이 잘 나와 있다.

How to build


1. Get android open source.
    : version info - Android gingerbread 2.3.3
    ( Download site : http://source.android.com )

2. Overwrite modules that you want to build.
- \external\iproute2 : Write "ip \" into "build\core\user_tags.mk" so that add this module.
- \external\webkit  : Delete this source tree at Android gingerbread and then copy & execute "clean build".
- \external\alsa-lib : Write "libasound \" into "build\core\user_tags.mk" so that add this module.

3. Add the following lines at the end of build/target/board/generic/BoardConfig.mk

BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM_BTLA := true
BT_ALT_STACK := true
BRCM_BT_USE_BTL_IF := true
BRCM_BTL_INCLUDE_A2DP := true
BOARD_USES_ALSA_AUDIO := true

4. make
- ./build.sh user

 

ubuntu 11.10 amd64 비트를 기반으로 설명한다.


<소스 다운로드>

* 참고자료
http://source.android.com/source/downloading.html

* jdk 6 설치

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

 

* 필요 패키지 설치

$ sudo apt-get install git-core gnupg flex bison gperf build-essential  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev  lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc lib32readline-gplv2-dev

(원래 문서에서는 lib32z-dev를 설치하라고 되어 있지만, Ubuntu 11.10 64비트에서는 해당 모듈을 설치할 수 없다. 따라서 대안인 lib32readline-gplv2-dev을 설치한다.)

$ sudo apt-get install libx11-dev:i386

 

* repo 설치

$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

 

* 안드로이드 2.3.3 소스 다운로드
$ mkdir android-2.3.3-galtab
$ cd android-2.3.3-galtab
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.3_r1
$ repo sync

 

* LGT 삼성 갤탭 소스 복사
vmware player에서 소스가 있는 곳을 공유(/mnt/hgfs/vmware-share)해서 복사한다.


$ tar zxvf /mnt/hgfs/vmware-share/SHW-M180L_Platform_Gingerbread.tar.gz –C .

$ tar zxvf /mnt/hgfs/vmware-share/SHW-M180L_Kernel_Gingerbread.tar.gz –C .

$ mv Platform/ android-2.3.3-galtab-platform

$ mv Kernel/ android-2.3.3-galtab-kernel

 


<커널 소스 빌드>

* 툴체인 (Tool Chain) 설치

$ cd /usr/local
$ wget http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ tar xvf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

* build.sh 파일 수정

$ cd ~/android-2.3.3-galtab-kernel
$ vi build_kernel.sh

1. TOOLCHAIN과 TOOLCHAIN_PREFIX 변수를 수정한다.

TOOLCHAIN=~/opt/toolchains/arm-2009q3/bin/
TOOLCHAIN_PREFIX=arm-none-eabi-
=>
TOOLCHAIN=/usr/local/arm-2009q3/bin/  
TOOLCHAIN_PREFIX=arm-none-linux-gnueabi-        

2. 28번째 줄에 있는 ^M은 삭제한다. (빌드시 에러처럼 보일 수 있어서.)

output 디렉토리를 확인한다.

ANDROID_OUT_DIR=`pwd`/Android/out/target/product/SHW-M180L

* Kernel 빌드

$ cd ~/android-2.3.3-galtab-Kernel/Kernel

$ make menuconfig

General setup->Initramfs source file->exit->exit->Yes 하고 설정을 save 한다.

image

(initramfs 적용방법과 적용하지 않는 방법 둘 다 써도 문제임)

$ cd ..

$ ./build_kernel.sh

(sh 내부에 ARCH=arm, tool chain 확인)

빌드 결과는 zImage과 커널 모듈파일이다. 커널 이미지가 제대로 있는지 확인한다.

$ ls ~/android-2.3.3-galtab-kernel/Kernel/arch/arm/boot/zImage

커널 모듈 파일이 제대로 있는지 확인한다.

$ ls -al ~/android-2.3.3-galtab-kernel/Kernel/drivers/*/*

 

* 나중에 이 파일을 이용하면 성능 효과를 높일 수도 있을 수 있을 것 같아서 우선 기억해둔다.

arch/arm/configs/p1_kor_M180L_defconfig 

* Clean 하기

$ ./build_kernel.sh Clean

 

<커널 파일을 tar로 만들기>

$ cd ~

$ tar cvf SHW-M180L-kernel.tar android-2.3.3-galtab-kernel/Kernel/arch/arm/boot/zImage
android-2.3.3-galtab-kernel/Kernel/arch/arm/boot/zImage

기존 이미지를 풀어서 새로 컴파일한 zImage 파일만 replace  해 본다.

image

 

그리고, 윈도우에서 7zip으로 tar 파일로 만들면 upload failed 가 뜬다. ubuntu에서 tar로 묶는다.

image

tar로 묶은 후 Odin으로 굽는다.

image

image

 

갤탭 로고는 나오는데, 무한 부팅되면서 이미지 upload 실패했다.

zImage 크기가 순정과 컴파일 이후의 것이 800kb가 차이날 정도로 다르다. 먼가 더 있는 것 같은데. 잘 모르겠다.

 

 

<안드로이드 소스 빌드>

$ cd ~/android-2.3.3-galtab

ubuntu 11.10에서 에러가 발생할 수 있으니. 일부 make 파일을 수정해야 한다.

$ vi frameworks/base/libs/utils/Android.mk

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

=>

LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive

-fpermissive에 대한 설명은 gcc 4.1 이슈로서, 자세한 내용은 링크(http://nineye.com/blog/archives/543)를 참조한다.

$ vi build/core/combo/HOST_linux-x86.mk

HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0   
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

FORTIFY_SOURCE에 대한 설명은 링크(http://studyfoss.egloos.com/5280245)를 참조한다.


$ source build/envsetup.sh

$ lunch full-eng

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRI40
============================================

$ make

….
Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Installed file list: out/target/product/generic/installed-files.txt

 

 

<플랫폼 소스 수정 및 빌드>

$ cd ~/android-2.3.3-galtab-platform/

$ vi build/target/board/generic/BoardConfig.mk

다음을 추가한다.
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM_BTLA := true
BT_ALT_STACK := true
BRCM_BT_USE_BTL_IF := true
BRCM_BTL_INCLUDE_A2DP := true
BOARD_USES_ALSA_AUDIO := true

$ vi build.sh

안드로이드 컴파일했던 디렉토리를 PLATFORMPATH로 수정한다.

export PLATFORMPATH="/home/kimyonghwan/android-2.3.3-galtab"

$ cd ~/android-2.3.3-galtab-platform/

$ ./build.sh user

Posted by My Story '김용환'
출 처: http://knight76.tistory.com/


+ Recent posts