From fd14cf9f1eb8a5b6ddac1fe12ba91f2d27f0ab57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 17 May 2022 17:39:54 +0200 Subject: [PATCH] Move libnl to own port Issue #4508. --- repos/dde_linux/lib/import/import-libnl.mk | 2 +- repos/dde_linux/lib/mk/libnl.inc | 2 +- repos/dde_linux/lib/mk/libnl_include.mk | 2 +- repos/dde_linux/ports/dde_linux.hash | 2 +- repos/dde_linux/ports/dde_linux.port | 13 +------------ repos/dde_linux/ports/libnl.hash | 1 + repos/dde_linux/ports/libnl.port | 21 +++++++++++++++++++++ repos/pc/recipes/src/pc_wifi_drv/content.mk | 12 +++++++++--- 8 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 repos/dde_linux/ports/libnl.hash create mode 100644 repos/dde_linux/ports/libnl.port diff --git a/repos/dde_linux/lib/import/import-libnl.mk b/repos/dde_linux/lib/import/import-libnl.mk index 1aa5c17774..c6c5826803 100644 --- a/repos/dde_linux/lib/import/import-libnl.mk +++ b/repos/dde_linux/lib/import/import-libnl.mk @@ -1,4 +1,4 @@ -NL_CONTRIB_INC_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl +NL_CONTRIB_INC_DIR := $(call select_from_ports,libnl)/src/lib/libnl INC_DIR += $(NL_CONTRIB_INC_DIR)/include LIBNL_INC_DIR = $(REP_DIR)/src/lib/libnl/include diff --git a/repos/dde_linux/lib/mk/libnl.inc b/repos/dde_linux/lib/mk/libnl.inc index 233dd0c9d2..11a04d40a8 100644 --- a/repos/dde_linux/lib/mk/libnl.inc +++ b/repos/dde_linux/lib/mk/libnl.inc @@ -3,7 +3,7 @@ LIB_INC_DIR = $(LIB_DIR)/include LIBS += libc libnl_include -LIBNL_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl +LIBNL_CONTRIB_DIR := $(call select_from_ports,libnl)/src/lib/libnl INC_DIR += $(LIB_INC_DIR) INC_DIR += $(LIBNL_CONTRIB_DIR)/include diff --git a/repos/dde_linux/lib/mk/libnl_include.mk b/repos/dde_linux/lib/mk/libnl_include.mk index f8495c7ff9..e88b485dea 100644 --- a/repos/dde_linux/lib/mk/libnl_include.mk +++ b/repos/dde_linux/lib/mk/libnl_include.mk @@ -1,6 +1,6 @@ ifeq ($(called_from_lib_mk),yes) -LIBNL_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl +LIBNL_CONTRIB_DIR := $(call select_from_ports,libnl)/src/lib/libnl LIBNL_EMUL_H := $(REP_DIR)/src/lib/libnl/include/libnl_emul.h # diff --git a/repos/dde_linux/ports/dde_linux.hash b/repos/dde_linux/ports/dde_linux.hash index 419c9fc199..9ddbbfb9c8 100644 --- a/repos/dde_linux/ports/dde_linux.hash +++ b/repos/dde_linux/ports/dde_linux.hash @@ -1 +1 @@ -428ae50e4ae60462249210de908f941666d7d85f +e65e2ae521cd13ad8471bbd09e72e69af5d13ba3 diff --git a/repos/dde_linux/ports/dde_linux.port b/repos/dde_linux/ports/dde_linux.port index 56424b3d83..439b4f0f75 100644 --- a/repos/dde_linux/ports/dde_linux.port +++ b/repos/dde_linux/ports/dde_linux.port @@ -1,7 +1,7 @@ LICENSE := GPLv2 VERSION := 2 DOWNLOADS := intel_fb.archive lxip.archive \ - fec.archive libnl.archive wpa_supplicant.git \ + fec.archive wpa_supplicant.git \ usb_host.archive dwc_otg_host.git usb_hid.archive \ usb_modem.archive usb_net.archive @@ -97,13 +97,6 @@ DIR(fec) := $(SRC_DIR_FEC) TAR_OPT(fec) := --strip-components=1 --files-from - < <(sed 's/-x.x.x/-$(VERSION_FEC)/g' $(REP_DIR)/fec.list) HASH_INPUT += $(REP_DIR)/fec.list -# -# libnl sources -# -URL(libnl) := https://github.com/thom311/libnl/releases/download/libnl3_2_25/libnl-3.2.25.tar.gz -SHA(libnl) := 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5 -DIR(libnl) := src/lib/libnl - # # wpa_supplicant sources # @@ -115,7 +108,6 @@ DIR(wpa_supplicant) := src/app/wpa_supplicant # Patches # PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/wpa*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/libnl*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/lxip*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/intel*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_host*.patch))) @@ -135,9 +127,6 @@ PATCH_OPT(patches/lxip_request_sock.patch) := $(LXIP_OPT) PATCH_OPT(patches/lxip_sk_wq.patch) := $(LXIP_OPT) PATCH_OPT(patches/lxip_skbuff_cast.patch) := $(LXIP_OPT) -# libnl -PATCH_OPT(patches/libnl.patch) := -p1 -d ${DIR(libnl)} - # WPA supplicant PATCH_OPT(patches/wpa_supplicant.patch) := -p1 -d ${DIR(wpa_supplicant)} diff --git a/repos/dde_linux/ports/libnl.hash b/repos/dde_linux/ports/libnl.hash new file mode 100644 index 0000000000..4d3de0d052 --- /dev/null +++ b/repos/dde_linux/ports/libnl.hash @@ -0,0 +1 @@ +129b0b7ddc24ad7e6bfb6d885f99b480c63e7832 diff --git a/repos/dde_linux/ports/libnl.port b/repos/dde_linux/ports/libnl.port new file mode 100644 index 0000000000..ff3e84c401 --- /dev/null +++ b/repos/dde_linux/ports/libnl.port @@ -0,0 +1,21 @@ +LICENSE := LGPL-2.1-only +VERSION := 3.2.25 +DOWNLOADS := libnl.archive + +# +# libnl sources +# +BASE_URL := https://github.com/thom311/libnl/releases/download +URL(libnl) := $(BASE_URL)/libnl$(subst .,_,$(VERSION))/libnl-$(VERSION).tar.gz +SHA(libnl) := 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5 +DIR(libnl) := src/lib/libnl + +# +# Patches +# +PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/libnl*.patch))) + +# libnl +PATCH_OPT(patches/libnl.patch) := -p1 -d ${DIR(libnl)} + +# vi: set ft=make : diff --git a/repos/pc/recipes/src/pc_wifi_drv/content.mk b/repos/pc/recipes/src/pc_wifi_drv/content.mk index 5792d5fe46..1fe74f8a7b 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/content.mk +++ b/repos/pc/recipes/src/pc_wifi_drv/content.mk @@ -22,6 +22,8 @@ MIRROR_FROM_OS_DIR := src/lib/genode_c_api/uplink.cc DDE_LINUX_REP_DIR := $(GENODE_DIR)/repos/dde_linux DDE_LINUX_PORT_DIR := $(call port_dir,$(DDE_LINUX_REP_DIR)/ports/dde_linux) +LIBNL_PORT_DIR := $(call port_dir,$(DDE_LINUX_REP_DIR)/ports/libnl) + DDE_LINUX_LIB_MK := \ $(addprefix lib/mk/,libnl.inc libnl_include.mk) \ $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/libnl.mk) \ @@ -35,11 +37,11 @@ MIRROR_FROM_DDE_LINUX_DIR := $(DDE_LINUX_LIB_MK) \ $(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) -MIRROR_FROM_DDE_LINUX_PORT_DIR := $(shell cd $(DDE_LINUX_PORT_DIR); find src/lib/libnl -type f) \ - $(shell cd $(DDE_LINUX_PORT_DIR); find src/app/wpa_supplicant -type f) +MIRROR_FROM_DDE_LINUX_PORT_DIR := $(shell cd $(DDE_LINUX_PORT_DIR); find src/app/wpa_supplicant -type f) +MIRROR_FROM_LIBNL_PORT_DIR := $(shell cd $(LIBNL_PORT_DIR); find src/lib/libnl -type f) content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_OS_DIR) $(MIRROR_FROM_DDE_LINUX_DIR) \ - $(MIRROR_FROM_DDE_LINUX_PORT_DIR) cleanup-wpa + $(MIRROR_FROM_DDE_LINUX_PORT_DIR) $(MIRROR_FROM_LIBNL_PORT_DIR) cleanup-wpa $(MIRROR_FROM_REP_DIR): $(mirror_from_rep_dir) @@ -56,6 +58,10 @@ $(MIRROR_FROM_DDE_LINUX_PORT_DIR): mkdir -p $(dir $@) cp -r $(DDE_LINUX_PORT_DIR)/$@ $@ +$(MIRROR_FROM_LIBNL_PORT_DIR): + mkdir -p $(dir $@) + cp -r $(LIBNL_PORT_DIR)/$@ $@ + cleanup-wpa: $(MIRROR_FROM_DDE_LINUX_PORT_DIR) @for dir in .git doc eap_example hs20 mac80211_hwsim radius_example \ hostapd tests wlantest wpadebug wpaspy; do \