developer | 7b43f2d | 2022-04-29 17:53:25 +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 | |
developer | bc262d5 | 2022-06-27 19:47:13 +0800 | [diff] [blame] | 7 | DEPENDS = "libnl openssl ubus" |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 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:" |
| 14 | |
developer | 053b0d2 | 2022-06-20 12:43:59 +0800 | [diff] [blame] | 15 | SRCREV ?= "4383528e01955d995d3b3db201e4c0f9840e8236" |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 16 | SRC_URI = " \ |
| 17 | git://w1.fi/hostap.git;protocol=https;branch=main \ |
developer | 5a558df | 2022-05-03 12:11:14 +0800 | [diff] [blame] | 18 | file://hostapd-full.config \ |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 19 | 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 | " |
| 28 | require files/patches/patches.inc |
| 29 | |
| 30 | B = "${WORKDIR}/git/hostapd" |
| 31 | S = "${WORKDIR}/git" |
| 32 | |
| 33 | inherit update-rc.d systemd pkgconfig features_check |
| 34 | INITSCRIPT_NAME = "hostapd" |
| 35 | |
| 36 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 37 | SYSTEMD_SERVICE_${PN} = "hostapd.service" |
| 38 | |
| 39 | do_unpack_append() { |
| 40 | bb.build.exec_func('do_copy_openwrt_src', d) |
| 41 | } |
| 42 | |
| 43 | do_copy_openwrt_src() { |
| 44 | cp -Rfp ${WORKDIR}/src/* ${S}/ |
| 45 | } |
| 46 | |
| 47 | do_configure_append() { |
developer | 5a558df | 2022-05-03 12:11:14 +0800 | [diff] [blame] | 48 | install -m 0644 ${WORKDIR}/hostapd-full.config ${B}/.config |
| 49 | |
developer | 9e68ba2 | 2022-05-03 12:55:23 +0800 | [diff] [blame] | 50 | echo "CONFIG_MBO=y" >> ${B}/.config |
| 51 | echo "CONFIG_WPS_UPNP=y" >> ${B}/.config |
developer | 17732dd | 2022-07-05 14:59:41 +0800 | [diff] [blame] | 52 | echo "CONFIG_DPP=y" >> ${B}/.config |
| 53 | echo "CONFIG_DPP2=y" >> ${B}/.config |
| 54 | echo "CONFIG_DPP3=y" >> ${B}/.config |
developer | 9e68ba2 | 2022-05-03 12:55:23 +0800 | [diff] [blame] | 55 | |
developer | 5a558df | 2022-05-03 12:11:14 +0800 | [diff] [blame] | 56 | echo "CONFIG_ACS=y" >> ${B}/.config |
| 57 | echo "CONFIG_IEEE80211AX=y" >> ${B}/.config |
| 58 | echo "CONFIG_TLS=openssl" >> ${B}/.config |
| 59 | echo "CONFIG_SAE=y" >> ${B}/.config |
| 60 | echo "CONFIG_OWE=y" >> ${B}/.config |
| 61 | echo "CONFIG_SUITEB192=y" >> ${B}/.config |
| 62 | echo "CONFIG_AP=y" >> ${B}/.config |
| 63 | echo "CONFIG_MESH=y" >> ${B}/.config |
| 64 | echo "CONFIG_WEP=y" >> ${B}/.config |
developer | f32dabf | 2022-06-01 10:59:24 +0800 | [diff] [blame] | 65 | echo "CONFIG_FILS=y" >> ${B}/.config |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 66 | } |
| 67 | |
developer | ec2b4c4 | 2022-05-17 16:38:22 +0800 | [diff] [blame] | 68 | SRC_URI_append_mt7915 += " \ |
| 69 | file://hostapd-5G-7915.conf \ |
| 70 | " |
| 71 | do_configure_append_mt7915() { |
| 72 | ln -sf ${WORKDIR}/hostapd-5G-7915.conf ${WORKDIR}/hostapd-5G.conf |
| 73 | } |
| 74 | |
developer | 7b43f2d | 2022-04-29 17:53:25 +0800 | [diff] [blame] | 75 | do_filogic_patches() { |
| 76 | cd ${S} |
| 77 | if [ ! -e patch_applied ]; then |
| 78 | patch -p1 < ${WORKDIR}/001-rdkb-remove-ubus-support.patch |
| 79 | touch patch_applied |
| 80 | fi |
| 81 | } |
| 82 | |
| 83 | addtask filogic_patches after do_patch before do_compile |
| 84 | |
| 85 | do_compile() { |
| 86 | export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3" |
| 87 | export EXTRA_CFLAGS="${CFLAGS}" |
| 88 | make V=1 |
| 89 | } |
| 90 | |
| 91 | do_install() { |
| 92 | install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk |
| 93 | install -m 0755 ${B}/hostapd ${D}${sbindir} |
| 94 | install -m 0755 ${B}/hostapd_cli ${D}${sbindir} |
| 95 | install -m 0644 ${WORKDIR}/hostapd-2G.conf ${D}${sysconfdir} |
| 96 | install -m 0644 ${WORKDIR}/hostapd-5G.conf ${D}${sysconfdir} |
| 97 | install -m 0644 ${WORKDIR}/hostapd-bhaul2G.conf ${D}${sysconfdir} |
| 98 | install -m 0644 ${WORKDIR}/hostapd-bhaul5G.conf ${D}${sysconfdir} |
| 99 | install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system |
| 100 | install -m 0755 ${WORKDIR}/hostapd-init.sh ${D}${base_libdir}/rdk |
| 101 | } |
| 102 | |
| 103 | FILES_${PN} += " \ |
| 104 | ${systemd_unitdir}/system/hostapd.service \ |
| 105 | ${sysconfdir}/hostapd-2G.conf \ |
| 106 | ${sysconfdir}/hostapd-5G.conf \ |
| 107 | ${sysconfdir}/hostapd-bhaul2G.conf \ |
| 108 | ${sysconfdir}/hostapd-bhaul5G.conf \ |
| 109 | ${base_libdir}/rdk/hostapd-init.sh \ |
| 110 | " |