디바이스 드라이버
i.MX6 보드에 png 라이브러리 포팅하는 방법을 설명하도록 하겠습니다.
다운로드 사이트는 아래와 같습니다.
http://files.directadmin.com/services/custombuild/libpng-1.2.40.tar.gz
[빌드하기]
root@roy-VPCCB17FK:libpng-1.2.40# CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar STRIP=arm-linux-gnueabihf-strip RANLIB=arm-linux-gnueabihf-ranlib ./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf
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 for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
......
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libpng.pc
config.status: creating libpng-config
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@roy-VPCCB17FK:libpng-1.2.40# make
make all-am
make[1]: Entering directory `/staff/I11-0053_pool_sw_v2/trunk/sw/linux/lib_images/libpng-1.2.40'
/bin/bash ./libtool --tag=CC --mode=compile arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c -o libpng12_la-png.lo `test -f 'png.c' || echo './'`png.c
libtool: compile: arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c png.c -fPIC -DPIC -o .libs/libpng12_la-png.o
libtool: compile: arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c png.c -o libpng12_la-png.o >/dev/null 2>&1
mv -f .deps/libpng12_la-png.Tpo .deps/libpng12_la-png.Plo
/bin/bash ./libtool --tag=CC --mode=compile arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-pngset.lo -MD -MP -MF .deps/libpng12_la-pngset.Tpo -c -o libpng12_la-pngset.lo `test -f 'pngset.c' || echo './'`pngset.c
libtool: compile: arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-pngset.lo -MD -MP -MF .deps/libpng12_la-pngset.Tpo -c pngset.c -fPIC -DPIC -o .libs/libpng12_la-pngset.o
libtool: compile: arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-pngset.lo -MD -MP -MF .deps/libpng12_la-pngset.Tpo -c pngset.c -o libpng12_la-pngset.o >/dev/null 2>&1
mv -f .deps/libpng12_la-pngset.Tpo .deps/libpng12_la-pngset.Plo
.....
libtool: link: arm-linux-gnueabihf-ranlib .libs/libpng.a
libtool: link: ( cd ".libs" && rm -f "libpng.la" && ln -s "../libpng.la" "libpng.la" )
cp libpng-config libpng12-config
cp libpng.pc libpng12.pc
make[1]: Leaving directory `/staff/I11-0053_pool_sw_v2/trunk/sw/linux/lib_images/libpng-1.2.40'
root@roy-VPCCB17FK:libpng-1.2.40# make install
make[1]: Entering directory `/staff/I11-0053_pool_sw_v2/trunk/sw/linux/lib_images/libpng-1.2.40'
test -z "/usr/arm-linux-gnueabihf/bin" || /bin/mkdir -p "/usr/arm-linux-gnueabihf/bin"
/usr/bin/install -c libpng12-config '/usr/arm-linux-gnueabihf/bin'
test -z "/usr/arm-linux-gnueabihf/lib" || /bin/mkdir -p "/usr/arm-linux-gnueabihf/lib"
/bin/bash ./libtool --mode=install /usr/bin/install -c libpng12.la libpng.la '/usr/arm-linux-gnueabihf/lib'
root@roy-VPCCB17FK:libpng-1.2.40# ls /usr/arm-linux-gnueabihf/lib/liblibpng12.*
libpng12.la
libpng12.so
libpng12.so.0
libpng12.so.0.40.0