Taken from:
http://www.droboports.com/app-repository/minidlna-1-1-0
Requires installation of arm-linux-gnueabiarmhf and g++-arm-linux-gnueabiarmhf
!/bin/bash
set -e
export DEST=/home/pv/dev/out
export CFLAGS="$CFLAGS -Os -fPIC -ffunction-sections -fdata-sections"
export LDFLAGS="$LDFLAGS -Wl,--gc-sections"
wget -O zlib-1.2.8.tar.gz http://zlib.net/zlib-1.2.8.tar.gz
tar zxf zlib-1.2.8.tar.gz
cd zlib-1.2.8/
export CC=arm-linux-gnueabihf-gcc
./configure --prefix=$DEPS --static
make clean && make
ZLIB=`pwd`
cd ..
wget -O e2fsprogs-libs-1.42.8.tar.gz http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/v1.42.8/e2fsprogs-libs-1.42.8.tar.gz
tar zxf e2fsprogs-libs-1.42.8.tar.gz
cd e2fsprogs-libs-1.42.8/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-elf-shlibs --disable-quota
cd lib/uuid/
make clean && make -j1
LIBUUID=`pwd`
cd ../../..
wget -O sqlite-autoconf-3080000.tar.gz http://sqlite.org/2013/sqlite-autoconf-3080000.tar.gz
tar zxf sqlite-autoconf-3080000.tar.gz
cd sqlite-autoconf-3080000/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
SQLITE=`pwd`
cd ..
wget -O libexif-0.6.21.tar.gz http://sourceforge.net/projects/libexif/files/libexif/0.6.21/libexif-0.6.21.tar.gz
tar zxf libexif-0.6.21.tar.gz
cd libexif-0.6.21/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
LIBEXIF=`pwd`
cd ..
wget -O jpegsrc.v9.tar.gz http://www.ijg.org/files/jpegsrc.v9.tar.gz
tar zxf jpegsrc.v9.tar.gz
cd jpeg-9/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --enable-maxmem=8 --disable-shared
make clean && make
LIBJPEG=`pwd`
cd ..
wget -O libid3tag-0.15.1b.tar.gz http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
tar zxf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b/
echo ZLIB dir is: $ZLIB
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared CPPFLAGS="-I$ZLIB" LDFLAGS="$LDFLAGS -L$ZLIB"
make clean && make
LIBID3TAG=`pwd`
cd ..
wget -O libogg-1.3.1.tar.gz http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
tar zxf libogg-1.3.1.tar.gz
cd libogg-1.3.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
LIBOGG=`pwd`
cd ..
wget -O libvorbis-1.3.3.tar.gz http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
tar zxf libvorbis-1.3.3.tar.gz
cd libvorbis-1.3.3/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --with-ogg=$LIBOGG --disable-shared LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs"
make clean && make
LIBVORBIS=`pwd`
cd ..
wget -O flac-1.2.1.tar.gz http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz
tar zxf flac-1.2.1.tar.gz
cd flac-1.2.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --with-ogg=$LIBOGG --disable-shared LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs"
Add include <string.h> to flac-1.2.1/examples/cpp/encode/file/main.cpp
make clean && make
LIBFLAC=`pwd`
cd ..
wget -O ffmpeg-2.0.tar.gz http://www.ffmpeg.org/releases/ffmpeg-2.0.tar.gz
tar zxf ffmpeg-2.0.tar.gz
cd ffmpeg-2.0/
make distclean
./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabihf- --arch=vfp --cpu=armv7 --enable-vfp --target-os=linux --prefix=$DEST --extra-cflags="-I$ZLIB" --extra-cxxflags="$CFLAGS -I$ZLIB" --extra-ldflags="-L$ZLIB" --enable-small --enable-zlib --disable-shared --disable-debug --disable-programs
make clean && make
FFMPEG=`pwd`
cd ..
wget -O minidlna-1.1.1.tar.gz http://sourceforge.net/projects/minidlna/files/minidlna/1.1.1/minidlna-1.1.1.tar.gz
tar zxf minidlna-1.1.1.tar.gz
cd minidlna-1.1.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST CPPFLAGS="-I$TOOLCHAIN/arm-linux-gnueabihf/libc/usr/include -I$ZLIB -I$SQLITE -I$LIBUUID -I$LIBEXIF -I$LIBJPEG -I$LIBID3TAG -I$LIBOGG/include -I$LIBFLAC/include -I$LIBVORBIS/include -I$FFMPEG" LDFLAGS="$LDFLAGS -L$ZLIB -L$SQLITE/.libs -L$LIBUUID -L$LIBEXIF/libexif/.libs -L$LIBJPEG/.libs -L$LIBID3TAG/.libs -L$LIBOGG/src/.libs -L$LIBFLAC/src/libFLAC/.libs -L$LIBVORBIS/lib/.libs -L$FFMPEG/libavutil -L$FFMPEG/libavcodec -L$FFMPEG/libavformat" LIBS="-lsqlite3 -luuid -lexif -ljpeg -lavformat -lavcodec -lavutil -lid3tag -lFLAC -lvorbis -logg -lz -lpthread -ldl -lm"
make clean && make && make install
arm-linux-gnueabi-strip -s -R .comment -R .note -R .note.ABI-tag $DEST/sbin/minidlnad
http://www.droboports.com/app-repository/minidlna-1-1-0
Requires installation of arm-linux-gnueabiarmhf and g++-arm-linux-gnueabiarmhf
!/bin/bash
set -e
export DEST=/home/pv/dev/out
export CFLAGS="$CFLAGS -Os -fPIC -ffunction-sections -fdata-sections"
export LDFLAGS="$LDFLAGS -Wl,--gc-sections"
wget -O zlib-1.2.8.tar.gz http://zlib.net/zlib-1.2.8.tar.gz
tar zxf zlib-1.2.8.tar.gz
cd zlib-1.2.8/
export CC=arm-linux-gnueabihf-gcc
./configure --prefix=$DEPS --static
make clean && make
ZLIB=`pwd`
cd ..
wget -O e2fsprogs-libs-1.42.8.tar.gz http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/v1.42.8/e2fsprogs-libs-1.42.8.tar.gz
tar zxf e2fsprogs-libs-1.42.8.tar.gz
cd e2fsprogs-libs-1.42.8/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-elf-shlibs --disable-quota
cd lib/uuid/
make clean && make -j1
LIBUUID=`pwd`
cd ../../..
wget -O sqlite-autoconf-3080000.tar.gz http://sqlite.org/2013/sqlite-autoconf-3080000.tar.gz
tar zxf sqlite-autoconf-3080000.tar.gz
cd sqlite-autoconf-3080000/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
SQLITE=`pwd`
cd ..
wget -O libexif-0.6.21.tar.gz http://sourceforge.net/projects/libexif/files/libexif/0.6.21/libexif-0.6.21.tar.gz
tar zxf libexif-0.6.21.tar.gz
cd libexif-0.6.21/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
LIBEXIF=`pwd`
cd ..
wget -O jpegsrc.v9.tar.gz http://www.ijg.org/files/jpegsrc.v9.tar.gz
tar zxf jpegsrc.v9.tar.gz
cd jpeg-9/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --enable-maxmem=8 --disable-shared
make clean && make
LIBJPEG=`pwd`
cd ..
wget -O libid3tag-0.15.1b.tar.gz http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
tar zxf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b/
echo ZLIB dir is: $ZLIB
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared CPPFLAGS="-I$ZLIB" LDFLAGS="$LDFLAGS -L$ZLIB"
make clean && make
LIBID3TAG=`pwd`
cd ..
wget -O libogg-1.3.1.tar.gz http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
tar zxf libogg-1.3.1.tar.gz
cd libogg-1.3.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --disable-shared
make clean && make
LIBOGG=`pwd`
cd ..
wget -O libvorbis-1.3.3.tar.gz http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
tar zxf libvorbis-1.3.3.tar.gz
cd libvorbis-1.3.3/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --with-ogg=$LIBOGG --disable-shared LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs"
make clean && make
LIBVORBIS=`pwd`
cd ..
wget -O flac-1.2.1.tar.gz http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz
tar zxf flac-1.2.1.tar.gz
cd flac-1.2.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST --with-ogg=$LIBOGG --disable-shared LDFLAGS="$LDFLAGS -L$LIBOGG/src/.libs"
Add include <string.h> to flac-1.2.1/examples/cpp/encode/file/main.cpp
make clean && make
LIBFLAC=`pwd`
cd ..
wget -O ffmpeg-2.0.tar.gz http://www.ffmpeg.org/releases/ffmpeg-2.0.tar.gz
tar zxf ffmpeg-2.0.tar.gz
cd ffmpeg-2.0/
make distclean
./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabihf- --arch=vfp --cpu=armv7 --enable-vfp --target-os=linux --prefix=$DEST --extra-cflags="-I$ZLIB" --extra-cxxflags="$CFLAGS -I$ZLIB" --extra-ldflags="-L$ZLIB" --enable-small --enable-zlib --disable-shared --disable-debug --disable-programs
make clean && make
FFMPEG=`pwd`
cd ..
wget -O minidlna-1.1.1.tar.gz http://sourceforge.net/projects/minidlna/files/minidlna/1.1.1/minidlna-1.1.1.tar.gz
tar zxf minidlna-1.1.1.tar.gz
cd minidlna-1.1.1/
./configure --host=arm-linux-gnueabihf --prefix=$DEST CPPFLAGS="-I$TOOLCHAIN/arm-linux-gnueabihf/libc/usr/include -I$ZLIB -I$SQLITE -I$LIBUUID -I$LIBEXIF -I$LIBJPEG -I$LIBID3TAG -I$LIBOGG/include -I$LIBFLAC/include -I$LIBVORBIS/include -I$FFMPEG" LDFLAGS="$LDFLAGS -L$ZLIB -L$SQLITE/.libs -L$LIBUUID -L$LIBEXIF/libexif/.libs -L$LIBJPEG/.libs -L$LIBID3TAG/.libs -L$LIBOGG/src/.libs -L$LIBFLAC/src/libFLAC/.libs -L$LIBVORBIS/lib/.libs -L$FFMPEG/libavutil -L$FFMPEG/libavcodec -L$FFMPEG/libavformat" LIBS="-lsqlite3 -luuid -lexif -ljpeg -lavformat -lavcodec -lavutil -lid3tag -lFLAC -lvorbis -logg -lz -lpthread -ldl -lm"
make clean && make && make install
arm-linux-gnueabi-strip -s -R .comment -R .note -R .note.ABI-tag $DEST/sbin/minidlnad
No comments:
Post a Comment