| #!/bin/bash |
| |
| set -e |
| |
| TOP=`pwd` |
| |
| rm -rf dist |
| mkdir dist |
| |
| rm -rf build |
| mkdir build |
| cd build |
| |
| tar xfv ../libffi-3.0.13.tar.gz |
| cd libffi-3.0.13 |
| ./configure --prefix=/usr \ |
| --host=arm-none-linux-gnueabi \ |
| --disable-static \ |
| CFLAGS="-mtune=arm1136j-s -march=armv6 -Os" \ |
| LDFLAGS="-Os -L$TOP/dist/usr/lib " |
| make install DESTDIR=$TOP/dist |
| cd $TOP |
| |
| cd build |
| tar xfv ../glib-2.37.3.tar.xz |
| cd glib-2.37.3 |
| |
| |
| LIBFFI_CFLAGS="-I$TOP/dist/usr/lib/libffi-3.0.13/include" \ |
| LIBFFI_LIBS="-L$TOP/dist/usr/lib -lffi" \ |
| ./autogen.sh |
| |
| ./configure --prefix=/usr --cache-file=$TOP/arm-linux-a5s.cache --disable-gtk-doc-html --disable-man \ |
| --host=arm-none-linux-gnueabi \ |
| CFLAGS="-mtune=arm1136j-s -march=armv6 -Os" \ |
| LIBFFI_CFLAGS="-I$TOP/dist/usr/lib/libffi-3.0.13/include" \ |
| ZLIB_CFLAGS="-I$TOP/../../a5s_linux_sdk/ambarella/prebuild/third-party/zlib/include" \ |
| LIBFFI_LIBS="-L$TOP/dist/usr/lib -lffi" \ |
| ZLIB_LIBS="-L$TOP/../../a5s_linux_sdk/ambarella/prebuild/third-party/zlib/lib -lz" \ |
| LDFLAGS="-s -Wl,-rpath,$TOP/dist/usr/lib -Wl,-rpath,$TOP/../../a5s_linux_sdk/ambarella/prebuild/third-party/zlib/lib " |
| |
| make install DESTDIR=$TOP/dist |
| cd $TOP |
| |
| rm -rf fakeroot |
| mkdir fakeroot |
| cp -R dist/* fakeroot/ |
| |
| rm -rf fakeroot/usr/bin |
| rm -rf fakeroot/usr/share |
| rm -rf fakeroot/usr/include |
| rm -rf fakeroot/usr/lib/libffi-3.0.13/include |
| rm -rf fakeroot/usr/lib/pkgconfig |
| find fakeroot -name *.la -exec rm -f {} \; |
| mkdir fakeroot/usr/bin |
| cp dist/usr/bin/gdbus fakeroot/usr/bin/ |
| |
| tar cjfv glib.tar.bz2 fakeroot |
| cp glib.tar.bz2 ../../a5s_linux_sdk/ambarella/boards/dropcam/rootfs/ |
| |