[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 3/5] lib/cpio: Create empty CPIO extraction library
This patch looks fine. I would prefer calling the library ukcpio instead of cpio because you put the headers under the uk/ namespace (which I agree actually). You should also introduce the Config.uk with this patch since this part of the skeleton. On 28.01.20 05:02, Robert Hrusecky wrote: 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 <roberth@xxxxxxxxxxxxx> Signed-off-by: Omar Jamil <omarj2898@xxxxxxxxx> Signed-off-by: Sachin Beldona <sachinbeldona@xxxxxxxxxx> --- lib/Makefile.uk | 1 + lib/cpio/Makefile.uk | 7 +++++++ lib/cpio/cpio.c | 0 lib/cpio/exportsyms.uk | 1 + lib/cpio/include/uk/cpio.h | 0 5 files changed, 9 insertions(+) create mode 100644 lib/cpio/Makefile.uk create mode 100644 lib/cpio/cpio.c create mode 100644 lib/cpio/exportsyms.uk create mode 100644 lib/cpio/include/uk/cpio.h diff --git a/lib/Makefile.uk b/lib/Makefile.uk index aa7e730..1503e73 100644 --- a/lib/Makefile.uk +++ b/lib/Makefile.uk @@ -20,6 +20,7 @@ $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/fdt)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/syscall_shim)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/vfscore)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/ramfs)) +$(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/cpio)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/devfs)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/9pfs)) $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uklock)) diff --git a/lib/cpio/Makefile.uk b/lib/cpio/Makefile.uk new file mode 100644 index 0000000..c3411bf --- /dev/null +++ b/lib/cpio/Makefile.uk @@ -0,0 +1,7 @@ When you call it ukcpio, the library is called libukcpio (instead of libcpio). The variables name prefix need to be changed to LIBUKCPIO (from LIBCPIO). +$(eval $(call addlib_s,libcpio,$(CONFIG_LIBCPIO))) + +# LIBCPIO_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type + +CINCLUDES-$(CONFIG_LIBCPIO) += -I$(LIBCPIO_BASE)/include +CXXINCLUDES-$(CONFIG_LIBCPIO) += -I$(LIBCPIO_BASE)/include +LIBCPIO_SRCS-y += $(LIBCPIO_BASE)/cpio.c > diff --git a/lib/cpio/cpio.c b/lib/cpio/cpio.c new file mode 100644 index 0000000..e69de29 diff --git a/lib/cpio/exportsyms.uk b/lib/cpio/exportsyms.uk new file mode 100644 index 0000000..b0047fa --- /dev/null +++ b/lib/cpio/exportsyms.uk @@ -0,0 +1 @@ +None diff --git a/lib/cpio/include/uk/cpio.h b/lib/cpio/include/uk/cpio.h new file mode 100644 index 0000000..e69de29 For the Config.uk, do: +config LIBUKCPIO + bool "ukcpio: CPIO archive extraction" + depends on LIBVFSCORE + default nWe use the "depends on" because we will later select the library from vfscore when archive extraction for a root ramfs is selected (see comments on patch 5). Having a "select" here would cause a circular dependency that KConfig unfortunately can't handle. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |