hostapd: generalize recipe to reduce the overhead when adding a new platform
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
dd723df576
commit
6d23ee1fe7
|
|
@ -7,6 +7,7 @@ include conf/machine/include/ccimx6.inc
|
|||
|
||||
# Wireless external module
|
||||
WIRELESS_MODULE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-qualcomm', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Wireless p2p interface
|
||||
WLAN_P2P_INTERFACE ?= "p2p0"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
# Contains the ConnectCore 6 module.
|
||||
include conf/machine/include/ccimx6.inc
|
||||
|
||||
HAS_WIFI_VIRTWLANS = "false"
|
||||
|
||||
# Wireless p2p interface
|
||||
WLAN_P2P_DEVICE_NAME ?= "ccimx6-p2p"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ BT_DEVICE_NAME ?= "cc6ul"
|
|||
# Wireless external module
|
||||
WIRELESS_MODULE ?= ""
|
||||
WIRELESS_MODULE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-qualcomm', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Wireless p2p interface
|
||||
WLAN_P2P_INTERFACE ?= "p2p0"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ BT_DEVICE_NAME ?= "cc8mn"
|
|||
# Wireless external module
|
||||
WIRELESS_MODULE ?= ""
|
||||
WIRELESS_MODULE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-qualcomm', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Wireless p2p interface
|
||||
WLAN_P2P_INTERFACE ?= "p2p0"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ BT_DEVICE_NAME ?= "cc8x"
|
|||
# Wireless external module
|
||||
WIRELESS_MODULE ?= ""
|
||||
WIRELESS_MODULE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-qualcomm', '', d)}"
|
||||
HAS_WIFI_VIRTWLANS = "true"
|
||||
|
||||
# Wireless p2p interface
|
||||
WLAN_P2P_INTERFACE ?= "p2p0"
|
||||
|
|
|
|||
|
|
@ -5,11 +5,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
|
|||
SRC_URI_append = " \
|
||||
file://hostapd_wlan0.conf \
|
||||
file://hostapd@.service \
|
||||
${@oe.utils.conditional('HAS_WIFI_VIRTWLANS', 'true', 'file://hostapd_wlan1.conf', '', d)} \
|
||||
"
|
||||
SRC_URI_append_ccimx6ul = " file://hostapd_wlan1.conf"
|
||||
SRC_URI_append_ccimx6qpsbc = " file://hostapd_wlan1.conf"
|
||||
SRC_URI_append_ccimx8x = " file://hostapd_wlan1.conf"
|
||||
SRC_URI_append_ccimx8mn = " file://hostapd_wlan1.conf"
|
||||
|
||||
SYSTEMD_SERVICE_${PN}_append = " hostapd@.service"
|
||||
|
||||
|
|
@ -21,26 +18,11 @@ do_install_append() {
|
|||
# Install interface-specific systemd service
|
||||
install -m 0644 ${WORKDIR}/hostapd@.service ${D}${systemd_unitdir}/system/
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd@.service
|
||||
}
|
||||
|
||||
do_install_append_ccimx6ul() {
|
||||
# Install custom hostapd_IFACE.conf file
|
||||
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
|
||||
}
|
||||
|
||||
do_install_append_ccimx6qpsbc() {
|
||||
# Install custom hostapd_IFACE.conf file
|
||||
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
|
||||
}
|
||||
|
||||
do_install_append_ccimx8x() {
|
||||
# Install custom hostapd_IFACE.conf file
|
||||
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
|
||||
}
|
||||
|
||||
do_install_append_ccimx8mn() {
|
||||
# Install custom hostapd_IFACE.conf file
|
||||
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
|
||||
if ${HAS_WIFI_VIRTWLANS}; then
|
||||
# Install custom hostapd_IFACE.conf file
|
||||
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget_${PN}() {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,11 @@ inherit packagegroup
|
|||
|
||||
RDEPENDS_${PN} = "\
|
||||
crda \
|
||||
hostapd \
|
||||
iw \
|
||||
wpa-supplicant \
|
||||
wpa-supplicant-cli \
|
||||
wpa-supplicant-passphrase \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}_append_ccimx6ul = " hostapd"
|
||||
RDEPENDS_${PN}_append_ccimx6qpsbc = " hostapd"
|
||||
RDEPENDS_${PN}_append_ccimx8x = " hostapd"
|
||||
RDEPENDS_${PN}_append_ccimx8mn = " hostapd"
|
||||
RDEPENDS_${PN}_remove_ccimx6sbc = "hostapd"
|
||||
|
|
|
|||
Loading…
Reference in New Issue