OpenWrt build system – Installation

官方指导文档:https://wiki.openwrt.org/doc/howto/buildroot.exigence
环境:OS X EI Captain,版本10.11.6

OpenWrt Buildroot – Installation on Mac OS X

https://wiki.openwrt.org/doc/howto/buildroot.exigence.macosx

If you test on other version of OS X or different release, add/edit below please!
These instructions worked 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 brew.
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install" 
终端执行这条命令,don't run this as root! 然后brew就安装好了。

3. Add duplicates repository to homebrew for grep formulae:
brew tap homebrew/dupes

4. Install additional formulae:
brew install coreutils findutils gawk gnu-getopt gnu-tar grep wget quilt xz

5. gnu-getopt is keg-only, so force linking it:
brew ln gnu-getopt --force

6. To get rid of "date illegal option" you can add to your .bash_profile:
PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
Mac OS X的.bash_profile文件在哪里?参见:http://www.v2ex.com/t/129563
touch .bash_profile

7. 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

8. Change to
/Volumes/OpenWrt
(Your newly created and mounted disk image)

9. Now proceed normally (git clone…)
Old Instructions

You can find old instructions on the Old OSX Instructions page.

第7点创建的分区在重启之后会消失,呃呃呃额额 (⊙_⊙)?
原因参见:
https://www.tekrevue.com/tip/how-to-create-a-4gbs-ram-disk-in-mac-os-x/


通过磁盘工具就划分出来了, ̄へ ̄

你可能感兴趣的:(OpenWrt build system – Installation)