User Tools

Site Tools


doc:howto:buildroot.exigence.macosx
This wiki is read only and for archival purposes only. >>>>>>>>>> Please use the new OpenWrt wiki at https://openwrt.org/ <<<<<<<<<<

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:buildroot.exigence.macosx [2013/07/14 09:13]
lorema
doc:howto:buildroot.exigence.macosx [2018/01/24 19:51] (current)
Kevindb
Line 1: Line 1:
 +====== OpenWrt Buildroot – Installation on macOS ======
 +| ->​[[doc:​howto:​buildroot.exigence|Procedure on Linux]] |
 +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.
  
 +  - Install Xcode or at least Xcode command line tools from the [[https://​itunes.apple.com/​us/​app/​xcode/​id497799835?​mt=12|MacOSX App Store]]
 +  - [[http://​brew.sh/​|Install brew]].
 +  - Install additional formulae: <code bash>​brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep wget quilt xz</​code>​ diffutils is required to ensure quilt refreshes patches correctly.
 +  - gnu-getopt is keg-only, so force linking it: <code bash>​brew ln gnu-getopt --force</​code>​
 +  - To get rid of "date illegal option"​ you can add to your .bash_profile:​ <code bash>​PATH="/​usr/​local/​opt/​coreutils/​libexec/​gnubin:​$PATH"</​code>​
 +  - 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: <code bash>​hdiutil create -size 20g -type SPARSE -fs "​Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
 +hdiutil attach OpenWrt.sparseimage</​code>​ Another option if using an APFS formatted disc is to create a case-sensitive APFS volume.
 +  - Change to /​Volumes/​OpenWrt <​code>​cd /​Volumes/​OpenWrt</​code>​ (Your newly created and mounted disk image)
 +  - Now proceed normally (git clone...)
 +
 +Useful things to put in .bash_profile:​
 +<​code>​. /​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\] \""</​code>​
 +
 +----
 +These instructions worked on OS X 10.10.3, building trunk Rev. 45337 on 9.April.2015. ​
 +
 +  - Install Xcode or at least Xcode command line tools from the MacOSX App Store
 +  - [[http://​brew.sh/​|Install brew]].
 +  - Add duplicates repository to homebrew for grep formulae: <code bash>​brew tap homebrew/​dupes</​code>​
 +  - Install additional formulae: <code bash>​brew install coreutils findutils gawk gnu-getopt gnu-tar grep wget quilt xz</​code>​
 +  - gnu-getopt is keg-only, so force linking it: <code bash>​brew ln gnu-getopt --force</​code>​
 +  - To get rid of "date illegal option"​ you can add to your .bash_profile:​ <code bash>​PATH="/​usr/​local/​opt/​coreutils/​libexec/​gnubin:​$PATH"</​code>​
 +  - Now proceed normally (git clone...)
 +
 +----
 +These instructions worked for me on OS X 10.10, building 14.07
 +
 +  - [[http://​pkgsrc.org/​|Install pkgsrc]].
 +  - Install prerequisites:​ <code bash>​pkgin install getopt coreutils gawk gtar findutils</​code>​
 +  - Now proceed normally (git clone...)
 +
 +----
 +
 +These instructions worked for [[sethml@ofb.net|me]] on OS X 10.9.5, building 14.07 branch "​Barrier Breaker"​. ​
 +
 +  - [[http://​brew.sh/​|Install brew]].
 +  - Install prerequisites:​ <code bash>​brew install asciidoc binutils coreutils findutils gawk gettext gnu-getopt gnu-tar openssl xz</​code>​
 +  - BuildRoot expects '​getopt'​ to be GNU getopt, so symlink it into place: <code bash>ln -s `brew --prefix gnu-getopt`/​bin/​getopt `brew --prefix`/​bin/​gnugetopt</​code>​
 +  - Follow the [[doc:​howto:​buildroot.exigence#​downloading_sources|Linux instructions starting with Downloading Sources]]
 +  - If you run into any additional steps required, please add them to this page!
 +
 +----
 +===== Old Instructions =====
 +You can find old instructions on the [[doc:​howto:​buildroot.exigence.macosx.old|Old OSX Instructions page.]]