ลองค้นๆดูแล้วเขาว่าตัวนี้ work ถือโอกาสแสดงวิธี cross-compile ให้ดูซะเลย

ไปดูดมา

wget http://files.banu.com/pub/tinyproxy/1.6/tinyproxy-1.6.3.tar.gz

แล้วแตกไฟล์

# tar zxvf tinyproxy-1.6.3.tar.gz

แล้วก็เข้าไปสร้าง Makefile เอาสถาปัตยกรรม cris-axis เลย

# cd tinyproxy-1.6.3

# export PATH=/usr/local/cris/bin:$PATH

# ./configure –host=cris-axis-linux-gnu

# ./configure –host=cris-axis-linux-gnu

configure: WARNING: If you wanted to set the –build type, don’t use –host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type… i686-pc-linux-gnu
checking host system type… cris-axis-linux-gnu
checking target system type… cris-axis-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets $(MAKE)… yes
checking for working aclocal-1.4… missing
checking for working autoconf… found
checking for working automake-1.4… missing
checking for working autoheader… found
checking for working makeinfo… found
checking for cris-axis-linux-gnu-gcc… cris-axis-linux-gnu-gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… yes
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cris-axis-linux-gnu-gcc accepts -g… yes
checking for cris-axis-linux-gnu-gcc option to accept ANSI C… none needed
checking how to run the C preprocessor… cris-axis-linux-gnu-gcc -E
checking for egrep… grep -E
checking for AIX… no
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking minix/config.h usability… no
checking minix/config.h presence… no
checking for minix/config.h… no
configure: Default config location and file is: /usr/local/etc/tinyproxy/tinyproxy.conf
checking whether make sets $(MAKE)… (cached) yes
checking for cris-axis-linux-gnu-gcc… (cached) cris-axis-linux-gnu-gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether cris-axis-linux-gnu-gcc accepts -g… (cached) yes
checking for cris-axis-linux-gnu-gcc option to accept ANSI C… (cached) none needed
checking for strerror in -lcposix… no
checking for a BSD-compatible install… /usr/bin/install -c
checking whether ln -s works… yes
checking for flex… flex
checking for flex… (cached) flex
checking for yywrap in -lfl… no
checking for yywrap in -ll… no
checking lex output file root… lex.yy
checking whether yytext is a pointer… no
checking for bison… bison -y
checking for a sed that does not truncate output… /bin/sed
checking for ld used by cris-axis-linux-gnu-gcc… /usr/local/cris/cris-axis-linux-gnu/bin/ld
checking if the linker (/usr/local/cris/cris-axis-linux-gnu/bin/ld) is GNU ld… yes
checking for /usr/local/cris/cris-axis-linux-gnu/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /usr/local/cris/bin/cris-axis-linux-gnu-nm -B
checking how to recognise dependent libraries… pass_all
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking for cris-axis-linux-gnu-g++… cris-axis-linux-gnu-g++
checking whether we are using the GNU C++ compiler… yes
checking whether cris-axis-linux-gnu-g++ accepts -g… yes
checking how to run the C++ preprocessor… cris-axis-linux-gnu-g++ -E
checking for cris-axis-linux-gnu-g77… no
checking for cris-axis-linux-gnu-f77… no
checking for cris-axis-linux-gnu-xlf… no
checking for cris-axis-linux-gnu-frt… no
checking for cris-axis-linux-gnu-pgf77… no
checking for cris-axis-linux-gnu-fort77… no
checking for cris-axis-linux-gnu-fl32… no
checking for cris-axis-linux-gnu-af77… no
checking for cris-axis-linux-gnu-f90… no
checking for cris-axis-linux-gnu-xlf90… no
checking for cris-axis-linux-gnu-pgf90… no
checking for cris-axis-linux-gnu-epcf90… no
checking for cris-axis-linux-gnu-f95… no
checking for cris-axis-linux-gnu-fort… no
checking for cris-axis-linux-gnu-xlf95… no
checking for cris-axis-linux-gnu-ifc… no
checking for cris-axis-linux-gnu-efc… no
checking for cris-axis-linux-gnu-pgf95… no
checking for cris-axis-linux-gnu-lf95… no
checking for cris-axis-linux-gnu-gfortran… no
checking for g77… no
checking for f77… no
checking for xlf… no
checking for frt… no
checking for pgf77… no
checking for fort77… no
checking for fl32… no
checking for af77… no
checking for f90… no
checking for xlf90… no
checking for pgf90… no
checking for epcf90… no
checking for f95… no
checking for fort… no
checking for xlf95… no
checking for ifc… no
checking for efc… no
checking for pgf95… no
checking for lf95… no
checking for gfortran… no
checking whether we are using the GNU Fortran 77 compiler… no
checking whether accepts -g… no
checking the maximum length of command line arguments… 32768
checking command to parse /usr/local/cris/bin/cris-axis-linux-gnu-nm -B output from cris-axis-linux-gnu-gcc object… ok
checking for objdir… .libs
checking for cris-axis-linux-gnu-ar… cris-axis-linux-gnu-ar
checking for cris-axis-linux-gnu-ranlib… cris-axis-linux-gnu-ranlib
checking for cris-axis-linux-gnu-strip… cris-axis-linux-gnu-strip
checking if cris-axis-linux-gnu-gcc static flag works… yes
checking if cris-axis-linux-gnu-gcc supports -fno-rtti -fno-exceptions… yes
checking for cris-axis-linux-gnu-gcc option to produce PIC… -fPIC
checking if cris-axis-linux-gnu-gcc PIC flag -fPIC works… yes
checking if cris-axis-linux-gnu-gcc supports -c -o file.o… yes
checking whether the cris-axis-linux-gnu-gcc linker (/usr/local/cris/cris-axis-linux-gnu/bin/ld) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
configure: creating libtool
appending configuration tag “CXX” to libtool
checking for ld used by cris-axis-linux-gnu-g++… /usr/local/cris/cris-axis-linux-gnu/bin/ld
checking if the linker (/usr/local/cris/cris-axis-linux-gnu/bin/ld) is GNU ld… yes
checking whether the cris-axis-linux-gnu-g++ linker (/usr/local/cris/cris-axis-linux-gnu/bin/ld) supports shared libraries… yes.

.

.

.
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing default-1 commands
debian-iboard:/home/sittichai/pro/tinyproxy-1.6.3# make

เสร็จแล้วก็จะได้โปรแกรม tinyproxy อยู่ใน src เอาไปใช้ใน iBoard ได้ โดยอาจจะใส่ไว้ใน /usr/local/bin  เมื่อทดสอบจนพอใจแล้ว ก็สามารถใส่ไว้ใน Firmware อย่างถาวรได้ restore factory default ก็ไม่หาย จะแสดงวิธีทำให้ดูในคราวต่อไปครับ

Posted by ณัฐนันท์ ศรีสะอาด, filed under Software, iBoard. Date: May 22, 2008, 4:59 pm |

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.