From: Alexander Jung Date: Mon, 12 Apr 2021 09:21:39 +0000 (+0200) Subject: lib/ukcpio: Create empty CPIO extraction library X-Git-Tag: RELEASE-0.6~153 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2353cda74f657af7b8754a496b4e06452ba3d323;p=unikraft%2Funikraft.git lib/ukcpio: Create empty CPIO extraction library Information about the CPIO file format can be found here: https://www.kernel.org/doc/Documentation/early-userspace/buffer-format.txt Signed-off-by: Robert Hrusecky Signed-off-by: Omar Jamil Signed-off-by: Sachin Beldona Signed-off-by: Gabriel Mocanu Signed-off-by: Alexander Jung Reviewed-by: Simon Kuenzer Tested-by: Unikraft CI GitHub-Pull-Request: #179 --- diff --git a/lib/Makefile.uk b/lib/Makefile.uk index 10ae3da43..7748f378b 100644 --- a/lib/Makefile.uk +++ b/lib/Makefile.uk @@ -29,6 +29,7 @@ $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uklock)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/ukmpi)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/ukring)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/ukbus)) +$(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/ukcpio)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uksglist)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uknetdev)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uk9p)) diff --git a/lib/ukcpio/Config.uk b/lib/ukcpio/Config.uk new file mode 100644 index 000000000..6264ddf15 --- /dev/null +++ b/lib/ukcpio/Config.uk @@ -0,0 +1,10 @@ +config LIBUKCPIO + bool "ukcpio: CPIO archive extraction" + # We use `depends on` and not `select` for the option below to prevent + # recursive dependency between vfscore and ukcpio as vfscore has + # additional options todo with automatically mounting the desired + # filesystem and also initializing it (in the case of ramfs) with + # ukcpio. + depends on LIBVFSCORE + select LIBNOLIBC if !HAVE_LIBC + default n diff --git a/lib/ukcpio/Makefile.uk b/lib/ukcpio/Makefile.uk new file mode 100644 index 000000000..56ed68a76 --- /dev/null +++ b/lib/ukcpio/Makefile.uk @@ -0,0 +1,4 @@ +$(eval $(call addlib_s,libukcpio,$(CONFIG_LIBUKCPIO))) + +CINCLUDES-$(CONFIG_LIBUKCPIO) += -I$(LIBUKCPIO_BASE)/include +CXXINCLUDES-$(CONFIG_LIBUKCPIO) += -I$(LIBUKCPIO_BASE)/include diff --git a/lib/ukcpio/cpio.c b/lib/ukcpio/cpio.c new file mode 100644 index 000000000..e69de29bb diff --git a/lib/ukcpio/exportsyms.uk b/lib/ukcpio/exportsyms.uk new file mode 100644 index 000000000..e69de29bb diff --git a/lib/ukcpio/include/uk/cpio.h b/lib/ukcpio/include/uk/cpio.h new file mode 100644 index 000000000..e69de29bb