[source] kernel: add plan 9 fs package

LEDE Commits lede-commits at lists.infradead.org
Thu Aug 11 01:45:41 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=1645abffea2785653de27d92ba0e977d1f32a538

commit 1645abffea2785653de27d92ba0e977d1f32a538
Author: Matteo Croce <matteo.croce at canonical.com>
AuthorDate: Wed Jun 22 15:15:10 2016 +0200

    kernel: add plan 9 fs package
    
    9pfs is used by kvm to share files between host and guest,
    add proper config option to enable it.
    
    Signed-off-by: Matteo Croce <matteo.croce at canonical.com>
---
 include/target.mk                          |  3 +++
 package/kernel/linux/modules/fs.mk         | 18 ++++++++++++++++++
 package/kernel/linux/modules/netsupport.mk | 21 +++++++++++++++++++++
 scripts/target-metadata.pl                 |  1 +
 target/Config.in                           |  3 +++
 5 files changed, 46 insertions(+)

diff --git a/include/target.mk b/include/target.mk
index 7fe48ec..8b94959 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -257,6 +257,9 @@ ifeq ($(DUMP),1)
     ifneq ($(CONFIG_RTC_CLASS),)
       FEATURES += rtc
     endif
+    ifneq ($(CONFIG_VIRTIO),)
+      FEATURES += virtio
+    endif
     FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
 
     # remove duplicates
diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index 52fa47a..e8e1f80 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -26,6 +26,24 @@ endef
 
 $(eval $(call KernelPackage,fs-fscache))
 
+define KernelPackage/fs-9p
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Plan 9 Resource Sharing Support
+  DEPENDS:=+kmod-9pnet
+  KCONFIG:=\
+	CONFIG_9P_FS \
+	CONFIG_9P_FS_POSIX_ACL=n \
+	CONFIG_9P_FS_SECURITY=n
+  FILES:=$(LINUX_DIR)/fs/9p/9p.ko
+  AUTOLOAD:=$(call AutoLoad,30,9p)
+endef
+
+define KernelPackage/fs-9p/description
+  Kernel module for Plan 9 Resource Sharing Support support
+endef
+
+$(eval $(call KernelPackage,fs-9p))
+
 define KernelPackage/fs-afs
   SUBMENU:=$(FS_MENU)
   TITLE:=Andrew FileSystem client
diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index cf1de6a..c68be90 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -1015,3 +1015,24 @@ define KernelPackage/mpls/description
 endef
 
 $(eval $(call KernelPackage,mpls))
+
+define KernelPackage/9pnet
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Plan 9 Resource Sharing Support (9P2000)
+  DEPENDS:=@VIRTIO_SUPPORT
+  KCONFIG:= \
+	CONFIG_NET_9P \
+	CONFIG_NET_9P_DEBUG=n \
+	CONFIG_NET_9P_VIRTIO
+  FILES:= \
+	$(LINUX_DIR)/net/9p/9pnet.ko \
+	$(LINUX_DIR)/net/9p/9pnet_virtio.ko
+  AUTOLOAD:=$(call AutoLoad,29,9pnet 9pnet_virtio)
+endef
+
+define KernelPackage/9pnet/description
+  Kernel support support for
+  Plan 9 resource sharing via the 9P2000 protocol.
+endef
+
+$(eval $(call KernelPackage,9pnet))
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 7e7d26b..a723916 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -39,6 +39,7 @@ sub target_config_features(@) {
 		/low_mem/ and $ret .= "\tselect LOW_MEMORY_FOOTPRINT\n";
 		/small_flash/ and $ret .= "\tselect SMALL_FLASH\n";
 		/nand/ and $ret .= "\tselect NAND_SUPPORT\n";
+		/virtio/ and $ret .= "\tselect VIRTIO_SUPPORT\n";
 	}
 	return $ret;
 }
diff --git a/target/Config.in b/target/Config.in
index ee92814..9ff7096 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -92,6 +92,9 @@ config NAND_SUPPORT
 config ARCH_64BIT
 	bool
 
+config VIRTIO_SUPPORT
+	bool
+
 # Architecture selection
 
 config aarch64



More information about the lede-commits mailing list