blob: bd511b4c68bef6ca72763af60b7c794c088244fd [file] [log] [blame]
developerf2e3f562022-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
developer1a173672023-12-21 14:49:33 +08007DEPENDS = "libnl-tiny openssl ubus ucode udebug"
developerf2e3f562022-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)}"
developerab5e7752023-12-21 16:18:59 +080010RDEPENDS_${PN} += "gawk ucode udebug"
developerf2e3f562022-12-26 19:41:22 +080011
12FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
13FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:"
14
developer66e89bc2024-04-23 14:50:01 +080015SRCREV ?= "07c9f183ea744ac04585fb6dd10220c75a5e2e74"
developerf2e3f562022-12-26 19:41:22 +080016SRC_URI = " \
17 git://w1.fi/hostap.git;protocol=https;branch=main \
18 file://hostapd-full.config \
developerffddfb82023-02-13 20:07:19 +080019 file://hostapd-2G-EHT.conf \
20 file://hostapd-5G-EHT.conf \
21 file://hostapd-6G-EHT.conf \
developerf2e3f562022-12-26 19:41:22 +080022 file://hostapd-5G-7915.conf \
23 file://hostapd-5G-7916.conf \
24 file://hostapd.service \
developer66e89bc2024-04-23 14:50:01 +080025 file://hostapd-init-EHT.sh \
developer02cc9292023-02-24 18:01:27 +080026 file://mac80211-EHT.sh \
developerf2e3f562022-12-26 19:41:22 +080027 file://init-uci-config.service \
developerf0fd7052023-08-14 20:23:42 +080028 file://hostapd.uc \
29 file://common.uc \
30 file://wdev.uc \
developere92ee3c2023-10-25 17:01:28 +080031 file://wpa_supplicant.uc \
developerf0fd7052023-08-14 20:23:42 +080032 file://src-${PV} \
33 file://002-rdkb-add-ucode-support.patch;apply=no \
developerf2e3f562022-12-26 19:41:22 +080034"
35require files/patches-${PV}/patches.inc
36
37B = "${WORKDIR}/git/hostapd"
38S = "${WORKDIR}/git"
39
40inherit update-rc.d systemd pkgconfig features_check
41INITSCRIPT_NAME = "hostapd"
42
43SYSTEMD_AUTO_ENABLE_${PN} = "enable"
44SYSTEMD_SERVICE_${PN} = "hostapd.service"
45SYSTEMD_SERVICE_${PN} += " init-uci-config.service"
developerf0fd7052023-08-14 20:23:42 +080046INSANE_SKIP_${PN} += "file-rdeps"
developerf2e3f562022-12-26 19:41:22 +080047
developerf2e3f562022-12-26 19:41:22 +080048
49do_configure_append() {
50 install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config
51
52 echo "CONFIG_MBO=y" >> ${B}/.config
53 echo "CONFIG_WPS_UPNP=y" >> ${B}/.config
54 echo "CONFIG_DPP=y" >> ${B}/.config
55 echo "CONFIG_DPP2=y" >> ${B}/.config
56 echo "CONFIG_DPP3=y" >> ${B}/.config
57
58 echo "CONFIG_ACS=y" >> ${B}/.config
59 echo "CONFIG_IEEE80211AX=y" >> ${B}/.config
60 echo "CONFIG_TLS=openssl" >> ${B}/.config
61 echo "CONFIG_SAE=y" >> ${B}/.config
62 echo "CONFIG_OWE=y" >> ${B}/.config
63 echo "CONFIG_SUITEB192=y" >> ${B}/.config
64 echo "CONFIG_AP=y" >> ${B}/.config
65 echo "CONFIG_MESH=y" >> ${B}/.config
66 echo "CONFIG_WEP=y" >> ${B}/.config
67 echo "CONFIG_FILS=y" >> ${B}/.config
developer4d581862023-02-13 16:01:56 +080068 echo "CONFIG_IEEE80211BE=y" >> ${B}/.config
developer805797f2023-06-08 11:36:33 +080069 echo "CONFIG_TESTING_OPTIONS=y" >> ${B}/.config
developerf0fd7052023-08-14 20:23:42 +080070 echo "CONFIG_UCODE=y" >> ${B}/.config
developer4697a312023-11-30 15:52:52 +080071 echo "CONFIG_LIBNL20=y" >> ${B}/.config
72 echo "CONFIG_LIBNL_TINY=y" >> ${B}/.config
developer66e89bc2024-04-23 14:50:01 +080073 echo "CONFIG_AFC=y" >> ${B}/.config
developerf2e3f562022-12-26 19:41:22 +080074}
75
76do_filogic_patches() {
77 cd ${S}
78 if [ ! -e patch_applied ]; then
developerf0fd7052023-08-14 20:23:42 +080079 patch -p1 < ${WORKDIR}/002-rdkb-add-ucode-support.patch
developerf2e3f562022-12-26 19:41:22 +080080 touch patch_applied
81 fi
82}
83
84addtask filogic_patches after do_patch before do_compile
85
86do_compile() {
developer4697a312023-11-30 15:52:52 +080087 export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl-tiny -D_GNU_SOURCE"
developerf2e3f562022-12-26 19:41:22 +080088 export EXTRA_CFLAGS="${CFLAGS}"
89 make V=1
90}
91
92do_install() {
developerf0fd7052023-08-14 20:23:42 +080093 install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk ${D}${datadir}/hostap
developerf2e3f562022-12-26 19:41:22 +080094 install -m 0755 ${B}/hostapd ${D}${sbindir}
95 install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
developerffddfb82023-02-13 20:07:19 +080096 install -m 0644 ${WORKDIR}/hostapd-2G-EHT.conf ${D}${sysconfdir}/hostapd-2G.conf
97 install -m 0644 ${WORKDIR}/hostapd-5G-EHT.conf ${D}${sysconfdir}/hostapd-5G.conf
98 install -m 0644 ${WORKDIR}/hostapd-6G-EHT.conf ${D}${sysconfdir}/hostapd-6G.conf
developerf2e3f562022-12-26 19:41:22 +080099 install -m 0644 ${WORKDIR}/hostapd-5G-7915.conf ${D}${sysconfdir}
100 install -m 0644 ${WORKDIR}/hostapd-5G-7916.conf ${D}${sysconfdir}
101 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system
developer66e89bc2024-04-23 14:50:01 +0800102 install -m 0755 ${WORKDIR}/hostapd-init-EHT.sh ${D}${base_libdir}/rdk/hostapd-init.sh
developerf2e3f562022-12-26 19:41:22 +0800103 install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system
developer02cc9292023-02-24 18:01:27 +0800104 install -m 0755 ${WORKDIR}/mac80211-EHT.sh ${D}${sbindir}/mac80211.sh
developerf0fd7052023-08-14 20:23:42 +0800105 install -m 0755 ${WORKDIR}/hostapd.uc ${D}${datadir}/hostap
106 install -m 0755 ${WORKDIR}/wdev.uc ${D}${datadir}/hostap
107 install -m 0755 ${WORKDIR}/common.uc ${D}${datadir}/hostap
developere92ee3c2023-10-25 17:01:28 +0800108 install -m 0755 ${WORKDIR}/wpa_supplicant.uc ${D}${datadir}/hostap
developerf2e3f562022-12-26 19:41:22 +0800109}
110
111FILES_${PN} += " \
112 ${systemd_unitdir}/system/hostapd.service \
developerffddfb82023-02-13 20:07:19 +0800113 ${sysconfdir}/hostapd-2G-EHT.conf \
114 ${sysconfdir}/hostapd-5G-EHT.conf \
115 ${sysconfdir}/hostapd-6G-EHT.conf \
developerf2e3f562022-12-26 19:41:22 +0800116 ${sysconfdir}/hostapd-5G-7915.conf \
117 ${sysconfdir}/hostapd-5G-7916.conf \
118 ${base_libdir}/rdk/hostapd-init.sh \
119 ${systemd_unitdir}/system/init-uci-config.service \
developerf0fd7052023-08-14 20:23:42 +0800120 ${datadir}/hostap/hostapd.uc \
121 ${datadir}/hostap/wdev.uc \
122 ${datadir}/hostap/common.uc \
developere92ee3c2023-10-25 17:01:28 +0800123 ${datadir}/hostap/wpa_supplicant.uc \
developerf2e3f562022-12-26 19:41:22 +0800124"