User Tools

Site Tools


docs:guide-developer:buildroot.exigence.macosx

OpenWrt Buildroot – Installation on macOS

If you test on other version of macOS / OS X or different release, add/edit below please!


These instructions worked on OS X 10.13.1 on 6 Nov 2017, and on OS X 10.12.3 on 15 Feb 2017, and on OS X 10.11.5 on 7 May 2016.

  1. Install Xcode or at least Xcode command line tools from the MacOSX App Store
  2. Install additional formulae:
    brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep wget quilt xz

    diffutils is required to ensure quilt refreshes patches correctly.

  3. gnu-getopt is keg-only, so force linking it:
    brew ln gnu-getopt --force
  4. To get rid of “date illegal option” you can add to your .bash_profile:
    PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  5. OS X by default comes with a case-insensitive filesystem. OpenWrt won't build on that. As a workaround, create a (Sparse) case-sensitive disk-image that you then mount in the finder and use as build directory:
    hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
    hdiutil attach OpenWrt.sparseimage

    Another option if using an APFS formatted disc is to create a case-sensitive APFS volume.

  6. Change to /Volumes/OpenWrt
    cd /Volumes/OpenWrt

    (Your newly created and mounted disk image)

  7. Now proceed normally (git clone…)

Useful things to put in .bash_profile:

. /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
. /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWCOLORHINTS=1
#export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto"

# Watch the escapes for " in the following
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND;} __git_ps1 \"\[\033[0;33m\]\u@\h \[\033[1;34m\]\w\[\033[0m\]\" \"\[\033[1;34m\] \$\[\033[0m\] \""

These instructions worked on OS X 10.10.3, building trunk Rev. 45337 on 9.April.2015.

  1. Install Xcode or at least Xcode command line tools from the MacOSX App Store
  2. Add duplicates repository to homebrew for grep formulae:
    brew tap homebrew/dupes
  3. Install additional formulae:
    brew install coreutils findutils gawk gnu-getopt gnu-tar grep wget quilt xz
  4. gnu-getopt is keg-only, so force linking it:
    brew ln gnu-getopt --force
  5. To get rid of “date illegal option” you can add to your .bash_profile:
    PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  6. Now proceed normally (git clone…)

These instructions worked for me on OS X 10.10, building 14.07

  1. Install prerequisites:
    pkgin install getopt coreutils gawk gtar findutils
  2. Now proceed normally (git clone…)

These instructions worked for me on OS X 10.9.5, building 14.07 branch “Barrier Breaker”.

  1. Install prerequisites:
    brew install asciidoc binutils coreutils findutils gawk gettext gnu-getopt gnu-tar openssl xz
  2. BuildRoot expects 'getopt' to be GNU getopt, so symlink it into place:
    ln -s `brew --prefix gnu-getopt`/bin/getopt `brew --prefix`/bin/gnugetopt
  3. If you run into any additional steps required, please add them to this page!

These instructions worked for me on OS X 10.13.6, High Sierra, openwrt 18.06.0

  1. Makefile will bomb unless you rename gxargs to xargs.
    ln -s /usr/local/bin/gxargs /usr/local/bin/xargs
  2. Create an APFS volume with case-sensitivity enabled
  3. Add “brew install gnutime”
  4. 18.06.0 Use non-dev build. Dev build seems to be broken at this time. Use 18.06.0 branch in git

—-

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-developer/buildroot.exigence.macosx.txt · Last modified: 2019/09/02 17:23 by tmomas