- 默認的文件系統hfs大小寫不敏感。新建一個磁盤鏡像文件並合式化為hfs+, 然后掛載到系統中。
hdiutil create -size 20g -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.dmg
hdiutil attach OpenWrt.dmg
cd /Volumes/OpenWrt
- 安裝好 xcode, 並執行
xcode-select —install
- 使用 brew 安裝其他的軟件包
brew install asciidoc docbook gdbm libxml2 pbzip2 autoconf e2fsprogs gettext libxslt pkg-config bash-completion fastjar gnu-getopt libyaml readline binutils findutils gnu-tar lzlib sqlite bison flex gputils openssl wget coreutils gawk intltool ossp-uuid xz
安裝后的文件都會鏈接到 /usr/loca/bin/ 目錄下。查看PATH變量,其中 /usr/local/bin 排在首位,所以如果有重復的話,這個目錄下的可執行文件優先級最高。
上面這些軟件包安裝完成之后,手動為 getopt 建立一個鏈接:
cd /usr/local/bin
ln -s ../Cellar/gnu-getopt/1.1.5/bin/getopt .
- checkout OpenWrt 源代碼。並開始編譯:
make qd_defconfig
make -j5
這里只是記錄一下。后來我還是把系統重裝,文件系統默認選擇大小寫敏感,這樣就不用建一個磁盤鏡像。