blob: b97c3b53b3751d3f686d45b0bfc463325d7cc746 [file] [log] [blame]
developer29c4d2d2022-12-26 19:41:22 +08001SUMMARY = "User space daemon for extended IEEE 802.11 management"
2HOMEPAGE = "http://w1.fi/hostapd/"
3SECTION = "kernel/userland"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://hostapd/README;md5=c905478466c90f1cefc0df987c40e172"
6
developer2a209692023-08-14 20:23:42 +08007DEPENDS = "libnl openssl ubus ucode"
developer29c4d2d2022-12-26 19:41:22 +08008DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', 'telemetry', '', d)}"
9LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', ' -ltelemetry_msgsender ', '', d)}"
developer2a209692023-08-14 20:23:42 +080010RDEPENDS_${PN} += "gawk ucode"
developer29c4d2d2022-12-26 19:41:22 +080011
12FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
13FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:"
14
developere35b8e42023-10-16 11:04:00 +080015SRCREV ?= "e5ccbfc69ecf297590341ae8b461edba9d8e964c"
developer29c4d2d2022-12-26 19:41:22 +080016SRC_URI = " \
17 git://w1.fi/hostap.git;protocol=https;branch=main \
18 file://hostapd-full.config \
developer65857c02023-02-13 20:07:19 +080019 file://hostapd-2G-EHT.conf \
20 file://hostapd-5G-EHT.conf \
21 file://hostapd-6G-EHT.conf \
developer29c4d2d2022-12-26 19:41:22 +080022 file://hostapd-5G-7915.conf \
23 file://hostapd-5G-7916.conf \
24 file://hostapd.service \
25 file://hostapd-init.sh \
developerca672072023-02-24 18:01:27 +080026 file://mac80211-EHT.sh \
developer29c4d2d2022-12-26 19:41:22 +080027 file://init-uci-config.service \
developer2a209692023-08-14 20:23:42 +080028 file://hostapd.uc \
29 file://common.uc \
30 file://wdev.uc \
31 file://src-${PV} \
32 file://002-rdkb-add-ucode-support.patch;apply=no \
developer29c4d2d2022-12-26 19:41:22 +080033"
34require files/patches-${PV}/patches.inc
35
36B = "${WORKDIR}/git/hostapd"
37S = "${WORKDIR}/git"
38
39inherit update-rc.d systemd pkgconfig features_check
40INITSCRIPT_NAME = "hostapd"
41
42SYSTEMD_AUTO_ENABLE_${PN} = "enable"
43SYSTEMD_SERVICE_${PN} = "hostapd.service"
44SYSTEMD_SERVICE_${PN} += " init-uci-config.service"
developer2a209692023-08-14 20:23:42 +080045INSANE_SKIP_${PN} += "file-rdeps"
developer29c4d2d2022-12-26 19:41:22 +080046do_unpack_append() {
47 bb.build.exec_func('do_copy_openwrt_src', d)
48}
49
50do_copy_openwrt_src() {
developer2a209692023-08-14 20:23:42 +080051 cp -Rfp ${WORKDIR}/src-${PV}/* ${S}/
developer29c4d2d2022-12-26 19:41:22 +080052}
53
54do_configure_append() {
55 install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config
56
57 echo "CONFIG_MBO=y" >> ${B}/.config
58 echo "CONFIG_WPS_UPNP=y" >> ${B}/.config
59 echo "CONFIG_DPP=y" >> ${B}/.config
60 echo "CONFIG_DPP2=y" >> ${B}/.config
61 echo "CONFIG_DPP3=y" >> ${B}/.config
62
63 echo "CONFIG_ACS=y" >> ${B}/.config
64 echo "CONFIG_IEEE80211AX=y" >> ${B}/.config
65 echo "CONFIG_TLS=openssl" >> ${B}/.config
66 echo "CONFIG_SAE=y" >> ${B}/.config
67 echo "CONFIG_OWE=y" >> ${B}/.config
68 echo "CONFIG_SUITEB192=y" >> ${B}/.config
69 echo "CONFIG_AP=y" >> ${B}/.config
70 echo "CONFIG_MESH=y" >> ${B}/.config
71 echo "CONFIG_WEP=y" >> ${B}/.config
72 echo "CONFIG_FILS=y" >> ${B}/.config
developer5eddc512023-02-13 16:01:56 +080073 echo "CONFIG_IEEE80211BE=y" >> ${B}/.config
developerff00d542023-06-08 11:36:33 +080074 echo "CONFIG_TESTING_OPTIONS=y" >> ${B}/.config
developer2a209692023-08-14 20:23:42 +080075 echo "CONFIG_UCODE=y" >> ${B}/.config
developer29c4d2d2022-12-26 19:41:22 +080076}
77
78do_filogic_patches() {
79 cd ${S}
80 if [ ! -e patch_applied ]; then
developer2a209692023-08-14 20:23:42 +080081 patch -p1 < ${WORKDIR}/002-rdkb-add-ucode-support.patch
developer29c4d2d2022-12-26 19:41:22 +080082 touch patch_applied
83 fi
84}
85
86addtask filogic_patches after do_patch before do_compile
87
88do_compile() {
89 export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3"
90 export EXTRA_CFLAGS="${CFLAGS}"
91 make V=1
92}
93
94do_install() {
developer2a209692023-08-14 20:23:42 +080095 install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk ${D}${datadir}/hostap
developer29c4d2d2022-12-26 19:41:22 +080096 install -m 0755 ${B}/hostapd ${D}${sbindir}
97 install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
developer65857c02023-02-13 20:07:19 +080098 install -m 0644 ${WORKDIR}/hostapd-2G-EHT.conf ${D}${sysconfdir}/hostapd-2G.conf
99 install -m 0644 ${WORKDIR}/hostapd-5G-EHT.conf ${D}${sysconfdir}/hostapd-5G.conf
100 install -m 0644 ${WORKDIR}/hostapd-6G-EHT.conf ${D}${sysconfdir}/hostapd-6G.conf
developer29c4d2d2022-12-26 19:41:22 +0800101 install -m 0644 ${WORKDIR}/hostapd-5G-7915.conf ${D}${sysconfdir}
102 install -m 0644 ${WORKDIR}/hostapd-5G-7916.conf ${D}${sysconfdir}
103 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system
104 install -m 0755 ${WORKDIR}/hostapd-init.sh ${D}${base_libdir}/rdk
105 install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system
developerca672072023-02-24 18:01:27 +0800106 install -m 0755 ${WORKDIR}/mac80211-EHT.sh ${D}${sbindir}/mac80211.sh
developer2a209692023-08-14 20:23:42 +0800107 install -m 0755 ${WORKDIR}/hostapd.uc ${D}${datadir}/hostap
108 install -m 0755 ${WORKDIR}/wdev.uc ${D}${datadir}/hostap
109 install -m 0755 ${WORKDIR}/common.uc ${D}${datadir}/hostap
developer29c4d2d2022-12-26 19:41:22 +0800110}
111
112FILES_${PN} += " \
113 ${systemd_unitdir}/system/hostapd.service \
developer65857c02023-02-13 20:07:19 +0800114 ${sysconfdir}/hostapd-2G-EHT.conf \
115 ${sysconfdir}/hostapd-5G-EHT.conf \
116 ${sysconfdir}/hostapd-6G-EHT.conf \
developer29c4d2d2022-12-26 19:41:22 +0800117 ${sysconfdir}/hostapd-5G-7915.conf \
118 ${sysconfdir}/hostapd-5G-7916.conf \
119 ${base_libdir}/rdk/hostapd-init.sh \
120 ${systemd_unitdir}/system/init-uci-config.service \
developer2a209692023-08-14 20:23:42 +0800121 ${datadir}/hostap/hostapd.uc \
122 ${datadir}/hostap/wdev.uc \
123 ${datadir}/hostap/common.uc \
developer29c4d2d2022-12-26 19:41:22 +0800124"