genode/repos/dde_linux/lib/mk/wifi.inc
Josef Söntgen d5710d9de3 Move 'wifi' driver to dde_linux repository
The bulk of the driver code now lives in the 'dde_linux' repository,
which is available on all platforms, from where it can be referenced by
other repositories.

The 'wifi_drv' binary was delegated to a generic harness that includes
all configuration and management functionality shared by all wireless
device driver components, e.g., the wpa_supplicant. The code of the
device driver emulation environment is located in 'src/lib/wifi'. It
is referenced by the platform-specific driver library that resides in
the corresponding platform repository. The runtime configuration needs
to point the driver to proper driver library.

The platform-specific library is in charge of orchestrating the contrib
source utilized by the driver as well as providing the 'source.list'
and 'dep.list' files. It must include the generic library snippet
'repos/dde_linux/lib/wifi.inc' that deals with managing the emulation
environment code.

The 'repos/dde_linux/src/drivers/wifi/README' file contains more
detailed information on how to deploy the driver.

Issue #4861.
2023-05-30 12:03:32 +02:00

56 lines
1.1 KiB
PHP

WIFI_DRV_DIR := $(call select_from_ports,linux)/src/lib/wifi
ifeq ($(wildcard $(WIFI_DRV_DIR)),)
WIFI_DRV_DIR := $(call select_from_repositories,src/lib/wifi)
endif
INC_DIR += $(WIFI_DRV_DIR)
LD_OPT += --version-script=$(WIFI_DRV_DIR)/symbol.map
vpath %.c $(WIFI_DRV_DIR)
vpath %.cc $(WIFI_DRV_DIR)
$(LIB).lib.so: $(WIFI_DRV_DIR)/symbol.map
#
# Generic driver code shared between all instances
#
SHARED_LIB := yes
LIBS += base jitterentropy
SRC_CC += firmware.cc
SRC_CC += socket_call.cc
SRC_CC += wlan.cc
SRC_C += dummies.c
SRC_C += lx_emul.c
SRC_C += lx_user.c
SRC_C += uplink.c
CC_OPT_dummies += -DKBUILD_MODNAME='"dummies"'
CC_OPT_generated_dummies += -DKBUILD_MODNAME='"generated_dummies"'
CC_OPT_lx_socket_call += -DKBUILD_MODNAME='"lx_socket_call"'
SRC_C += lx_socket_call.c
#
# Generic Linux options
#
CC_C_OPT += -Wno-address-of-packed-member
# need net/rfkill/rfkill.h
CC_OPT_lx_emul += -I$(LX_SRC_DIR)
CC_C_OPT += -DCONFIG_RFKILL_INPUT
#
# Genode C-API backends
#
SRC_CC += genode_c_api/uplink.cc
vpath genode_c_api/uplink.cc $(subst /genode_c_api,,$(call select_from_repositories,src/lib/genode_c_api))