Skip to content

Instantly share code, notes, and snippets.

@comerford
Last active March 19, 2024 14:37
Show Gist options
  • Save comerford/a225d036bb3f7cc586484a175cc687ab to your computer and use it in GitHub Desktop.
Save comerford/a225d036bb3f7cc586484a175cc687ab to your computer and use it in GitHub Desktop.
Building OpenWRT for the WHW03 V1

making a recent build by cherry-picking from @protectivedad repo

This is a verbose, step-by-step-from-scratch account of how I built a version of OpenWRT for my Linksys Velop WHW03 V1 based off the 23.05.2 release and cherry picking in the changes from a reported working repo for the WHW03 V1

Build Environment Notes

For the build step I use a docker container, that is from here:

https://github.com/mwarning/docker-openwrt-build-env

Basically though, assuming you have docker working already it is:

git clone https://github.com/mwarning/docker-openwrt-builder.git
cd docker-openwrt-builder
docker build -t openwrt_builder .

Note: I couldn't get volume mounts to work in WSL previously, so this is all being run on a "real" Linux system. You probably can make this work in WSL, but that is beyond the scope of this write up.

Note2: Everything is in a "velop" folder in my home directory and that gets mounted as a volume in the container. There is nothing special about this folder, but adjust paths if you use something else.

Now onto the actual build

# created my own fork of openwrt on Github, then cloned it
git clone [email protected]:comerford/openwrt.git
# now we need to add the original as a remote, calling it "upstream" which is pretty standard
cd openwrt
git remote add upstream https://github.com/openwrt/openwrt
# grab the tags from upstream and push to our own fork so we can get onto the release commits
git fetch --tags upstream
git push --tags
# Checkout the most recent release
git checkout v23.05.2
# add protectivedad's repo as a remote, so we can cherry-pick commits
git remote add protectivedad https://github.com/protectivedad/openwrt
git fetch protectivedad
# create a new branch to store our changes
git checkout -b 23.05.2-whw03
# Cherry pick the commits from protectivedad
git cherry-pick 7af69a7c730dcaf798facb2a2ab00a32abea7961
# assuming it merges clean (it did for me), push
git push --set-upstream origin 23.05.2-whw03
# run docker container for build, my native Linux environment is "too new" to work
docker run -v ~/velop:/home/user -it openwrt_builder /bin/bash
# run the pre-reqs
./scripts/feeds update -a
./scripts/feeds install -a
# make the config
make menuconfig
# select the following (and anything else you would like, of course)
# Target System = Qualcomm Atheros IPQ40XX
# Target Profile = Linksys WHW03
# I personally also build the entire hostapd (Network >> WirelessAPD)
# and luci-ssl (LuCI >> Collections >> luci-ssl)
make -j12
# the bin files will be in openwrt/bin/targets/ipq40xx/generic/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment