Tested in Macbook Pro M3 Pro with macOS Sonoma(14.4.1)
hdiutil create -size 30g -fs 'Case-sensitive HFS+' -type SPARSEBUNDLE -nospotlight -volname OpenWRTBuilder ~/OpenWRTBuilder
hdiutil attach -notremovable -nobrowse -mountpoint ~/OpenWRTBuilder ~/OpenWRTBuilder.sparsebundle
brew install coreutils findutils gettext gnu-tar gnu-sed gawk gnu-getopt grep libtool [email protected] diffutils wget xz openssl mercurial pkg-config ncurses swig
add these configs to your shell profile, such as ~/.zshrc
or ~/.profile
PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/gawk/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/[email protected]/libexec/bin:$PATH"
PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"
PATH="/opt/homebrew/opt/diffutils/bin:$PATH"
PATH="/opt/homebrew/opt/ncurses/bin:$PATH"
git clone -b master --single-branch --filter=blob:none https://github.com/openwrt/openwrt
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make