Using the official configuration to build a stable OpenWrt 23.05.2 image for Raspberry Pi 4B.
Obtaining the Source Code
Clone the OpenWrt Git repository with the command below.
git clone https://git.openwrt.org/openwrt/openwrt.git [destination_path]
# Omit [destination_path] to clone into the current directory.
# Otherwise, specify a path like ~/development/openwrt-build/
Selecting the Stable Release v23.05.2
Switch the Git working tree to the specific stable release tag.
git tag -l | grep 23.05.2 # List available tags for 23.05.2
git checkout v23.05.2 # Check out the specific version
Updating and Installing Package Feeds
Update the list of available packages and install them into the build system.
./scripts/feeds update -a
./scripts/feeds install -a
If the ./scripts/feeds commands are not found, ensure necessary build tools are installed. For example, on Debian-based systems:
apt search qemu-utils # Search for required package
apt install qemu-utils # Install the package
Due to potential network issues, its advisable to run the feed commands repeatedly until they complete successfully without errors. A successful update output resembles:
$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git^8e3a1824645f5e73ec44c897ac0755c53fb4a1f8' ...
Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git^7739e9f5b03b830f51d53c384be4baef95054cb3' ...
Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git^83ef3784a9092cfd0a900cc28e2ed4e13671d667' ...
Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git^9746ae8f964e18f04b64fbe1956366954ff223f8' ...
Create index file './feeds/packages.index'
Create index file './feeds/luci.index'
Create index file './feeds/routing.index'
Create index file './feeds/telephony.index'
A successful installation output looks like:
$ ./scripts/feeds install -a
Collecting package info: package/feeds/packages/udp-broadcast-relay-redux-openwr
Collecting package info: done
Installing all packages from feed packages.
Installing all packages from feed luci.
Installing all packages from feed routing.
Installing all packages from feed telephony.