Skip to content

Instantly share code, notes, and snippets.

@xerpi
Last active February 19, 2017 22:59
Show Gist options
  • Save xerpi/d7814cf2677287f1e51470fdee2f34ac to your computer and use it in GitHub Desktop.
Save xerpi/d7814cf2677287f1e51470fdee2f34ac to your computer and use it in GitHub Desktop.
#!/bin/bash
CROSS_COMPILE=arm-linux-gnueabihf
PREFIX=$PWD/build
export CPATH=$PREFIX/include
export LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export PKG_CONFIG_DIR=
export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=$PREFIX
export PKG_CONFIG_ALLOW_CROSS=1
git clone https://github.com/libexpat/libexpat.git
pushd libexpat/expat
./buildconf.sh
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone http://git.tukaani.org/xz.git
pushd xz
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://github.com/madler/zlib.git
pushd zlib
CHOST=$CROSS_COMPILE ./configure --prefix=$PREFIX
make -j3
make install
popd
git clone https://github.com/glennrp/libpng.git
pushd libpng
./autogen.sh
./configure --host=$CROSS_COMPILE --prefix=$PREFIX CPPFLAGS="-I$PREFIX/zlib" LDFLAGS="-L$PREFIX/lib" --disable-documentation
make -j3
make install
popd
git clone git://git.gnome.org/libxml2
pushd libxml2
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://github.com/libffi/libffi.git
pushd libffi
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone git://anongit.freedesktop.org/wayland/wayland
pushd wayland
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --with-host-scanner --disable-documentation
make -j3
make install
popd
git clone git://anongit.freedesktop.org/wayland/wayland-protocols
pushd wayland-protocols
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone git://git.sv.gnu.org/libunwind
pushd libunwind
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://github.com/linux-pam/linux-pam.git
pushd linux-pam
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git
pushd libcap
make BUILD_GPERF=no prefix="$PREFIX" lib="lib" CC=arm-linux-gnueabihf-gcc BUILD_CC=gcc CFLAGS+="-I$PREFIX/../linux-pam/libpam/include" LDFLAGS="-L$PREFIX/lib" install
popd
git clone http://bitmath.org/git/mtdev.git
pushd mtdev
./autogen.sh
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://github.com/mirror/ncurses.git
pushd ncurses
./autogen.sh
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
pushd util-linux
./autogen.sh
./configure --host=$CROSS_COMPILE --prefix=$PREFIX CPPFLAGS="-I$PREFIX/include/ncurses" --disable-documentation
make -j3
make install-nodist_mountincHEADERS
make install-usrlib_execLTLIBRARIES
make install-pkgconfigDATA
popd
git clone git://git.gnupg.org/libgpg-error.git
pushd libgpg-error
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone git://git.gnupg.org/libgcrypt.git
pushd libgcrypt
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation --disable-arm-crypto-support --disable-asm --disable-neon-support
./configure --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation --disable-arm-crypto-support --disable-asm --disable-neon-support
make -j3
make install
popd
git clone https://github.com/systemd/systemd.git
pushd systemd
make -j3 libudev.la
make install-binPROGRAMS
make install-udevlibexecPROGRAMS
make install-dist_udevconfDATA
make install-pkgconfigdataDATA
make install-pkgconfiglibDATA
make install-pkgincludeHEADERS
make install-libLTLIBRARIES
make install-make install-rootlibLTLIBRARIES
make install-rootlibLTLIBRARIES
make install-udevlibexecPROGRAMS
make install-includeHEADERS
popd
git clone git://anongit.freedesktop.org/libevdev
pushd libevdev
./autogen.sh CPPFLAGS="-I$PREFIX/include/libevdev-1.0" --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
git clone git://anongit.freedesktop.org/wayland/libinput
pushd libinput
./autogen.sh --host=$CROSS_COMPILE --prefix=$PREFIX --disable-documentation
make -j3
make install
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment