blob: 49b786bad112d5cebaaf3145823a05fbbe6382b1 [file] [log] [blame]
developerfaf1ea22022-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
7DEPENDS = "libnl openssl"
8DEPENDS_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
15SRCREV ?= "cff80b4f7d3c0a47c052e8187d671710f48939e4"
16SRC_URI = " \
17 git://w1.fi/hostap.git;protocol=https;branch=main \
developera176e272022-05-03 12:11:14 +080018 file://hostapd-full.config \
developerfaf1ea22022-04-29 17:53:25 +080019 file://hostapd-2G.conf \
20 file://hostapd-5G.conf \
21 file://hostapd-bhaul2G.conf \
22 file://hostapd-bhaul5G.conf \
23 file://hostapd.service \
24 file://hostapd-init.sh \
25 file://src \
26 file://001-rdkb-remove-ubus-support.patch;apply=no \
27"
28require files/patches/patches.inc
29
30B = "${WORKDIR}/git/hostapd"
31S = "${WORKDIR}/git"
32
33inherit update-rc.d systemd pkgconfig features_check
34INITSCRIPT_NAME = "hostapd"
35
36SYSTEMD_AUTO_ENABLE_${PN} = "enable"
37SYSTEMD_SERVICE_${PN} = "hostapd.service"
38
39do_unpack_append() {
40 bb.build.exec_func('do_copy_openwrt_src', d)
41}
42
43do_copy_openwrt_src() {
44 cp -Rfp ${WORKDIR}/src/* ${S}/
45}
46
47do_configure_append() {
developera176e272022-05-03 12:11:14 +080048 install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config
49
developerb5414512022-05-03 12:55:23 +080050 echo "CONFIG_MBO=y" >> ${B}/.config
51 echo "CONFIG_WPS_UPNP=y" >> ${B}/.config
52
developera176e272022-05-03 12:11:14 +080053 echo "CONFIG_ACS=y" >> ${B}/.config
54 echo "CONFIG_IEEE80211AX=y" >> ${B}/.config
55 echo "CONFIG_TLS=openssl" >> ${B}/.config
56 echo "CONFIG_SAE=y" >> ${B}/.config
57 echo "CONFIG_OWE=y" >> ${B}/.config
58 echo "CONFIG_SUITEB192=y" >> ${B}/.config
59 echo "CONFIG_AP=y" >> ${B}/.config
60 echo "CONFIG_MESH=y" >> ${B}/.config
61 echo "CONFIG_WEP=y" >> ${B}/.config
developerfaf1ea22022-04-29 17:53:25 +080062}
63
64do_filogic_patches() {
65 cd ${S}
66 if [ ! -e patch_applied ]; then
67 patch -p1 < ${WORKDIR}/001-rdkb-remove-ubus-support.patch
68 touch patch_applied
69 fi
70}
71
72addtask filogic_patches after do_patch before do_compile
73
74do_compile() {
75 export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3"
76 export EXTRA_CFLAGS="${CFLAGS}"
77 make V=1
78}
79
80do_install() {
81 install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk
82 install -m 0755 ${B}/hostapd ${D}${sbindir}
83 install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
84 install -m 0644 ${WORKDIR}/hostapd-2G.conf ${D}${sysconfdir}
85 install -m 0644 ${WORKDIR}/hostapd-5G.conf ${D}${sysconfdir}
86 install -m 0644 ${WORKDIR}/hostapd-bhaul2G.conf ${D}${sysconfdir}
87 install -m 0644 ${WORKDIR}/hostapd-bhaul5G.conf ${D}${sysconfdir}
88 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system
89 install -m 0755 ${WORKDIR}/hostapd-init.sh ${D}${base_libdir}/rdk
90}
91
92FILES_${PN} += " \
93 ${systemd_unitdir}/system/hostapd.service \
94 ${sysconfdir}/hostapd-2G.conf \
95 ${sysconfdir}/hostapd-5G.conf \
96 ${sysconfdir}/hostapd-bhaul2G.conf \
97 ${sysconfdir}/hostapd-bhaul5G.conf \
98 ${base_libdir}/rdk/hostapd-init.sh \
99"