export PATH=~/apps/toolchains/arm-2009q1/bin:$PATH
alias armman="MANPATH=~/apps/toolchains/arm-2009q1/share/doc/arm-arm-none-eabi/man/ man"
$ make uImage ARCH=arm CROSS_COMPILE=/path/to/toolchain/prefix-
컴파일시 define 되었나 알아보기
<noth> suapapa_m12, gcc -DNOTH -dM -E hello.c | grep NOTH <noth> #define NOTH 1
기존 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_atm322a_config ... $ CROSS_COMPILE=arm-none-eabi- make ...
빌드 결과물 확인
$ 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
tftp로 커널바이너리와 ramdisk 밀어넣기
REBIS# set ethaddr 12:34:56:65:43:21 MAC address REBIS# set serverip 192.168.1.1 Host IP address REBIS# set ipaddr 192.168.1.2 Target IP address REBIS# t 30800000 ramdisk-8.gz ramdisk download REBIS# t 32000000 zImage kernel download REBIS# go 32000000 start REBIS# nandw 0 200000 32000000 kernel Fusing REBIS# nandw 100 340000 30800000 ramdisk Fusing REBIS# set bootcmd nandr 0 200000 32000000\; nandr 100 340000 30800000\;g 32000000
make uImage ARCH=arm CROSS_COMPILE=…
SEGMENT_SIZE 디파인 되어있지 않다고 에러 뿜을때
// NOSTDINC_FLAGS에 -Dlinux 추가... NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -Dlinux CHECKFLAGS += $(NOSTDINC_FLAGS)
$ 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
실제 타켓에 포팅
어플개발에 관한 참고 사이트들
소스저장소
플랫폼 다운로드
mkdir mydroid cd mydroid repo init -u git://android.git.kernel.org/platform/manifest.git repo sync