Latest Hostapd

How would one build an openwrt image with the latest version of HostADP? It looks like the last released hostadp was 2019-08-07 - v2.9

I would like to build a new images with the latest code in Hostapd as there have been many patches since then.

I see https://github.com/openwrt/openwrt/blob/master/package/network/services/hostapd/Makefile shows

PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-05-22
PKG_SOURCE_VERSION:=b102f19bcc53c7f7db3951424d4d46709b4f1986
PKG_MIRROR_HASH:=cb3cb968883042fc582752be1607586696c18e6ecf9808c9a8ac50e204584367

Do I just change these values to the latest? Where do I find the latest? If anyone could give an example that would be great. I am new to git and doing all of this.

Openwrt (in master snapshot) is already pulling newer source than the last release, last update to the "source link" was in 2021/05/22 as seen in PKG_SOURCE_DATE and in the commit that mostly updated the package to its current state https://github.com/openwrt/openwrt/commit/eefed841b05c3cd4c65a78b50ce0934d879e6acf
and this that just bumped the release after that
https://github.com/openwrt/openwrt/commit/54cc1756e2b4d6712a4418c7b97825f79d04433c

the PKG_SOURCE_VERSION is the ID of this commit in hostapd https://w1.fi/cgit/hostap/commit/?id=b102f19bcc53c7f7db3951424d4d46709b4f1986

This is the list of all commits in hostapd where you see it, on their git web interface https://w1.fi/cgit/hostap/log/?ofs=50

So OpenWrt is building Hostapd taking the source code at that point in time, and then applying custom patches from the patches folder to enable some features they need.
If you change this to point to a newer hostapd commit you need to check and update the custom patches too.

in next release, the 21.02, OpenWrt is using Hostapd sources from 2020/06/08, see that release branch on github https://github.com/openwrt/openwrt/blob/openwrt-21.02/package/network/services/hostapd/Makefile#L14

As long as you are using a supported OpenWrt release you should be already using a secure Hostapd, while the more or less latest hostapd is in master branch.

So if for some reason you need to build latest hostapd in an older release you can probably just copy the whole folder of this package from master branch to its folder in the build system of release 19.07 or 21.02.

2 Likes