Compiling a dedicated OpenWRT image
OpenWRT is almost essential for enthusiasts, but due to the need for additional environment configuration and the high failure rate of compilations, most people choose to download the generic images provided by the official sources.
However, as a technology enthusiast, there is always a demand for customized images, especially for applications like Passwall that have a high update frequency. The varying kernel versions in the downloaded images lead to lower success rates for these applications.
Compiling your own OpenWRT image has become a great option.

As mentioned above, the probability of compilation failure always exists. Without the experience of multiple failed compilations, it is impossible to obtain a usable image; experience is gained through failure.
The main purpose of this video is to guide everyone in compiling an OpenWRT image that includes Passwall and to point out some key points during the process, enabling everyone to successfully compile their own image.
Please listen carefully.
Note that before you can successfully compile, please try to follow my settings as closely as possible, including the selection of LuCI application packages.
In this video, we will compile an x86 image, suitable for those with x86 NAS devices. If you do not have such a device, you can install OpenWRT in a VMware virtual machine, which can also be used as a bypass router. Thus, the x86 image is suitable for anyone. Once you are familiar with the compilation process, you can compile the corresponding image for your ARM device, which will greatly enhance your confidence in operations.
The operating system used is Ubuntu 20.04; the installation process will not be demonstrated.
Environment requirements: Proxy
export http_proxy="http://192.168.188.233:10809" export https_proxy="http://192.168.188.233:10809"
sudo apt update sudo apt-get install subversion g++ zlib1g-dev build-essential git \ python python3 python3-distutils libncurses5-dev gawk gettext unzip \ file libssl-dev wget libelf-dev ecj fastjar java-propose-classpath sudo apt install vim net-tools screen
Download the code
git clone https://github.com/openwrt/openwrt
Update the source
# If SSL errors occur, set this export GIT_SSL_NO_VERIFY=1 # or git config --global http.sslverify false
Add the following code to the <span>feeds.conf.default</span>
file in the root directory of the OpenWRT or LEDE source code:
src-git kenzo https://github.com/kenzok8/openwrt-packages src-git small https://github.com/kenzok8/small src-git nas https://github.com/linkease/nas-packages.git src-git passwall https://github.com/xiaorouji/openwrt-passwall.git; main src-git passwall_packages https://github.com/xiaorouji/openwrt-passwall-packages.git; main src-git helloworld https://github.com/fw876/helloworld.git
Install the downloaded packages
./scripts/feeds update -a ./scripts/feeds install -a
Enter the editing interface
make menuconfig # fix BIOS boot partition is under 1 MiB # sed -i 's/256/1024/g' target/linux/x86/image/Makefile 必选,uhttp,这是界面,openwrt原版是没有界面组件的。两个地方要打开,collection-luca菜单项”Target Images”,”Root filesystem partition size(in MB)”改成其它的大值,默认是160,改成1024,否则的话因为选择安装app占用空间太大必然会导致编译失败。base中关闭 dsnmasq,因为启用了 full,冲突第一次编译可以不选其他的,也可以选了,报错再说。推荐 passwall
Change the template
Note: Please perform this operation before compilation, set argon as the default theme, using this as an example to extrapolate.
cd package git clone https://github.com/jerrykuku/luci-theme-argon.git cd .. make menuconfig # choose LUCI -> Theme -> Luci-theme-argon # also select luci-app-argon-config *.ipk make download -j4 make V=s -j$(nproc) # If compilation fails, try single-threaded compilation make V=s -j1 # Use screen to operate # Exit screen method Ctrl + a + d
Output path after compilation: bin/targets