VoCore2: Compile OpenWrt 21.02 in MacOS

Finally OpenWrt new version comes to stable. There are many great new feature for new Linux kernel and also improve stable for OpenWrt, why not have a try?

First, everything is same as usual, make an image by Disk Utility, 10GB is enough.

Clone from OpenWrt, I use github version, it is faster than openwrt server: git clone https://github.com/openwrt/openwrt.git -b openwrt-21.02

We can not use make, because it will throw error: /Volumns/OpenWrt21/include/toplevel.mk:29: *** Please use a newer version of GNU make. The version shipped by Apple is not supported.  Stop.

Use brew install make, then call gmake menuconfig will fix such problem.

After menuconfig select correct settings, we can directly call gmake V=s to start the make process.

After a while, it will stop at “Checking for c++filt…“, it is for libstdc++-v3, we need to go to build_dir libstdc++-v3 folder, modify configure file, delete from line 79170 to 79296 to avoid checking such command. No idea why it stuck there…and c++filt seems not critical if not exists.

Then just keep building, rest seems smoothly.

Next blog I will check if there is any bug need to patch for this new version.