developer | f2e3f56 | 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" |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 5 | LIC_FILES_CHKSUM = "file://hostapd/README;md5=0e430ef1be3d6eebf257cf493fc7661d" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 6 | |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 7 | DEPENDS = "libnl-tiny openssl ubus ucode udebug" |
developer | f2e3f56 | 2022-12-26 19:41:22 +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)}" |
developer | ab5e775 | 2023-12-21 16:18:59 +0800 | [diff] [blame] | 10 | RDEPENDS_${PN} += "gawk ucode udebug" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 11 | |
| 12 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 13 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:" |
| 14 | |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 15 | SRCREV ?= "7e0e69cfeac300414ef0492bc76a2aa164443249" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 16 | SRC_URI = " \ |
| 17 | git://w1.fi/hostap.git;protocol=https;branch=main \ |
| 18 | file://hostapd-full.config \ |
developer | ffddfb8 | 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 | f2e3f56 | 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 \ |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 25 | file://hostapd-init-EHT.sh \ |
developer | 02cc929 | 2023-02-24 18:01:27 +0800 | [diff] [blame] | 26 | file://mac80211-EHT.sh \ |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 27 | file://init-uci-config.service \ |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 28 | file://hostapd.uc \ |
| 29 | file://common.uc \ |
| 30 | file://wdev.uc \ |
developer | e92ee3c | 2023-10-25 17:01:28 +0800 | [diff] [blame] | 31 | file://wpa_supplicant.uc \ |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 32 | file://src-${PV} \ |
| 33 | file://002-rdkb-add-ucode-support.patch;apply=no \ |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 34 | " |
| 35 | require files/patches-${PV}/patches.inc |
| 36 | |
| 37 | B = "${WORKDIR}/git/hostapd" |
| 38 | S = "${WORKDIR}/git" |
| 39 | |
| 40 | inherit update-rc.d systemd pkgconfig features_check |
| 41 | INITSCRIPT_NAME = "hostapd" |
| 42 | |
| 43 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 44 | SYSTEMD_SERVICE_${PN} = "hostapd.service" |
| 45 | SYSTEMD_SERVICE_${PN} += " init-uci-config.service" |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 46 | INSANE_SKIP_${PN} += "file-rdeps" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 47 | |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 48 | |
| 49 | do_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 |
developer | 4d58186 | 2023-02-13 16:01:56 +0800 | [diff] [blame] | 68 | echo "CONFIG_IEEE80211BE=y" >> ${B}/.config |
developer | 805797f | 2023-06-08 11:36:33 +0800 | [diff] [blame] | 69 | echo "CONFIG_TESTING_OPTIONS=y" >> ${B}/.config |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 70 | echo "CONFIG_UCODE=y" >> ${B}/.config |
developer | 4697a31 | 2023-11-30 15:52:52 +0800 | [diff] [blame] | 71 | echo "CONFIG_LIBNL20=y" >> ${B}/.config |
| 72 | echo "CONFIG_LIBNL_TINY=y" >> ${B}/.config |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 73 | echo "CONFIG_AFC=y" >> ${B}/.config |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 74 | echo "CONFIG_SAE_PK=y" >> ${B}/.config |
| 75 | echo "CONFIG_HS20=y" >> ${B}/.config |
| 76 | echo "CONFIG_HE_OVERRIDES=y" >> ${B}/.config |
| 77 | echo "CONFIG_EHT_OVERRIDES=y" >> ${B}/.config |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | do_filogic_patches() { |
| 81 | cd ${S} |
| 82 | if [ ! -e patch_applied ]; then |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 83 | patch -p1 < ${WORKDIR}/002-rdkb-add-ucode-support.patch |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 84 | touch patch_applied |
| 85 | fi |
| 86 | } |
| 87 | |
| 88 | addtask filogic_patches after do_patch before do_compile |
| 89 | |
| 90 | do_compile() { |
developer | 4697a31 | 2023-11-30 15:52:52 +0800 | [diff] [blame] | 91 | export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl-tiny -D_GNU_SOURCE" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 92 | export EXTRA_CFLAGS="${CFLAGS}" |
| 93 | make V=1 |
| 94 | } |
| 95 | |
| 96 | do_install() { |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 97 | install -d ${D}${sbindir} ${D}${sysconfdir} ${D}${systemd_unitdir}/system/ ${D}${base_libdir}/rdk ${D}${datadir}/hostap |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 98 | install -m 0755 ${B}/hostapd ${D}${sbindir} |
| 99 | install -m 0755 ${B}/hostapd_cli ${D}${sbindir} |
developer | ffddfb8 | 2023-02-13 20:07:19 +0800 | [diff] [blame] | 100 | install -m 0644 ${WORKDIR}/hostapd-2G-EHT.conf ${D}${sysconfdir}/hostapd-2G.conf |
| 101 | install -m 0644 ${WORKDIR}/hostapd-5G-EHT.conf ${D}${sysconfdir}/hostapd-5G.conf |
| 102 | install -m 0644 ${WORKDIR}/hostapd-6G-EHT.conf ${D}${sysconfdir}/hostapd-6G.conf |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 103 | install -m 0644 ${WORKDIR}/hostapd-5G-7915.conf ${D}${sysconfdir} |
| 104 | install -m 0644 ${WORKDIR}/hostapd-5G-7916.conf ${D}${sysconfdir} |
| 105 | install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 106 | install -m 0755 ${WORKDIR}/hostapd-init-EHT.sh ${D}${base_libdir}/rdk/hostapd-init.sh |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 107 | install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system |
developer | 02cc929 | 2023-02-24 18:01:27 +0800 | [diff] [blame] | 108 | install -m 0755 ${WORKDIR}/mac80211-EHT.sh ${D}${sbindir}/mac80211.sh |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 109 | install -m 0755 ${WORKDIR}/hostapd.uc ${D}${datadir}/hostap |
| 110 | install -m 0755 ${WORKDIR}/wdev.uc ${D}${datadir}/hostap |
| 111 | install -m 0755 ${WORKDIR}/common.uc ${D}${datadir}/hostap |
developer | e92ee3c | 2023-10-25 17:01:28 +0800 | [diff] [blame] | 112 | install -m 0755 ${WORKDIR}/wpa_supplicant.uc ${D}${datadir}/hostap |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | FILES_${PN} += " \ |
| 116 | ${systemd_unitdir}/system/hostapd.service \ |
developer | ffddfb8 | 2023-02-13 20:07:19 +0800 | [diff] [blame] | 117 | ${sysconfdir}/hostapd-2G-EHT.conf \ |
| 118 | ${sysconfdir}/hostapd-5G-EHT.conf \ |
| 119 | ${sysconfdir}/hostapd-6G-EHT.conf \ |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 120 | ${sysconfdir}/hostapd-5G-7915.conf \ |
| 121 | ${sysconfdir}/hostapd-5G-7916.conf \ |
| 122 | ${base_libdir}/rdk/hostapd-init.sh \ |
| 123 | ${systemd_unitdir}/system/init-uci-config.service \ |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 124 | ${datadir}/hostap/hostapd.uc \ |
| 125 | ${datadir}/hostap/wdev.uc \ |
| 126 | ${datadir}/hostap/common.uc \ |
developer | e92ee3c | 2023-10-25 17:01:28 +0800 | [diff] [blame] | 127 | ${datadir}/hostap/wpa_supplicant.uc \ |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 128 | " |