blob: 8f549164b2f0087ea893010bc3acc401dd6edf38 [file] [log] [blame]
developer7b43f2d2022-04-29 17:53:25 +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
developerbc262d52022-06-27 19:47:13 +08007DEPENDS = "libnl openssl ubus"
developer7b43f2d2022-04-29 17:53:25 +08008DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', 'telemetry', '', d)}"
9LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', ' -ltelemetry_msgsender ', '', d)}"
10RDEPENDS_${PN} += "gawk"
11
12FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
13FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches:"
14
developer198585d2022-09-22 17:12:54 +080015SRCREV ?= "b704dc72ef824dfdd96674b90179b274d1d38105"
developer7b43f2d2022-04-29 17:53:25 +080016SRC_URI = " \
17 git://w1.fi/hostap.git;protocol=https;branch=main \
developer5a558df2022-05-03 12:11:14 +080018 file://hostapd-full.config \
developer7b43f2d2022-04-29 17:53:25 +080019 file://hostapd-2G.conf \
20 file://hostapd-5G.conf \
developer08587352022-08-29 18:59:45 +080021 file://hostapd-6G.conf \
22 file://hostapd-5G-7915.conf \
23 file://hostapd-5G-7916.conf \
developer7b43f2d2022-04-29 17:53:25 +080024 file://hostapd.service \
25 file://hostapd-init.sh \
developer08587352022-08-29 18:59:45 +080026 file://mac80211.sh \
27 file://init-uci-config.service \
developer7b43f2d2022-04-29 17:53:25 +080028 file://src \
29 file://001-rdkb-remove-ubus-support.patch;apply=no \
30"
31require files/patches/patches.inc
32
33B = "${WORKDIR}/git/hostapd"
34S = "${WORKDIR}/git"
35
36inherit update-rc.d systemd pkgconfig features_check
37INITSCRIPT_NAME = "hostapd"
38
39SYSTEMD_AUTO_ENABLE_${PN} = "enable"
40SYSTEMD_SERVICE_${PN} = "hostapd.service"
developer08587352022-08-29 18:59:45 +080041SYSTEMD_SERVICE_${PN} += " init-uci-config.service"
developer7b43f2d2022-04-29 17:53:25 +080042
43do_unpack_append() {
44 bb.build.exec_func('do_copy_openwrt_src', d)
45}
46
47do_copy_openwrt_src() {
48 cp -Rfp ${WORKDIR}/src/* ${S}/
49}
50
51do_configure_append() {
developer5a558df2022-05-03 12:11:14 +080052 install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config
53
developer9e68ba22022-05-03 12:55:23 +080054 echo "CONFIG_MBO=y" >> ${B}/.config
55 echo "CONFIG_WPS_UPNP=y" >> ${B}/.config
developer17732dd2022-07-05 14:59:41 +080056 echo "CONFIG_DPP=y" >> ${B}/.config
57 echo "CONFIG_DPP2=y" >> ${B}/.config
58 echo "CONFIG_DPP3=y" >> ${B}/.config
developer9e68ba22022-05-03 12:55:23 +080059
developer5a558df2022-05-03 12:11:14 +080060 echo "CONFIG_ACS=y" >> ${B}/.config
61 echo "CONFIG_IEEE80211AX=y" >> ${B}/.config
62 echo "CONFIG_TLS=openssl" >> ${B}/.config
63 echo "CONFIG_SAE=y" >> ${B}/.config
64 echo "CONFIG_OWE=y" >> ${B}/.config
65 echo "CONFIG_SUITEB192=y" >> ${B}/.config
66 echo "CONFIG_AP=y" >> ${B}/.config
67 echo "CONFIG_MESH=y" >> ${B}/.config
68 echo "CONFIG_WEP=y" >> ${B}/.config
developerf32dabf2022-06-01 10:59:24 +080069 echo "CONFIG_FILS=y" >> ${B}/.config
developer7b43f2d2022-04-29 17:53:25 +080070}
71
developer7b43f2d2022-04-29 17:53:25 +080072do_filogic_patches() {
73 cd ${S}
74 if [ ! -e patch_applied ]; then
75 patch -p1 < ${WORKDIR}/001-rdkb-remove-ubus-support.patch
76 touch patch_applied
77 fi
78}
79
80addtask filogic_patches after do_patch before do_compile
81
82do_compile() {
83 export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3"
84 export EXTRA_CFLAGS="${CFLAGS}"
85 make V=1
86}
87
88do_install() {
89 install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk
90 install -m 0755 ${B}/hostapd ${D}${sbindir}
91 install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
92 install -m 0644 ${WORKDIR}/hostapd-2G.conf ${D}${sysconfdir}
93 install -m 0644 ${WORKDIR}/hostapd-5G.conf ${D}${sysconfdir}
developer08587352022-08-29 18:59:45 +080094 install -m 0644 ${WORKDIR}/hostapd-6G.conf ${D}${sysconfdir}
95 install -m 0644 ${WORKDIR}/hostapd-5G-7915.conf ${D}${sysconfdir}
96 install -m 0644 ${WORKDIR}/hostapd-5G-7916.conf ${D}${sysconfdir}
developer7b43f2d2022-04-29 17:53:25 +080097 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system
98 install -m 0755 ${WORKDIR}/hostapd-init.sh ${D}${base_libdir}/rdk
developer08587352022-08-29 18:59:45 +080099 install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system
100 install -m 0755 ${WORKDIR}/mac80211.sh ${D}${sbindir}
developer7b43f2d2022-04-29 17:53:25 +0800101}
102
103FILES_${PN} += " \
104 ${systemd_unitdir}/system/hostapd.service \
105 ${sysconfdir}/hostapd-2G.conf \
106 ${sysconfdir}/hostapd-5G.conf \
developer08587352022-08-29 18:59:45 +0800107 ${sysconfdir}/hostapd-6G.conf \
108 ${sysconfdir}/hostapd-5G-7915.conf \
109 ${sysconfdir}/hostapd-5G-7916.conf \
developer7b43f2d2022-04-29 17:53:25 +0800110 ${base_libdir}/rdk/hostapd-init.sh \
developer08587352022-08-29 18:59:45 +0800111 ${systemd_unitdir}/system/init-uci-config.service \
developer7b43f2d2022-04-29 17:53:25 +0800112"