Pre-compile Configuration

The topic describes the configuration tasks required before compiling OpenWrt.
Note: This section can be skipped if you download OpenWrt using the Download OpenWrt Image method.

Target System/Profile/Image Configuration

Enter the OpenWrt menu configuration GUI to select the target system, target profile, and target image.
  1. Run the following command to enter the menu configuration GUI.
    make menuconfig
  2. In the OpenWrt Configuration window, select the following:
    • Target System (StarFive JH71x0 (7100/7110)
    • Target Profile (StarFive VisionFive 2 v1.2a) or Target Profile (StarFive VisionFive 2 v1.3b), depending on your VisionFive 2 version.
    • Under Target Image, select ramdisk.

LuCI Web UI Configuration

LuCI is the OpenWrt web management interface. It must be explicitly enabled.

  1. Install LuCI feeds.
    ./scripts/feeds update packages luci
    ./scripts/feeds install -a -p luci
  2. Enter the menu configuration GUI.
    make menuconfig
  3. Enable the web server: Network > Web Servers/Proxies > uhttpd

  4. Select core LuCI components: LuCI → 1. Collections → luci.

  5. (Optional) Select the interface language, for example, to select Chinese Simplified, LuCI > 2. Modules > Translations > Chinese Simplified (zh_Hans)

  6. Select commonly used LuCI applications:
    • LuCI > 3. Applications > luci-app-ddns
    • LuCI > 3. Applications > luci-app-firewall
    • LuCI > 3. Applications > luci-app-samba4
    • LuCI > 3. Applications > luci-app-uhttpd
  7. Select all themes: LuCI > 4. Themes > Select all.

  8. Select the LuCI package manager library: LuCI > 6. Libraries > luci-lib-ipkg.

Wireless Configuration

VisionFive 2 and VisionFive 2 Lite do not include an onboard WiFi module. A separate WiFi dongle is required for wireless operation. This document uses the DR7915 (MT7915 + MT7975) as the reference. Connection requires an M.2 M-Key to A/E-Key adapter board inserted into the onboard M.2 M-Key connector, with the DR7915 module mounted on the adapter.

  1. In the menu configuration GUI, select wireless kernel modules kmod-cfg80211, kmod-mac80211, kmod-mt7915-firmware, and kmod-mt7915e in the following order:
    • Kernel modules > Wireless Driver > kmod-cfg80211
    • Kernel modules > Wireless Driver > kmod-mac80211
    • Kernel modules > Wireless Driver > kmod-mt7915-firmware
    • Kernel modules > Wireless Driver > kmod-mt7915e
  2. Select wireless authentication packages in the following order:
    • Network > WirelessAPD > wpad-basic-mbedtls
    • Network > WirelessAPD > hostapd-common
    • Network > WirelessAPD > wpa-cli
    • Network > WirelessAPD > hostapd-utils

(Optional) Add Passwall Function

The Passwall function is not included in the default function and requires source code modification. If you want to add this function, perform the following steps.
  1. Under the wigori directory, run the following commands to add Passwall feeds.
    echo "src-git passwall_packages https://github.com/xiaorouji/openwrt-passwall-packages.git;main"
    >> "feeds.conf.default"
    echo "src-git passwall https://github.com/xiaorouji/openwrt-passwall.git;main" >> "feeds.conf.default"
    echo "src-git passwall2 https://github.com/xiaorouji/openwrt-passwall2.git;main" >> "feeds.conf.default
  2. Modify include/target.mk–replace dnsmasq with dnsmasq-full.
    DEFAULT_PACKAGES.router:=\
    -       dnsmasq \
    +       dnsmasq-full \
  3. Download and install Passwall packages.
    ./scripts/feeds update -a
    ./scripts/feeds install -a
    ./scripts/feeds install -a -f -p PWpackages
    ./scripts/feeds install luci-app-passwall
  4. Configure Passwall via menuconfig.
    1. Enter the menu configuration GUI:
      make menuconfig
    2. Enable Passwall: OpenWrt Configuration > LuCI > 3. Application > luci-app-passwall
      Note: uci-app-passwall and luci-app-passwall2 are two independent plugins. They can be configured simultaneously or selected as needed.
    3. Disable dnsmasq: OpenWrt Configuration > Base system > dnsmasq, dnsmasq-full
  5. Download the updated packages.
    make download V=s

Install Dependency Packages

Run the following commands to fetch all feed packages and source tarballs needed for compilation.
./scripts/feeds update -a
./scripts/feeds install -a
make download V=s

The download may take a considerable amount of time. If a download failed error appears, the packages are incomplete. Re-run the commands above until no download failed errors occur.