User Tools

Site Tools


android

This is an old revision of the document!


cross compile tool

Sourcery G++ lite 설치

export PATH=~/apps/toolchains/arm-2009q1/bin:$PATH
  • man alias 설치 ~/.bash_aliases
alias armman="MANPATH=~/apps/toolchains/arm-2009q1/share/doc/arm-arm-none-eabi/man/ man"
  • Makefile에 환경변수 전달
$ make uImage ARCH=arm CROSS_COMPILE=/path/to/toolchain/prefix-

ARM 버젼별 컴파일러 옵션

  • ARMv4 - Little-Endian, Soft-Float
    • Command-line option(s): default
    • Library subdirectory: ./
  • ARMv4 Thumb - Little-Endian, Soft-Float
    • Command-line option(s): -mthumb
    • Library subdirectory: thumb/
  • ARMv7 Thumb-2 - Little-Endian, Soft-Float
    • Command-line option(s): -mthumb -march=armv7 -mfix-cortex-m3-ldrd
    • Library subdirectory: thumb2/
  • ARMv6-M Thumb - Little-Endian, Soft-Float
    • Command-line option(s): -mthumb -march=armv6-m
    • Library subdirectory: armv6-m/

binutils 설명

참조

  • ar - Create, modify, and extract from archives
  • nm - List symbols from object les
  • objcopy - Copy and translate object les
  • objdump - Display information from object les
  • ranlib - Generate index to archive contents
  • readelf - Display the contents of ELF format les.
  • size List - le section sizes and total size
  • strings - List printable strings from les
  • strip - Discard symbols
  • c++filt - Demangle encoded C++ symbols (on MS-DOS, this program is named cxxfilt)
  • addr2line - Convert addresses into le names and line numbers

컴파일시 define 되었나 알아보기

<noth> suapapa_m12, gcc -DNOTH -dM -E hello.c | grep NOTH
<noth> #define NOTH 1

target boards

minimal requierment for android

  • 32MB RAM
  • 32MN Flash Memory
  • 200MHz Online Processor

rebis

기타 판매중인 보드들

  • ARMv5 S3C2440 LCD포함 40만원 미만
  • ARMv6 S3C6410 LCD포함 100만원 미만

uboot

기존 u-boot는 gcc version 4.3.3 (Sourcery G++ Lite 2009q1-161) 에서 컴파일 에러. 아래 패치를 적용하여 코드 수정

$ tar xvzf mds-u-boot.tar.gz
...
$ cd mds-u-boot-rebis
$ patch -p1 < ../u-boot_compile_with_sourcery_g++.patch 
patching file Makefile
patching file common/cmd_nand_s3c2440a.c
patching file cpu/arm920t/config.mk
patching file net/net.c
patching file net/tftp.c

nand 부팅 빌드

$ make distclean
...
$ make clean
...
$ make rebis_nand_config 
... with NAND BOOTING configuration
Configuring for rebis board...
$ CROSS_COMPILE=arm-none-eabi- make
...
  • NOR부팅 : rebis-atm322a_config, 2440_intel16_config, 2440_intel32_config

빌드 결과물 확인

$ ls u-boot*
u-boot  u-boot.bin  u-boot.map  u-boot.srec
$ file u-boot
u-boot: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
$ arm-none-eabi-readelf -h u-boot |grep Flags
  Flags:                             0x5000002, has entry point, Version5 EABI

T32 cmm

$ find ./ -name *.cmm
./Document/Emulator/TRACE32/flash/rebis_flash_atmel.cmm
./Document/Emulator/TRACE32/terminal.cmm
./Document/Emulator/TRACE32/rebis_init.cmm
./Document/Emulator/TRACE32/linux/start_linux.cmm
./Document/Emulator/TRACE32/linux/rebis_INIT.cmm
./Document/Emulator/TRACE32/win.cmm

references

android.1254725848.txt.gz · Last modified: 2013/08/03 05:04 (external edit)