Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-28 Thread Zoltan HERPAI

Hi Nathaniel,

The AFS-related part is applied in r40587, thanks. The CIFS/NFS-related 
fscache change will be added separately later.


Regards,
-w-

nwf wrote:

Take three.  This time, I gave up on the dynamic support of fscache, preferring
to always have it compiled in and wired up as a dependency.  There's clearly
some intended ability to do dynamic dispatch in the makefiles here (see, e.g.,
the handling of CONFIG_OF), but I couldn't make it work for me here.  I think I
have all the requisite calls to subroutines, too.

I have a second patch below which turns on fscache support in the other exposed
network filesystems, namely NFS and CIFS, now that it's exposed.

Cheers,
--nwf;

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index dbeffa7..0df2fbc 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -277,6 +277,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc

+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -312,6 +323,16 @@ endef
 $(eval $(call KernelPackage,crypto-deflate))
 
 
+define KernelPackage/crypto-fcrypt

+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -429,7 +450,6 @@ define KernelPackage/crypto-misc
$(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) 
\
$(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
$(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index cd27e4a..5faaf37 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -7,6 +7,43 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-fscache

+  SUBMENU:=$(FS_MENU)
+  TITLE:=General filesystem local cache manager
+  DEPENDS:=
+  KCONFIG:=\
+   CONFIG_FSCACHE=m \
+   CONFIG_FSCACHE_STATS=y \
+   CONFIG_FSCACHE_HISTOGRAM=n \
+   CONFIG_FSCACHE_DEBUG=n \
+   CONFIG_FSCACHE_OBJECT_LIST=n \
+   CONFIG_CACHEFILES=y \
+   CONFIG_CACHEFILES_DEBUG=n \
+   CONFIG_CACHEFILES_HISTOGRAM=n
+  FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko
+  AUTOLOAD:=$(call AutoLoad,29,fscache)
+endef
+
+$(eval $(call KernelPackage,fs-fscache))
+
+define KernelPackage/fs-afs
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
+  KCONFIG:=\
+   CONFIG_AFS_FS=m \
+   CONFIG_AFS_DEBUG=n \
+   CONFIG_AFS_FSCACHE=y
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,30,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+$(eval $(call KernelPackage,fs-afs))
+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6f61630..fc85e22 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -938,3 +938,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver

+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   CONFIG_AF_RXRPC_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \
+   $(LINUX_DIR)/net/rxrpc/rxkad.ko
+  AUTOLOAD:=$(call AutoLoad,30,rxkad af-rxrpc)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-manager +kmod-crypto-pcbc 
+kmod-crypto-fcrypt
+endef
+
+define KernelPackage/rxrpc/description
+  Kernel support for AF_RXRPC; required for AFS client
+endef
+
+$(eval $(call KernelPackage,rxrpc))





diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index 5faaf37..dc8873b 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk

Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-27 Thread nwf
Take three.  This time, I gave up on the dynamic support of fscache, preferring
to always have it compiled in and wired up as a dependency.  There's clearly
some intended ability to do dynamic dispatch in the makefiles here (see, e.g.,
the handling of CONFIG_OF), but I couldn't make it work for me here.  I think I
have all the requisite calls to subroutines, too.

I have a second patch below which turns on fscache support in the other exposed
network filesystems, namely NFS and CIFS, now that it's exposed.

Cheers,
--nwf;

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index dbeffa7..0df2fbc 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -277,6 +277,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc
+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -312,6 +323,16 @@ endef
 $(eval $(call KernelPackage,crypto-deflate))
 
 
+define KernelPackage/crypto-fcrypt
+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -429,7 +450,6 @@ define KernelPackage/crypto-misc
$(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) 
\
$(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
$(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index cd27e4a..5faaf37 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -7,6 +7,43 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-fscache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=General filesystem local cache manager
+  DEPENDS:=
+  KCONFIG:=\
+   CONFIG_FSCACHE=m \
+   CONFIG_FSCACHE_STATS=y \
+   CONFIG_FSCACHE_HISTOGRAM=n \
+   CONFIG_FSCACHE_DEBUG=n \
+   CONFIG_FSCACHE_OBJECT_LIST=n \
+   CONFIG_CACHEFILES=y \
+   CONFIG_CACHEFILES_DEBUG=n \
+   CONFIG_CACHEFILES_HISTOGRAM=n
+  FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko
+  AUTOLOAD:=$(call AutoLoad,29,fscache)
+endef
+
+$(eval $(call KernelPackage,fs-fscache))
+
+define KernelPackage/fs-afs
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
+  KCONFIG:=\
+   CONFIG_AFS_FS=m \
+   CONFIG_AFS_DEBUG=n \
+   CONFIG_AFS_FSCACHE=y
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,30,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+$(eval $(call KernelPackage,fs-afs))
+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6f61630..fc85e22 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -938,3 +938,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   CONFIG_AF_RXRPC_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \
+   $(LINUX_DIR)/net/rxrpc/rxkad.ko
+  AUTOLOAD:=$(call AutoLoad,30,rxkad af-rxrpc)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-manager +kmod-crypto-pcbc 
+kmod-crypto-fcrypt
+endef
+
+define KernelPackage/rxrpc/description
+  Kernel support for AF_RXRPC; required for AFS client
+endef
+
+$(eval $(call KernelPackage,rxrpc))





diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index 5faaf37..dc8873b 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -85,11 +85,13 @@ define KernelPackage/fs-cifs
   KCONFIG:= \
CONFIG_CIFS \
CONFIG_CIFS_DFS_UPCALL=n \
-   CONFIG_CIFS_UPCALL=n
+   

Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-22 Thread Zoltan HERPAI

Hi Nathaniel,

nwf wrote:

Fixed; while here I took the liberty of making an FSCACHE option and splitting
out the AFS FSCACHE flag to its own knob.
  
Getting there, getting there - with the fscache splitted out, some 
tweaks are needed yet, comments inline.



diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index dbeffa7..0df2fbc 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -277,6 +277,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc

+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -312,6 +323,16 @@ endef
 $(eval $(call KernelPackage,crypto-deflate))
 
 
+define KernelPackage/crypto-fcrypt

+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -429,7 +450,6 @@ define KernelPackage/crypto-misc
$(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) 
\
$(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
$(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index cd27e4a..a25a3f0 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -7,6 +7,46 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-cache

+  SUBMENU:=$(FS_MENU)
+  TITLE:=General filesystem local cache manager
+  DEPENDS:=
+  KCONFIG:=CONFIG_FSCACHE=m
+  FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko
+  AUTOLOAD:=$(call AutoLoad,30,fscache)
+endef
  
You'll need an $(eval $(call KernelPackage,fs-cache)) here for this 
module to appear.


Also, with FSCACHE set, a couple config options appear which are missing:

FSCACHE_STATS
FSCACHE_HISTOGRAM
FSCACHE_DEBUG
FSCACHE_OBJECT_LIST
CACHEFILES

Not sure which one would be beneficial here and which one won't. If 
none, then we can add these into the generic configs.



+
+define KernelPackage/fs-afs
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver
+  KCONFIG:=\
+   CONFIG_AFS_FS=m \
+   CONFIG_AFS_DEBUG=n
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+define KernelPackage/fs-afs-fscache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client fscache support
+  DEPENDS:=+kmod-fs-afs
+  KCONFIG:=CONFIG_AFS_FSCACHE=y
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs-fscache/description
+  Add support for using fscache to the AFS client module.
+  This simply changes the way the module is built.
+endef
+
+$(eval $(call KernelPackage,fs-afs))
  

Same here, $(eval $(call KernelPackage,fs-afs-fscache)) is needed.

Also, both fs-afs and fs-afs-fscache are building the same kernel 
module, which is problematic. When fs-afs-fscache is selected, due to 
the dependency, the builder also tries to build the fs-afs package, 
where the dependency checker will spit out the missing dependency for 
fscache.ko . Not sure about a good solution here, probably a mutual 
excluding flag could solve the problem, something along the lines of the 
below, changed to match the package names.


usb.mk:  DEPENDS:=@(!LINUX_3_3!LINUX_3_6!LINUX_3_8!LINUX_3_9)


+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6f61630..fc85e22 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -938,3 +938,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver

+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   

Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-20 Thread nwf
On Thu, Apr 17, 2014 at 12:07:31AM +0200, Zoltan HERPAI wrote:
 Hi,
 
 nwf wrote:
  Salutations, list.  This patch adds configuration knobs for the in-kernel 
  kAFS
  client and its dependencies.  We have an AFS cell used for shared 
  configuration
  files and nightly snapshots of local state, and having our OpenWRT devices 
  be
  able to play along would be fantastic.  Hopefully I didn't break anything.
  Thoughts welcome!

 
 Can you please update the path package/kernel/modules to 
 package/kernel/linux/modules, update the fcrypt part (the crypto-misc 
 module list has slightly changed) and resubmit the patch as v2. Pending 
 these fixed, this looks good to get an ack.
 
 Thanks,
 Zoltan H

Fixed; while here I took the liberty of making an FSCACHE option and splitting
out the AFS FSCACHE flag to its own knob.

Signed-Off-By: Nathaniel Wesley Filardo 
8s9k8ugo5jgpi3u067229bbackmqi...@cmx.ietfng.org

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index dbeffa7..0df2fbc 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -277,6 +277,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc
+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -312,6 +323,16 @@ endef
 $(eval $(call KernelPackage,crypto-deflate))
 
 
+define KernelPackage/crypto-fcrypt
+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -429,7 +450,6 @@ define KernelPackage/crypto-misc
$(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) 
\
$(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
$(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index cd27e4a..a25a3f0 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -7,6 +7,46 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-cache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=General filesystem local cache manager
+  DEPENDS:=
+  KCONFIG:=CONFIG_FSCACHE=m
+  FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko
+  AUTOLOAD:=$(call AutoLoad,30,fscache)
+endef
+
+define KernelPackage/fs-afs
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver
+  KCONFIG:=\
+   CONFIG_AFS_FS=m \
+   CONFIG_AFS_DEBUG=n
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+define KernelPackage/fs-afs-fscache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client fscache support
+  DEPENDS:=+kmod-fs-afs
+  KCONFIG:=CONFIG_AFS_FSCACHE=y
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs-fscache/description
+  Add support for using fscache to the AFS client module.
+  This simply changes the way the module is built.
+endef
+
+$(eval $(call KernelPackage,fs-afs))
+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6f61630..fc85e22 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -938,3 +938,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   CONFIG_AF_RXRPC_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \
+   $(LINUX_DIR)/net/rxrpc/rxkad.ko
+  AUTOLOAD:=$(call AutoLoad,30,rxkad af-rxrpc)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-manager +kmod-crypto-pcbc 
+kmod-crypto-fcrypt
+endef
+
+define KernelPackage/rxrpc/description
+  

Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-16 Thread Zoltan HERPAI

Hi,

nwf wrote:

Salutations, list.  This patch adds configuration knobs for the in-kernel kAFS
client and its dependencies.  We have an AFS cell used for shared configuration
files and nightly snapshots of local state, and having our OpenWRT devices be
able to play along would be fantastic.  Hopefully I didn't break anything.
Thoughts welcome!
  


Can you please update the path package/kernel/modules to 
package/kernel/linux/modules, update the fcrypt part (the crypto-misc 
module list has slightly changed) and resubmit the patch as v2. Pending 
these fixed, this looks good to get an ack.


Thanks,
Zoltan H


diff --git a/package/kernel/modules/crypto.mk b/package/kernel/modules/crypto.mk
index 791b5a5..4664e4a 100644
--- a/package/kernel/modules/crypto.mk
+++ b/package/kernel/modules/crypto.mk
@@ -220,6 +220,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc

+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -252,6 +263,16 @@ endef
 
 $(eval $(call KernelPackage,crypto-deflate))
 
+define KernelPackage/crypto-fcrypt

+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -350,7 +371,6 @@ define KernelPackage/crypto-misc
$(LINUX_DIR)/crypto/camellia.ko \
$(LINUX_DIR)/crypto/cast5.ko \
$(LINUX_DIR)/crypto/cast6.ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha256_generic.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
diff --git a/package/kernel/modules/fs.mk b/package/kernel/modules/fs.mk
index f1853f7..dc350d0 100644
--- a/package/kernel/modules/fs.mk
+++ b/package/kernel/modules/fs.mk
@@ -7,6 +7,24 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-afs

+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver
+  KCONFIG:=\
+   CONFIG_AFS_FS \
+   CONFIG_AFS_FSCACHE=y \
+   CONFIG_AFS_DEBUG=n
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+$(eval $(call KernelPackage,fs-afs))
+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/modules/netsupport.mk 
b/package/kernel/modules/netsupport.mk
index b4e2a42..36cb4af 100644
--- a/package/kernel/modules/netsupport.mk
+++ b/package/kernel/modules/netsupport.mk
@@ -863,3 +863,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver

+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   CONFIG_AF_RXRPC_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \
+   $(LINUX_DIR)/net/rxrpc/rxkad.ko
+  AUTOLOAD:=$(call AutoLoad,30,rxkad af-rxrpc)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-manager +kmod-crypto-pcbc 
+kmod-crypto-fcrypt
+endef
+
+define KernelPackage/rxrpc/description
+  Kernel support for AF_RXRPC; required for AFS client
+endef
+
+$(eval $(call KernelPackage,rxrpc))

  



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
  

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel