기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.
안녕하세요.
현재 리눅스에서 u-boot 소스와 ELDK를 사용하여 컴파일해서 사용했습니다. 그랬더니 많이 불편하네요
윈도우즈 상에서 사용할려면 cygwin이라는 에뮬레이터 비슷한 쉘을 써야한다고 나와있습니다.
그래서 문서 찾고 해봤는데 잘 안되네요.
[진행내용]
1. cygwin 설치
2. gnuarm을 cygwin 폴더의 usr/local/GNUARM/이라는 폴더를 만들어 설치
3. cygwin의 /etc/profile 에서 path에다 아래와 같이 추가
PATH=/usr/local/GNUARM/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH
export PATH
4. u-boot의 makefile에서 arm-linux- 를 arm-elf로 수정
5. make clobber, make distclean, make clean을 해주고
6. make test_config 까지 완성
7. make all 을 했더니 아래와 같이 에러가 납니다.
=================================================================================================
test@test /home/u-boot134/u-boot-1.3.4
$ make all
Generating include/autoconf.mk.dep
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/tools'
ln -s ../common/environment.c environment.c
ln -s ../include/zlib.h zlib.h
ln -s ../lib_generic/crc32.c crc32.c
ln -s ../lib_generic/md5.c md5.c
ln -s ../lib_generic/sha1.c sha1.c
ln -s ../common/image.c image.c
if [ ! -f mkimage.h ] ; then
ln -s ../tools/mkimage.h mkimage.h;
fi
if [ ! -f fdt_host.h ] ; then
ln -s ../tools/fdt_host.h fdt_host.h;
fi
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/tools'
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/tools'
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/examples'
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/examples'
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/examples'
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/api_examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/api_examples'
Generating include/autoconf.mk
make -C tools all
make[1]: Entering directory `/home/u-boot134/u-boot-1.3.4/tools'
gcc -Wall -pedantic -ansi -idirafter /home/u-boot134/u-boot-1.3.4/include -idira
fter /home/u-boot134/u-boot-1.3.4/include2 -idirafter /home/u-boot134/u-boot-1.3
.4/include -DTEXT_BASE=0xa3080000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
gcc -Wall -pedantic -ansi -idirafter /home/u-boot134/u-boot-1.3.4/include -idira
fter /home/u-boot134/u-boot-1.3.4/include2 -idirafter /home/u-boot134/u-boot-1.3
.4/include -DTEXT_BASE=0xa3080000 -DUSE_HOSTCC -O -o img2srec.exe img2srec.o
strip img2srec.exe
gcc -g -Wall -idirafter /home/u-boot134/u-boot-1.3.4/include -idirafter /home/u-
boot134/u-boot-1.3.4/include2 -idirafter /home/u-boot134/u-boot-1.3.4/include -D
TEXT_BASE=0xa3080000 -DUSE_HOSTCC -O -c -o mkimage.o mkimage.c
In file included from fdt_host.h:25,
from mkimage.h:36,
from mkimage.c:25:
../include/libfdt.h: In function `fdt_set_magic':
../include/libfdt.h:162: warning: implicit declaration of function `__cpu_to_be3
2'
In file included from mkimage.c:26:
/home/u-boot134/u-boot-1.3.4/include/image.h: At top level:
/home/u-boot134/u-boot-1.3.4/include/image.h:202: error: parse error before "ulo
ng"
/home/u-boot134/u-boot-1.3.4/include/image.h:224: error: parse error before '}'
token
/home/u-boot134/u-boot-1.3.4/include/image.h:334: error: parse error before "ima
ge_get_data"
/home/u-boot134/u-boot-1.3.4/include/image.h: In function `image_get_data':
/home/u-boot134/u-boot-1.3.4/include/image.h:336: error: `ulong' undeclared (fir
st use in this function)
/home/u-boot134/u-boot-1.3.4/include/image.h:336: error: (Each undeclared identi
fier is reported only once
/home/u-boot134/u-boot-1.3.4/include/image.h:336: error: for each function it ap
pears in.)
/home/u-boot134/u-boot-1.3.4/include/image.h:336: error: parse error before "hdr
"
/home/u-boot134/u-boot-1.3.4/include/image.h: At top level:
/home/u-boot134/u-boot-1.3.4/include/image.h:343: error: parse error before "ima
ge_get_image_end"
/home/u-boot134/u-boot-1.3.4/include/image.h: In function `image_get_image_end':
/home/u-boot134/u-boot-1.3.4/include/image.h:345: error: `ulong' undeclared (fir
st use in this function)
/home/u-boot134/u-boot-1.3.4/include/image.h:345: error: parse error before "hdr
"
/home/u-boot134/u-boot-1.3.4/include/image.h: At top level:
/home/u-boot134/u-boot-1.3.4/include/image.h:402: error: parse error before "ima
ge_multi_count"
/home/u-boot134/u-boot-1.3.4/include/image.h:403: error: parse error before "ulo
ng"
/home/u-boot134/u-boot-1.3.4/include/image.h:477: error: parse error before "ulo
ng"
/home/u-boot134/u-boot-1.3.4/include/image.h:479: error: parse error before "ulo
ng"
/home/u-boot134/u-boot-1.3.4/include/image.h:493: error: parse error before "fit
_get_size"
/home/u-boot134/u-boot-1.3.4/include/image.h:505: error: parse error before "fit
_get_end"
/home/u-boot134/u-boot-1.3.4/include/image.h: In function `fit_get_end':
/home/u-boot134/u-boot-1.3.4/include/image.h:507: error: `ulong' undeclared (fir
st use in this function)
/home/u-boot134/u-boot-1.3.4/include/image.h:507: error: parse error before "fit
"
/home/u-boot134/u-boot-1.3.4/include/image.h: At top level:
/home/u-boot134/u-boot-1.3.4/include/image.h:532: error: parse error before "ulo
ng"
/home/u-boot134/u-boot-1.3.4/include/image.h:533: error: parse error before "ulo
ng"
make[1]: *** [mkimage.o] Error 1
make[1]: Leaving directory `/home/u-boot134/u-boot-1.3.4/tools'
make: *** [tools] Error 2
=================================================================================================
리눅스상에서 컴파일 완료하여 부팅까지 시켰던 소스인데
윈도우즈 환경에서 컴파일 에러가 나네요 parse error인데 구글 찾아봐도 잘 모르겠습니다.
혹시 이것을 해결할 방법이 있나요? 아님 애초부터 u-boot는 리눅스의 ELDK 상에서만 해야되는것인지요?
제생각에는 cygwin에서도 될것 같은데 방법이나 순서를 아시면 도움 좀 부탁드리겠습니다.
그럼 수고하십시오.
경로 구성이나 CR 차이로 인해 엄청난 패치로 삽이 닳아빠지도록 삽질을 했었습니다.
3주 넘는 긴 시간동안 삽질을 하고 성공은 하였습니다만.... 별 소득은 없었죠.
그 삽질하는 동안에 vmware나 virtualbox에 리눅스깔고 samba로 연결하여 XP/Vista위에서 에디터/파일관리
하는 방향으로 개발환경을 구축하는것을 추천합니다. 이건 길어야 2~3일이면 가능합니다.
삽질은 가능하나 툴체인이나 커널이 바뀌면 그 엄청난 삽질을 또 시작해야하는다는 불편함이 있습니다.
시간이 많거나, 아님 특별히 cygwin에대한 승부욕이 불탄다면 말릴수는 없겠습니다만.... ^.^