kernel: add plan 9 fs package
authorMatteo Croce <matteo.croce@canonical.com>
Wed, 22 Jun 2016 13:15:10 +0000 (15:15 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 11 Aug 2016 08:45:33 +0000 (10:45 +0200)
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@canonical.com>
include/target.mk
package/kernel/linux/modules/fs.mk
package/kernel/linux/modules/netsupport.mk
scripts/target-metadata.pl
target/Config.in

index 7fe48ecbe3a2f460cb5db4f9ed5b9638d383c43f..8b94959bc0350c28d89652511c98ce3ab3bec460 100644 (file)
@@ -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
index 52fa47a68b99abf29d7d8e20f7c18452dc9f1151..e8e1f80da0d43d72e084816203120a60676de960 100644 (file)
@@ -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
index cf1de6a8941e8c668b4995ea5f2fbb0f7a6bc144..c68be90ad2437ff70588219970dda6ce535f54ab 100644 (file)
@@ -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))
index 7e7d26bac93147f2652abd549509269b29362174..a7239166f7b1ffb5d411bafeedc0b79d33d1373d 100755 (executable)
@@ -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;
 }
index ee928143ffd508a876a2cc792eceff40764f5d4d..9ff7096880141f04ddd0dde98d0c0b92ca30f138 100644 (file)
@@ -92,6 +92,9 @@ config NAND_SUPPORT
 config ARCH_64BIT
        bool
 
+config VIRTIO_SUPPORT
+       bool
+
 # Architecture selection
 
 config aarch64