Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdgraff/5929d9985247729f729f574615cb40ec to your computer and use it in GitHub Desktop.
Save cdgraff/5929d9985247729f729f574615cb40ec to your computer and use it in GitHub Desktop.
$ git clone -b 1.23 https://github.com/crosstool-ng/crosstool-ng.git
$ cd crosstool-ng
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..
$ mkdir ctng
$ ct-ng menuconfig
- Paths and misc options
- Check "Try features marked as EXPERIMENTAL"
- Set "Prefix directory" to "/opt/cross/x-tools/${CT_TARGET}"
- Target options
- Set "Target Architecture" to "arm"
- Set "Default instruction set mode" to "arm"
- Set "Endianness" to "Little endian"
- Set "Bitness" to "32-bit"
- Set "Architecture level" to "armv8"
- Set "Emit assembly for CPU" to "cortex-a53"
- Set "Use specific FPU" to "vfp"
- Set "Floating point" to "hardware (FPU)"
- Check "Use EABI"
- Toolchain options
- Set "Tuple's vendor string" to "rpi"
- Operating System
- Set "Target OS" to "linux"
- Binary utilities
- Set "Binary format" to "ELF"
- Set "binutils version" to "2.30"
- C-library
- Set "C library" to "glibc"
- Set "glibc version" to "2.27"
- C compiler
- Check "Show Linaro versions"
- Set "gcc version" to "linaro-7.2-2017.11"
- Set "gcc extra config" to "--with-float=hard"
- Check "Link libstdc++ statically into the gcc binary"
- Check "C++" under "Additional supported languages"
- Companion libraries
- Set "ISL version" to "0.19"
Save the configuration and build.
$ ct-ng build
$ export CCPREFIX="/usr/local/x-tools/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-"
@cdgraff
Copy link
Author

cdgraff commented Apr 18, 2018

ALSA:
./configure --host=arm-rpi-linux-gnueabihf --prefix=/opt/output/

LAME:
./configure --host=arm-rpi-linux-gnueabihf --prefix=/opt/output/ --enable-static

FDK-AAC
./configure --host=arm-rpi-linux-gnueabihf --prefix=/opt/output/ --enable-static --disable-shared

FFMPEG
pkg_config=$(which pkg-config) PKG_CONFIG_PATH=/opt/output/lib/pkgconfig ./configure --pkg-config-flags="--static" --enable-cross-compile --cross-prefix=${CCPREFIX} --arch=armel --target-os=linux --prefix=/opt/output/ --enable-version3 --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --extra-cflags="-I/opt/output/include -static" --extra-ldflags="-L/opt/output/lib -static" --libdir="/opt/output/lib" --extra-version=mi-20180419 --disable-shared --enable-static

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment