blob: bb9d1425ce7888b3f793c132e63c6b5847a4ae2e [file] [log] [blame] [edit]
#!/bin/bash
set -e
source ../../a5s_linux_sdk/ambarella/build/env/CodeSourcery.env
PATH=$PATH:$ARM_LINUX_TOOLCHAIN_DIR/bin
TOP=`pwd`
rm -rf dist
mkdir dist
pushd build
pushd mtd-utils
make clean
make CFLAGS="-mtune=arm1136j-s -march=armv6 -Os" \
LDFLAGS="-s -Wl,-rpath,$TOP/dist/usr/lib -Wl" VERSION=1.5.1-dropcam
make install DESTDIR=$TOP/dist
cd $TOP
rm -rf fakeroot
mkdir fakeroot
cp -R dist/* fakeroot/
arm-none-linux-gnueabi-strip fakeroot/usr/sbin/ubi*
rm -rf fakeroot/usr/share/
rm -rf fakeroot/usr/sbin/flash*
tar cjfv mtd-utils.tar.bz2 fakeroot
cp mtd-utils.tar.bz2 ../../a5s_linux_sdk/ambarella/boards/dropcam/rootfs/