| #!/bin/bash |
| |
| set -e |
| |
| source ../../a5s_linux_sdk/ambarella/build/env/CodeSourcery.env |
| PATH=$PATH:$ARM_LINUX_TOOLCHAIN_DIR/bin |
| |
| OPENSSL=openssl-1.0.2 |
| OPENSSL_SOURCE=$OPENSSL.tar.gz |
| |
| CONFIG="shared" |
| |
| TOP=`pwd` |
| |
| rm -rf dist |
| mkdir dist |
| rm -rf build |
| mkdir build |
| cd build |
| tar zxfv ../$OPENSSL_SOURCE |
| cd $OPENSSL |
| |
| ./Configure experimental-jpake --prefix=/usr --openssldir=/etc/openssl $CONFIG linux-armv4 -mtune=arm1136j-s -march=armv6k |
| |
| make |
| make INSTALL_PREFIX=$TOP/dist install_sw |
| |
| # This confuses libcurl and doesn't work well for x-compling anyway |
| rm -r ${TOP}/dist/usr/lib/pkgconfig |
| |
| cd ../.. |
| |
| rm -rf fakeroot |
| mkdir -p fakeroot/usr/lib |
| mkdir -p fakeroot/usr/bin |
| cp -d dist/usr/lib/libcrypto.so* fakeroot/usr/lib/ |
| cp -d dist/usr/lib/libssl.so* fakeroot/usr/lib/ |
| cp -d dist/usr/bin/* fakeroot/usr/bin |
| chmod +w fakeroot/usr/lib/*.so* |
| arm-none-linux-gnueabi-strip --strip-unneeded fakeroot/usr/lib/*.so* |
| arm-none-linux-gnueabi-strip fakeroot/usr/bin/openssl |
| |
| tar cjfv openssl.tar.bz2 fakeroot |
| cp openssl.tar.bz2 ../../a5s_linux_sdk/ambarella/boards/dropcam/rootfs/ |
| |