developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 1 | SUMMARY = "User space daemon for extended IEEE 802.11 management" |
| 2 | HOMEPAGE = "http://w1.fi/hostapd/" |
| 3 | SECTION = "kernel/userland" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://hostapd/README;md5=c905478466c90f1cefc0df987c40e172" |
| 6 | |
| 7 | DEPENDS = "libnl openssl ubus" |
| 8 | DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', 'telemetry', '', d)}" |
| 9 | LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'telemetry2_0', ' -ltelemetry_msgsender ', '', d)}" |
| 10 | RDEPENDS_${PN} += "gawk" |
| 11 | |
| 12 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 13 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:" |
| 14 | |
| 15 | SRCREV ?= "b704dc72ef824dfdd96674b90179b274d1d38105" |
| 16 | SRC_URI = " \ |
| 17 | git://w1.fi/hostap.git;protocol=https;branch=main \ |
| 18 | file://hostapd-full.config \ |
developer | 65857c0 | 2023-02-13 20:07:19 +0800 | [diff] [blame^] | 19 | file://hostapd-2G-EHT.conf \ |
| 20 | file://hostapd-5G-EHT.conf \ |
| 21 | file://hostapd-6G-EHT.conf \ |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 22 | file://hostapd-5G-7915.conf \ |
| 23 | file://hostapd-5G-7916.conf \ |
| 24 | file://hostapd.service \ |
| 25 | file://hostapd-init.sh \ |
| 26 | file://mac80211.sh \ |
| 27 | file://init-uci-config.service \ |
| 28 | file://src \ |
| 29 | file://001-rdkb-remove-ubus-support.patch;apply=no \ |
| 30 | " |
| 31 | require files/patches-${PV}/patches.inc |
| 32 | |
| 33 | B = "${WORKDIR}/git/hostapd" |
| 34 | S = "${WORKDIR}/git" |
| 35 | |
| 36 | inherit update-rc.d systemd pkgconfig features_check |
| 37 | INITSCRIPT_NAME = "hostapd" |
| 38 | |
| 39 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 40 | SYSTEMD_SERVICE_${PN} = "hostapd.service" |
| 41 | SYSTEMD_SERVICE_${PN} += " init-uci-config.service" |
| 42 | |
| 43 | do_unpack_append() { |
| 44 | bb.build.exec_func('do_copy_openwrt_src', d) |
| 45 | } |
| 46 | |
| 47 | do_copy_openwrt_src() { |
| 48 | cp -Rfp ${WORKDIR}/src/* ${S}/ |
| 49 | } |
| 50 | |
| 51 | do_configure_append() { |
| 52 | install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config |
| 53 | |
| 54 | echo "CONFIG_MBO=y" >> ${B}/.config |
| 55 | echo "CONFIG_WPS_UPNP=y" >> ${B}/.config |
| 56 | echo "CONFIG_DPP=y" >> ${B}/.config |
| 57 | echo "CONFIG_DPP2=y" >> ${B}/.config |
| 58 | echo "CONFIG_DPP3=y" >> ${B}/.config |
| 59 | |
| 60 | 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 |
| 69 | echo "CONFIG_FILS=y" >> ${B}/.config |
developer | 5eddc51 | 2023-02-13 16:01:56 +0800 | [diff] [blame] | 70 | echo "CONFIG_IEEE80211BE=y" >> ${B}/.config |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | do_filogic_patches() { |
| 74 | cd ${S} |
| 75 | if [ ! -e patch_applied ]; then |
| 76 | patch -p1 < ${WORKDIR}/001-rdkb-remove-ubus-support.patch |
| 77 | touch patch_applied |
| 78 | fi |
| 79 | } |
| 80 | |
| 81 | addtask filogic_patches after do_patch before do_compile |
| 82 | |
| 83 | do_compile() { |
| 84 | export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3" |
| 85 | export EXTRA_CFLAGS="${CFLAGS}" |
| 86 | make V=1 |
| 87 | } |
| 88 | |
| 89 | do_install() { |
| 90 | install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk |
| 91 | install -m 0755 ${B}/hostapd ${D}${sbindir} |
| 92 | install -m 0755 ${B}/hostapd_cli ${D}${sbindir} |
developer | 65857c0 | 2023-02-13 20:07:19 +0800 | [diff] [blame^] | 93 | install -m 0644 ${WORKDIR}/hostapd-2G-EHT.conf ${D}${sysconfdir}/hostapd-2G.conf |
| 94 | install -m 0644 ${WORKDIR}/hostapd-5G-EHT.conf ${D}${sysconfdir}/hostapd-5G.conf |
| 95 | install -m 0644 ${WORKDIR}/hostapd-6G-EHT.conf ${D}${sysconfdir}/hostapd-6G.conf |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 96 | install -m 0644 ${WORKDIR}/hostapd-5G-7915.conf ${D}${sysconfdir} |
| 97 | install -m 0644 ${WORKDIR}/hostapd-5G-7916.conf ${D}${sysconfdir} |
| 98 | install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system |
| 99 | install -m 0755 ${WORKDIR}/hostapd-init.sh ${D}${base_libdir}/rdk |
| 100 | install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system |
| 101 | install -m 0755 ${WORKDIR}/mac80211.sh ${D}${sbindir} |
| 102 | } |
| 103 | |
| 104 | FILES_${PN} += " \ |
| 105 | ${systemd_unitdir}/system/hostapd.service \ |
developer | 65857c0 | 2023-02-13 20:07:19 +0800 | [diff] [blame^] | 106 | ${sysconfdir}/hostapd-2G-EHT.conf \ |
| 107 | ${sysconfdir}/hostapd-5G-EHT.conf \ |
| 108 | ${sysconfdir}/hostapd-6G-EHT.conf \ |
developer | 29c4d2d | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 109 | ${sysconfdir}/hostapd-5G-7915.conf \ |
| 110 | ${sysconfdir}/hostapd-5G-7916.conf \ |
| 111 | ${base_libdir}/rdk/hostapd-init.sh \ |
| 112 | ${systemd_unitdir}/system/init-uci-config.service \ |
| 113 | " |