os: move vfs/lxip to vfs/ip from dde_linux

Because the sources are now used by lwip/lxip, make them accessible in a
public place.

issue #5471
This commit is contained in:
Sebastian Sumpf 2025-02-10 10:22:43 +01:00 committed by Norman Feske
parent 9881ba1364
commit ed77207963
13 changed files with 313 additions and 199 deletions

View File

@ -1,8 +1,8 @@
SHARED_LIB = yes
VFS_DIR = $(REP_DIR)/src/lib/vfs/lxip
VFS_DIR := $(call select_from_repositories,src/lib/vfs/ip)
LIBS = lxip format
SRC_CC = vfs.cc
SRC_CC = vfs.cc vfs_lxip.cc
LD_OPT += --version-script=$(VFS_DIR)/symbol.map
CC_OPT += -Wno-error=missing-field-initializers

View File

@ -4,13 +4,22 @@ LIB_MK := $(addprefix lib/mk/,lxip.inc vfs_lxip.mk) \
MIRROR_FROM_REP_DIR := $(LIB_MK) \
lib/import/import-lxip.mk \
src/lib/lxip \
src/lib/vfs/lxip
content: $(MIRROR_FROM_REP_DIR)
MIRROR_FROM_OS := src/lib/vfs/ip/vfs.cc \
src/lib/vfs/ip/vfs_lxip.cc \
src/lib/vfs/ip/vfs_ip.h \
src/lib/vfs/ip/symbol.map
content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_OS)
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
$(MIRROR_FROM_OS):
mkdir -p $(dir $@)
cp -r $(GENODE_DIR)/repos/os/$@ $@
PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/dde_linux/ports/linux)
content: LICENSE

View File

@ -0,0 +1,11 @@
SHARED_LIB = yes
VFS_DIR := $(call select_from_repositories,src/lib/vfs/ip)
LIBS = lwip
SRC_CC = vfs.cc vfs_lwip.cc
LD_OPT += --version-script=$(VFS_DIR)/symbol.map
CC_OPT += -Wno-error=missing-field-initializers
CC_OPT += -Wno-missing-field-initializers
vpath %.cc $(VFS_DIR)

View File

@ -0,0 +1,20 @@
MIRROR_FROM_REP_DIR := \
$(shell cd $(REP_DIR); find src/lib/lwip -type f) \
lib/import/import-lwip.mk \
lib/mk/lwip.mk \
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/lwip)
MIRROR_FROM_PORT_DIR := $(shell cd $(PORT_DIR); find include src -type f)
content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_PORT_DIR) LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
$(MIRROR_FROM_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(PORT_DIR)/$@ $@
LICENSE:
cp $(PORT_DIR)/src/lib/lwip/COPYING $@

View File

@ -0,0 +1 @@
2025-02-10 dd2c8448f69748b2ec930b27e2307d694776a239

View File

@ -0,0 +1,18 @@
MIRROR_FROM_REP_DIR := lib/mk/vfs_lwip.mk
MIRROR_FROM_OS := src/lib/vfs/ip/vfs.cc \
src/lib/vfs/ip/vfs_lwip.cc \
src/lib/vfs/ip/vfs_ip.h \
src/lib/vfs/ip/symbol.map
content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_OS) LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
$(MIRROR_FROM_OS):
mkdir -p $(dir $@)
cp -r $(GENODE_DIR)/repos/os/$@ $@
LICENSE:
cp $(GENODE_DIR)/LICENSE $@

View File

@ -0,0 +1 @@
2025-02-10-a b30304208ab71ea254d9f412492c42a66079c0e6

View File

@ -0,0 +1,9 @@
base
format
genode_c_api
lwip
nic_session
os
so
timer_session
vfs

View File

@ -0,0 +1,14 @@
#ifndef _VFS_IP_H_
#define _VFS_IP_H_
#include <util/string.h>
namespace Vfs {
using Ip_string = Genode::String<5>;
/* return name of IP stack for VFS-plugin */
Ip_string const &ip_stack() ;
}
#endif /* _VFS_IP_H_ */

View File

@ -0,0 +1,7 @@
#include "vfs_ip.h"
Vfs::Ip_string const &Vfs::ip_stack()
{
static Ip_string string { "lwip" };
return string;
}

View File

@ -0,0 +1,7 @@
#include "vfs_ip.h"
Vfs::Ip_string const &Vfs::ip_stack()
{
static Ip_string string { "lxip" };
return string;
}