diff --git a/repos/dde_linux/README b/repos/dde_linux/README index ad684de987..4cb39a08da 100644 --- a/repos/dde_linux/README +++ b/repos/dde_linux/README @@ -33,6 +33,12 @@ library named 'lxip.lib.so'. The IP stack can be interfaced using Genode's version of 'libc' by linking your application to 'lxip_libc' plugin in your 'target.mk' file. +Wifi +#### + +The 'wifi_drv' consists of a port of the mac802.11 stack, platform-specific +drivers and the 'wpa_supplicant' to Genode. + lx_kit ###### diff --git a/repos/dde_linux/lib/mk/spec/arm/libnl.mk b/repos/dde_linux/lib/mk/spec/arm/libnl.mk new file mode 100644 index 0000000000..6b28e47250 --- /dev/null +++ b/repos/dde_linux/lib/mk/spec/arm/libnl.mk @@ -0,0 +1,6 @@ +include $(REP_DIR)/lib/mk/libnl.inc + +INC_DIR += $(LIB_INC_DIR)/spec/32bit + +CC_CXX_WARN_STRICT = + diff --git a/repos/pc/lib/mk/vfs_wifi.mk b/repos/dde_linux/lib/mk/vfs_wifi.mk similarity index 100% rename from repos/pc/lib/mk/vfs_wifi.mk rename to repos/dde_linux/lib/mk/vfs_wifi.mk diff --git a/repos/dde_linux/lib/mk/wifi.inc b/repos/dde_linux/lib/mk/wifi.inc new file mode 100644 index 0000000000..91e2aeb5a9 --- /dev/null +++ b/repos/dde_linux/lib/mk/wifi.inc @@ -0,0 +1,55 @@ +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)) diff --git a/repos/pc/lib/symbols/wifi b/repos/dde_linux/lib/symbols/wifi similarity index 100% rename from repos/pc/lib/symbols/wifi rename to repos/dde_linux/lib/symbols/wifi diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/content.mk b/repos/dde_linux/recipes/raw/pc_wifi_firmware/content.mk similarity index 100% rename from repos/dde_linux/recipes/raw/wifi_firmware/content.mk rename to repos/dde_linux/recipes/raw/pc_wifi_firmware/content.mk diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/hash b/repos/dde_linux/recipes/raw/pc_wifi_firmware/hash similarity index 100% rename from repos/dde_linux/recipes/raw/wifi_firmware/hash rename to repos/dde_linux/recipes/raw/pc_wifi_firmware/hash diff --git a/repos/dde_linux/run/nic_router_uplinks.run b/repos/dde_linux/run/nic_router_uplinks.run index 930a654fb7..2b906f8d03 100644 --- a/repos/dde_linux/run/nic_router_uplinks.run +++ b/repos/dde_linux/run/nic_router_uplinks.run @@ -21,7 +21,7 @@ proc router_verbose_domain_state {} { create_boot_directory import_from_depot [depot_user]/src/[base_src] \ - [depot_user]/pkg/wifi \ + [depot_user]/pkg/pc_wifi \ [depot_user]/src/acpi_drv \ [depot_user]/src/dynamic_rom \ [depot_user]/src/init \ @@ -111,7 +111,6 @@ install_config { - @@ -128,6 +127,7 @@ install_config { + diff --git a/repos/pc/src/drivers/wifi/pc/README b/repos/dde_linux/src/drivers/wifi/README similarity index 60% rename from repos/pc/src/drivers/wifi/pc/README rename to repos/dde_linux/src/drivers/wifi/README index 2846f65963..b3c2f19aef 100644 --- a/repos/pc/src/drivers/wifi/pc/README +++ b/repos/dde_linux/src/drivers/wifi/README @@ -1,9 +1,19 @@ -The pc_wifi_drv component is a port of the Linux mac802.11 stack, including -the iwlwifi driver as well as libnl and wpa_supplicant, to Genode. +The wifi_drv component is a port of the Linux mac802.11 stack as well as +libnl and wpa_supplicant to Genode. Depending on the used platform it +features a selection of drivers for wireless devices. For example on the +PC platform it contains the ath9k, iwlwifi and rtlwifi drivers for PCI(e) +devices. -To start the component the following configuration snippet can be used: +In contrast to other DDE Linux based drivers the actual driver portion is +confined to its own library to better isolate the various parts of the driver. +The 'wifi_drv' binary is the generic management part that includes the Wifi +configuration interface and the 'wpa_supplicant'. A suitable driver library +is loaded at run-time (see section [Debugging]). -! +To start the component on the PC platform the following configuration snippet +can be used: + +! ! ! ! @@ -16,10 +26,44 @@ To start the component the following configuration snippet can be used: ! ! ! +! +! +! ! ! ! -! + +On other platforms the wifi library will be different. The following +snippet illustrates the use of the driver on the PinePhone: + +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! + +Note the ROM route for the device-tree binary that is essential on +ARM-based platforms. The name of the request DTB can by changed +by setting the 'dtb' attribute in the config node. The driver will request access to the ROM module 'wifi_config' to connect to a network: @@ -102,3 +146,19 @@ label "devices" if requested in the config as depicted. ! ! + + +Debugging +~~~~~~~~~ + +As mentioned in the introduction the 'wifi_drv' component is special in the +regard that the actual driver is provided as a shared-object to better isolate +it from the the driver binary that is a Libc::Component managing the +'wpa_supplicant'. Since this code and in return the binary is the same for each +platform it is linked against an artifical 'wifi' library that only exists as +an ABI stub created via 'lib/symbols/wifi'. In case the driver is integrated +via depot archives this is, besides setting the proper ROM routes, of no +concern. However, when the driver is built without the depot, the boot image +assemble-mechanism tries to include the non-existent 'wifi.lib.so' library. To +prevent that from failing one way is adding a dummy file - the +'repos/pc/run/pc_wifi.run' illustrates how to do that. diff --git a/repos/pc/src/drivers/wifi/pc/frontend.h b/repos/dde_linux/src/drivers/wifi/frontend.h similarity index 100% rename from repos/pc/src/drivers/wifi/pc/frontend.h rename to repos/dde_linux/src/drivers/wifi/frontend.h diff --git a/repos/pc/src/drivers/wifi/pc/main.cc b/repos/dde_linux/src/drivers/wifi/main.cc similarity index 100% rename from repos/pc/src/drivers/wifi/pc/main.cc rename to repos/dde_linux/src/drivers/wifi/main.cc diff --git a/repos/pc/src/drivers/wifi/pc/target.mk b/repos/dde_linux/src/drivers/wifi/target.mk similarity index 88% rename from repos/pc/src/drivers/wifi/pc/target.mk rename to repos/dde_linux/src/drivers/wifi/target.mk index 0bb459630f..2fee96fdb4 100644 --- a/repos/pc/src/drivers/wifi/pc/target.mk +++ b/repos/dde_linux/src/drivers/wifi/target.mk @@ -1,4 +1,4 @@ -TARGET := pc_wifi_drv +TARGET := wifi_drv SRC_CC := main.cc wpa.cc LIBS := base wifi LIBS += libc diff --git a/repos/pc/src/drivers/wifi/pc/util.h b/repos/dde_linux/src/drivers/wifi/util.h similarity index 100% rename from repos/pc/src/drivers/wifi/pc/util.h rename to repos/dde_linux/src/drivers/wifi/util.h diff --git a/repos/pc/src/drivers/wifi/pc/wpa.cc b/repos/dde_linux/src/drivers/wifi/wpa.cc similarity index 100% rename from repos/pc/src/drivers/wifi/pc/wpa.cc rename to repos/dde_linux/src/drivers/wifi/wpa.cc diff --git a/repos/pc/src/drivers/wifi/pc/wpa.h b/repos/dde_linux/src/drivers/wifi/wpa.h similarity index 100% rename from repos/pc/src/drivers/wifi/pc/wpa.h rename to repos/dde_linux/src/drivers/wifi/wpa.h diff --git a/repos/pc/src/lib/vfs/wifi/vfs.cc b/repos/dde_linux/src/lib/vfs/wifi/vfs.cc similarity index 100% rename from repos/pc/src/lib/vfs/wifi/vfs.cc rename to repos/dde_linux/src/lib/vfs/wifi/vfs.cc diff --git a/repos/dde_linux/src/lib/wifi/dtb_helper.cc b/repos/dde_linux/src/lib/wifi/dtb_helper.cc new file mode 100644 index 0000000000..e0bac5649a --- /dev/null +++ b/repos/dde_linux/src/lib/wifi/dtb_helper.cc @@ -0,0 +1,64 @@ +/** + * \brief DTB access helper + * \author Josef Soentgen + * \date 2023-04-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +/* Genode includes */ +#include +#include + +/* local includes */ +#include "dtb_helper.h" + +using namespace Genode; + + +struct Dtb +{ + Genode::Env &_env; + + Attached_rom_dataspace _config_rom { _env, "config" }; + + using Dtb_name = Genode::String<64>; + + Dtb_name _dtb_name { + _config_rom.xml().attribute_value("dtb", Dtb_name("dtb")) }; + + Attached_rom_dataspace _dtb_rom { _env, _dtb_name.string() }; + + Dtb(Genode::Env &env) : _env { env } { } + + void *ptr() + { + return _dtb_rom.local_addr(); + } +}; + + +static Constructible _dtb { }; + + +Dtb_helper::Dtb_helper(Genode::Env &env) : _env { env } +{ + try { + _dtb.construct(env); + } catch (...) { + error("could not access DTB ROM module, driver may not work" + " as expected"); + } +} + + +void *Dtb_helper::dtb_ptr() +{ + return _dtb.constructed() ? _dtb->ptr() + : nullptr; +} diff --git a/repos/pc/src/lib/wifi/dtb_helper.h b/repos/dde_linux/src/lib/wifi/dtb_helper.h similarity index 100% rename from repos/pc/src/lib/wifi/dtb_helper.h rename to repos/dde_linux/src/lib/wifi/dtb_helper.h diff --git a/repos/pc/src/lib/wifi/dtb_helper.cc b/repos/dde_linux/src/lib/wifi/dtb_helper_no_dtb.cc similarity index 100% rename from repos/pc/src/lib/wifi/dtb_helper.cc rename to repos/dde_linux/src/lib/wifi/dtb_helper_no_dtb.cc diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/dde_linux/src/lib/wifi/firmware.cc similarity index 100% rename from repos/pc/src/lib/wifi/firmware.cc rename to repos/dde_linux/src/lib/wifi/firmware.cc diff --git a/repos/pc/src/lib/wifi/firmware_list.h b/repos/dde_linux/src/lib/wifi/firmware_list.h similarity index 100% rename from repos/pc/src/lib/wifi/firmware_list.h rename to repos/dde_linux/src/lib/wifi/firmware_list.h diff --git a/repos/pc/src/lib/wifi/libc_errno.h b/repos/dde_linux/src/lib/wifi/libc_errno.h similarity index 100% rename from repos/pc/src/lib/wifi/libc_errno.h rename to repos/dde_linux/src/lib/wifi/libc_errno.h diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/dde_linux/src/lib/wifi/lx_emul.c similarity index 100% rename from repos/pc/src/lib/wifi/lx_emul.c rename to repos/dde_linux/src/lib/wifi/lx_emul.c diff --git a/repos/pc/src/lib/wifi/lx_emul.h b/repos/dde_linux/src/lib/wifi/lx_emul.h similarity index 100% rename from repos/pc/src/lib/wifi/lx_emul.h rename to repos/dde_linux/src/lib/wifi/lx_emul.h diff --git a/repos/pc/src/lib/wifi/lx_emul_pci.c b/repos/dde_linux/src/lib/wifi/lx_emul_pci.c similarity index 100% rename from repos/pc/src/lib/wifi/lx_emul_pci.c rename to repos/dde_linux/src/lib/wifi/lx_emul_pci.c diff --git a/repos/pc/src/lib/wifi/lx_socket_call.c b/repos/dde_linux/src/lib/wifi/lx_socket_call.c similarity index 100% rename from repos/pc/src/lib/wifi/lx_socket_call.c rename to repos/dde_linux/src/lib/wifi/lx_socket_call.c diff --git a/repos/pc/src/lib/wifi/lx_socket_call.h b/repos/dde_linux/src/lib/wifi/lx_socket_call.h similarity index 100% rename from repos/pc/src/lib/wifi/lx_socket_call.h rename to repos/dde_linux/src/lib/wifi/lx_socket_call.h diff --git a/repos/pc/src/lib/wifi/lx_user.c b/repos/dde_linux/src/lib/wifi/lx_user.c similarity index 100% rename from repos/pc/src/lib/wifi/lx_user.c rename to repos/dde_linux/src/lib/wifi/lx_user.c diff --git a/repos/pc/src/lib/wifi/lx_user.h b/repos/dde_linux/src/lib/wifi/lx_user.h similarity index 100% rename from repos/pc/src/lib/wifi/lx_user.h rename to repos/dde_linux/src/lib/wifi/lx_user.h diff --git a/repos/pc/src/lib/wifi/socket_call.cc b/repos/dde_linux/src/lib/wifi/socket_call.cc similarity index 100% rename from repos/pc/src/lib/wifi/socket_call.cc rename to repos/dde_linux/src/lib/wifi/socket_call.cc diff --git a/repos/pc/src/lib/wifi/symbol.map b/repos/dde_linux/src/lib/wifi/symbol.map similarity index 100% rename from repos/pc/src/lib/wifi/symbol.map rename to repos/dde_linux/src/lib/wifi/symbol.map diff --git a/repos/pc/src/lib/wifi/uplink.c b/repos/dde_linux/src/lib/wifi/uplink.c similarity index 100% rename from repos/pc/src/lib/wifi/uplink.c rename to repos/dde_linux/src/lib/wifi/uplink.c diff --git a/repos/pc/src/lib/wifi/wlan.cc b/repos/dde_linux/src/lib/wifi/wlan.cc similarity index 100% rename from repos/pc/src/lib/wifi/wlan.cc rename to repos/dde_linux/src/lib/wifi/wlan.cc diff --git a/repos/gems/recipes/pkg/sculpt/README b/repos/gems/recipes/pkg/sculpt/README index daf0eec14e..1c868597c3 100644 --- a/repos/gems/recipes/pkg/sculpt/README +++ b/repos/gems/recipes/pkg/sculpt/README @@ -1511,7 +1511,7 @@ a free download at [https://genode.org]. ! ./tool/depot/download \ ! genodelabs/pkg/x86_64/sculpt/2023-04-28 \ ! genodelabs/pkg/x86_64/drivers_managed-pc/2023-04-28 \ - ! genodelabs/pkg/x86_64/wifi/2023-04-27 \ + ! genodelabs/pkg/x86_64/pc_wifi/2023-04-27 \ ! genodelabs/bin/x86_64/ipxe_nic_drv/2023-04-25 # Create a build directory diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/archives b/repos/gems/recipes/pkg/sculpt_distribution-pc/archives index 34bccd1ed0..b3c002ddcf 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/archives +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/archives @@ -1,6 +1,6 @@ _/pkg/sculpt _/pkg/drivers_managed-pc -_/pkg/wifi +_/pkg/pc_wifi _/pkg/ipxe_nic_drv _/pkg/vbox6 _/pkg/acpica diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 74ef12d63b..7b5f1d0d70 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -157,7 +157,7 @@ proc nic_driver_routes { } { set result(pc) { - + } set result(mnt_reform2) { @@ -171,7 +171,7 @@ proc nic_driver_routes { } { } set result(pinephone) { - + } diff --git a/repos/gems/sculpt/default-pc.sculpt b/repos/gems/sculpt/default-pc.sculpt index 3fdf31c203..005f528b27 100644 --- a/repos/gems/sculpt/default-pc.sculpt +++ b/repos/gems/sculpt/default-pc.sculpt @@ -4,7 +4,7 @@ system: pc gpu_drv: intel # supplemental depot content added to the system image -import: pkg/drivers_managed-pc pkg/wifi src/ipxe_nic_drv +import: pkg/drivers_managed-pc pkg/pc_wifi src/ipxe_nic_drv # selection of launcher-menu entries launcher: vm_fs shared_fs usb_devices_rom diff --git a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc index b8059320de..0d78effd44 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc @@ -69,7 +69,6 @@ void Sculpt::gen_wifi_drv_start_content(Xml_generator &xml) gen_parent_rom_route(xml, "vfs_wifi.lib.so"); gen_parent_rom_route(xml, "libssl.lib.so"); gen_parent_rom_route(xml, "wifi.lib.so"); - gen_parent_rom_route(xml, "a64_wifi.lib.so"); gen_parent_rom_route(xml, "wpa_driver_nl80211.lib.so"); gen_parent_rom_route(xml, "wpa_supplicant.lib.so"); gen_parent_rom_route(xml, "iwlwifi-1000-5.ucode"); diff --git a/repos/pc/lib/mk/pc_wifi.inc b/repos/pc/lib/mk/pc_wifi.inc new file mode 100644 index 0000000000..7040b5032b --- /dev/null +++ b/repos/pc/lib/mk/pc_wifi.inc @@ -0,0 +1,31 @@ +REQUIRES := x86 + +include $(call select_from_repositories,lib/mk/wifi.inc) + +TARGET_LIB_DIR := $(REP_DIR)/src/lib/pc_wifi + +LIBS += pc_linux_generated pc_lx_emul + +INC_DIR += $(TARGET_LIB_DIR) + +SRC_CC += dtb_helper_no_dtb.cc +SRC_C += lx_emul_pci.c + +SRC_CC += lx_emul/random.cc + +SRC_C += $(notdir $(wildcard $(TARGET_LIB_DIR)/generated_dummies.c)) +SRC_C += lx_emul/common_dummies.c +SRC_C += lx_emul/shadow/lib/kobject_uevent.c + +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/intel/iwlwifi +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8188ee +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/ath/ +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/ath/ath9k +CC_C_OPT += -I$(LX_SRC_DIR)/include/linux + +vpath %.c $(REP_DIR)/src/lib/pc +vpath %.cc $(REP_DIR)/src/lib/pc + +vpath %.c $(TARGET_LIB_DIR) +vpath %.cc $(TARGET_LIB_DIR) diff --git a/repos/pc/lib/mk/spec/x86_32/wifi.mk b/repos/pc/lib/mk/spec/x86_32/pc_wifi.mk similarity index 74% rename from repos/pc/lib/mk/spec/x86_32/wifi.mk rename to repos/pc/lib/mk/spec/x86_32/pc_wifi.mk index f136e992a4..c62533de72 100644 --- a/repos/pc/lib/mk/spec/x86_32/wifi.mk +++ b/repos/pc/lib/mk/spec/x86_32/pc_wifi.mk @@ -1,4 +1,4 @@ -include $(REP_DIR)/lib/mk/wifi.inc +include $(REP_DIR)/lib/mk/pc_wifi.inc REQUIRES += 32bit diff --git a/repos/pc/lib/mk/spec/x86_64/pc_wifi.mk b/repos/pc/lib/mk/spec/x86_64/pc_wifi.mk new file mode 100644 index 0000000000..783aa6ac19 --- /dev/null +++ b/repos/pc/lib/mk/spec/x86_64/pc_wifi.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/pc_wifi.inc + +REQUIRES += 64bit diff --git a/repos/pc/lib/mk/spec/x86_64/wifi.mk b/repos/pc/lib/mk/spec/x86_64/wifi.mk deleted file mode 100644 index afe2b9b5dd..0000000000 --- a/repos/pc/lib/mk/spec/x86_64/wifi.mk +++ /dev/null @@ -1,3 +0,0 @@ -include $(REP_DIR)/lib/mk/wifi.inc - -REQUIRES += 64bit diff --git a/repos/pc/lib/mk/wifi.inc b/repos/pc/lib/mk/wifi.inc deleted file mode 100644 index a7b98e2d7b..0000000000 --- a/repos/pc/lib/mk/wifi.inc +++ /dev/null @@ -1,61 +0,0 @@ -REQUIRES := x86 - -TARGET_LIB_DIR := $(REP_DIR)/src/lib/wifi - -SHARED_LIB := yes - -LD_OPT += --version-script=$(TARGET_LIB_DIR)/symbol.map - -LIBS += base jitterentropy pc_linux_generated pc_lx_emul -INC_DIR := $(TARGET_LIB_DIR) -SRC_CC += wlan.cc -SRC_CC += firmware.cc -SRC_CC += socket_call.cc -SRC_CC += lx_emul/random.cc -SRC_CC += dtb_helper.cc - -SRC_C += dummies.c -SRC_C += lx_emul.c -SRC_C += lx_emul_pci.c -SRC_C += lx_user.c -SRC_C += uplink.c - -CC_OPT_lx_socket_call += -DKBUILD_MODNAME='"lx_socket_call"' -SRC_C += lx_socket_call.c - -SRC_C += $(notdir $(wildcard $(TARGET_LIB_DIR)/generated_dummies.c)) -SRC_C += lx_emul/common_dummies.c - -CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/intel/iwlwifi -CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi -CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8188ee -CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/ath/ -CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/ath/ath9k -CC_C_OPT += -I$(LX_SRC_DIR)/include/linux - -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 - -#CC_OPT += -DCONFIG_IWLWIFI_DEBUG - - -SRC_C += lx_emul/shadow/lib/kobject_uevent.c -vpath %.c $(REP_DIR)/src/lib/pc -vpath %.cc $(REP_DIR)/src/lib/pc - -vpath %.c $(TARGET_LIB_DIR) -vpath %.cc $(TARGET_LIB_DIR) - -$(LIB).lib.so: $(TARGET_LIB_DIR)/symbol.map - -# -# 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)) diff --git a/repos/pc/recipes/api/pc_linux/hash b/repos/pc/recipes/api/pc_linux/hash index cee09ec9da..79a18a9dba 100644 --- a/repos/pc/recipes/api/pc_linux/hash +++ b/repos/pc/recipes/api/pc_linux/hash @@ -1 +1 @@ -2023-04-25 6d539e0675f0fd3523ad4ca40062b8399d02c1cc +2023-05-02 495f784f5db700f7dbe3583af4b196e9f05b1d9e diff --git a/repos/pc/recipes/pkg/pc_wifi/README b/repos/pc/recipes/pkg/pc_wifi/README new file mode 100644 index 0000000000..525a21c805 --- /dev/null +++ b/repos/pc/recipes/pkg/pc_wifi/README @@ -0,0 +1,2 @@ + + Package for bundling pc_wifi_drv and pc_wifi_firmware diff --git a/repos/pc/recipes/pkg/wifi/archives b/repos/pc/recipes/pkg/pc_wifi/archives similarity index 77% rename from repos/pc/recipes/pkg/wifi/archives rename to repos/pc/recipes/pkg/pc_wifi/archives index 406537fad5..e24cd33946 100644 --- a/repos/pc/recipes/pkg/wifi/archives +++ b/repos/pc/recipes/pkg/pc_wifi/archives @@ -3,4 +3,4 @@ _/src/openssl _/src/vfs _/src/vfs_jitterentropy _/src/libc -_/raw/wifi_firmware +_/raw/pc_wifi_firmware diff --git a/repos/pc/recipes/pkg/pc_wifi/hash b/repos/pc/recipes/pkg/pc_wifi/hash new file mode 100644 index 0000000000..9b7f800703 --- /dev/null +++ b/repos/pc/recipes/pkg/pc_wifi/hash @@ -0,0 +1 @@ +2023-05-02-c 31f3ef5aa2c7b9778fe2977e112ae28dfe40f8f9 diff --git a/repos/pc/recipes/pkg/wifi/README b/repos/pc/recipes/pkg/wifi/README deleted file mode 100644 index 574933d1f6..0000000000 --- a/repos/pc/recipes/pkg/wifi/README +++ /dev/null @@ -1,2 +0,0 @@ - - Package for bundling pc_wifi_drv and wifi_firmware diff --git a/repos/pc/recipes/pkg/wifi/hash b/repos/pc/recipes/pkg/wifi/hash deleted file mode 100644 index f5a472a9dc..0000000000 --- a/repos/pc/recipes/pkg/wifi/hash +++ /dev/null @@ -1 +0,0 @@ -2023-05-04 4a502a98091bb08186be3c5289b3388c66b37f33 diff --git a/repos/pc/recipes/src/pc_wifi_drv/content.mk b/repos/pc/recipes/src/pc_wifi_drv/content.mk index bbfcb06092..7e5d857312 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/content.mk +++ b/repos/pc/recipes/src/pc_wifi_drv/content.mk @@ -1,40 +1,40 @@ # -# Driver portions +# Specific driver portions # -LIB_MK := $(addprefix lib/mk/,wifi.inc vfs_wifi.mk) \ - $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/wifi.mk) \ +LIB_MK := $(addprefix lib/mk/,pc_wifi.inc) \ + $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/pc_wifi.mk) \ -MIRROR_FROM_REP_DIR := src/drivers/wifi/pc \ - src/lib/pc/lx_emul \ +MIRROR_FROM_REP_DIR := src/lib/pc/lx_emul \ src/include \ $(LIB_MK) \ - lib/symbols/wifi \ - $(shell cd $(REP_DIR); find src/drivers/wifi -type f) \ - $(shell cd $(REP_DIR); find src/lib/wifi -type f) \ - $(shell cd $(REP_DIR); find src/lib/vfs/wifi -type f) + $(shell cd $(REP_DIR); find src/lib/pc_wifi -type f) \ +# +# Generic driver poritions from dde_linux and os +# +# MIRROR_FROM_OS_DIR := src/lib/genode_c_api/uplink.cc -# -# DDE Linux portions (wpa_supplicant, libnl) -# - DDE_LINUX_REP_DIR := $(GENODE_DIR)/repos/dde_linux WS_PORT_DIR := $(call port_dir,$(DDE_LINUX_REP_DIR)/ports/wpa_supplicant) LIBNL_PORT_DIR := $(call port_dir,$(DDE_LINUX_REP_DIR)/ports/libnl) DDE_LINUX_LIB_MK := \ - $(addprefix lib/mk/,libnl.inc libnl_include.mk) \ + $(addprefix lib/mk/,libnl.inc libnl_include.mk wifi.inc vfs_wifi.mk) \ $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/libnl.mk) \ $(addprefix lib/mk/,wpa_driver_nl80211.mk wpa_supplicant.mk) MIRROR_FROM_DDE_LINUX_DIR := $(DDE_LINUX_LIB_MK) \ + src/drivers/wifi \ lib/import/import-libnl_include.mk \ lib/import/import-libnl.mk \ + lib/symbols/wifi \ include/wifi \ $(shell cd $(DDE_LINUX_REP_DIR); find src/lib/libnl -type f) \ + $(shell cd $(DDE_LINUX_REP_DIR); find src/lib/vfs/wifi -type f) \ + $(shell cd $(DDE_LINUX_REP_DIR); find src/lib/wifi -type f) \ $(shell cd $(DDE_LINUX_REP_DIR); find src/lib/wpa_driver_nl80211 -type f) \ $(shell cd $(DDE_LINUX_REP_DIR); find src/lib/wpa_supplicant -type f) diff --git a/repos/pc/recipes/src/pc_wifi_drv/hash b/repos/pc/recipes/src/pc_wifi_drv/hash index 12bc3615ce..798c39348b 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/hash +++ b/repos/pc/recipes/src/pc_wifi_drv/hash @@ -1 +1 @@ -2023-04-25 a0b3d15ad8c29a4b68a061b2139cb1e171e60d35 +2023-05-02-c ff18d05ceb7947b70f13bb3cc17247392158d122 diff --git a/repos/pc/run/wifi.run b/repos/pc/run/pc_wifi.run similarity index 98% rename from repos/pc/run/wifi.run rename to repos/pc/run/pc_wifi.run index 56812fe588..d374f5cfc9 100644 --- a/repos/pc/run/wifi.run +++ b/repos/pc/run/pc_wifi.run @@ -64,7 +64,7 @@ assert_spec x86 # create_boot_directory -import_from_depot [depot_user]/raw/wifi_firmware +import_from_depot [depot_user]/pkg/pc_wifi set build_components { core init timer @@ -72,13 +72,11 @@ set build_components { drivers/acpi drivers/platform drivers/rtc - drivers/wifi/pc server/report_rom server/dynamic_rom server/nic_router test/lwip/http_srv lib/vfs_wifi - lib/vfs_jitterentropy lib/vfs_lwip } @@ -128,7 +126,7 @@ append config { - + @@ -273,7 +271,6 @@ append config { - @@ -293,6 +290,7 @@ append config { + diff --git a/repos/pc/src/lib/wifi/dep.list b/repos/pc/src/lib/pc_wifi/dep.list similarity index 100% rename from repos/pc/src/lib/wifi/dep.list rename to repos/pc/src/lib/pc_wifi/dep.list diff --git a/repos/pc/src/lib/wifi/dummies.c b/repos/pc/src/lib/pc_wifi/dummies.c similarity index 100% rename from repos/pc/src/lib/wifi/dummies.c rename to repos/pc/src/lib/pc_wifi/dummies.c diff --git a/repos/pc/src/lib/wifi/generated_dummies.c b/repos/pc/src/lib/pc_wifi/generated_dummies.c similarity index 100% rename from repos/pc/src/lib/wifi/generated_dummies.c rename to repos/pc/src/lib/pc_wifi/generated_dummies.c diff --git a/repos/pc/src/lib/wifi/spec/x86_32/dep.list b/repos/pc/src/lib/pc_wifi/spec/x86_32/dep.list similarity index 100% rename from repos/pc/src/lib/wifi/spec/x86_32/dep.list rename to repos/pc/src/lib/pc_wifi/spec/x86_32/dep.list diff --git a/repos/pc/src/lib/wifi/spec/x86_32/source.list b/repos/pc/src/lib/pc_wifi/spec/x86_32/source.list similarity index 100% rename from repos/pc/src/lib/wifi/spec/x86_32/source.list rename to repos/pc/src/lib/pc_wifi/spec/x86_32/source.list diff --git a/repos/pc/src/lib/wifi/spec/x86_64/dep.list b/repos/pc/src/lib/pc_wifi/spec/x86_64/dep.list similarity index 100% rename from repos/pc/src/lib/wifi/spec/x86_64/dep.list rename to repos/pc/src/lib/pc_wifi/spec/x86_64/dep.list diff --git a/repos/pc/src/lib/wifi/spec/x86_64/source.list b/repos/pc/src/lib/pc_wifi/spec/x86_64/source.list similarity index 100% rename from repos/pc/src/lib/wifi/spec/x86_64/source.list rename to repos/pc/src/lib/pc_wifi/spec/x86_64/source.list diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index 71bc085dd3..8beba8c488 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -156,7 +156,7 @@ append_if $use_usb_driver packages " [depot_user]/pkg/test_usb_host_drv-[board append_if $use_usb_driver packages " [depot_user]/src/usb_net_drv " append_if $use_wifi_driver packages " [depot_user]/src/fs_rom " append_if $use_wifi_driver packages " [depot_user]/src/vfs_import " -append_if $use_wifi_driver packages " [depot_user]/pkg/wifi " +append_if $use_wifi_driver packages " [depot_user]/pkg/pc_wifi " append_if $use_wifi_driver packages " [depot_user]/src/acpi_drv " append_if $use_wifi_driver packages " [depot_user]/src/pci_decode " append_if $use_wifi_driver packages " [depot_user]/src/platform_drv " @@ -278,6 +278,7 @@ append config { +