aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorGravatar Christian Stewart <christian@paral.in>2016-07-17 14:50:37 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-09-20 19:03:46 +0200
commit010588c1e169843bdca35c71789a16d0b6829bcb (patch)
tree87e398418a1d2b5061cf0dc8a8d6bd0721de28bf /linux
parentc4f453fd7e84617bd2082ebff0cdb526b6afd952 (diff)
downloadbuildroot-010588c1e169843bdca35c71789a16d0b6829bcb.tar.gz
buildroot-010588c1e169843bdca35c71789a16d0b6829bcb.tar.bz2
aufs: new kernel extension
Signed-off-by: Christian Stewart <christian@paral.in> [Atul: - Removed the duplicate conditional block. - Updated the license to GPLv2. - Removed the visibilty of package from menuconfig. - Removed dependencies. - Removed the comment. - Changed the name of variable from BR2_PACKAGE_AUFS_STANDALONE_VERSION to BR2_LINUX_KERNEL_EXT_AUFS_VERSION. - Removed the AUFS_INSTALL_STAGING and AUFS_INSTALL_TARGET variables. - Removed the BR2_PACKAGE_AUFS_3X and BR2_PACKAGE_AUFS_4X variables.] Signed-off-by: Atul Singh <atul.singh.mandla@rockwellcollins.com> [yann.morin.1998@free.fr: - do not fail on version check if aufs ext is disabled - check for empty version - squash aufs package and linux extension in one patch - fail if the kernel already has aufs support - simplify handling of version] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> [Thomas: - Fix the apply patch logic, it was using a non-existent AUFS_VERSION_MAJOR variable. BR2_PACKAGE_AUFS_SERIES is used instead.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/Config.ext.in52
-rw-r--r--linux/linux-ext-aufs.mk21
2 files changed, 73 insertions, 0 deletions
diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index da1ebd26bc..5d5e7efbca 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -66,4 +66,56 @@ config BR2_LINUX_KERNEL_EXT_FBTFT
https://github.com/notro/fbtft
+# aufs-standalone
+config BR2_LINUX_KERNEL_EXT_AUFS
+ bool "Aufs Filesystem Module patch"
+ select BR2_PACKAGE_AUFS
+ help
+ Aufs is split in two parts: a kernel part and a userspace
+ part. Enabling this option automatically selects the aufs
+ standalone (module) package and patches the Linux kernel
+ built by Buildroot with the aufs kernel part (ie fs/aufs).
+
+ It is important to use the correct branch of aufs-standalone.
+
+if BR2_LINUX_KERNEL_EXT_AUFS
+
+choice
+ bool "aufs-standalone series"
+ help
+ Select the major series of this version. This must match the
+ major version of your kernel (e.g. for kernels 3.x, select
+ aufs3.x; for kernels 4.x, select aufs4.x).
+
+ Note: neither aufs1.x nor aufs2.x (both for kernels older than
+ 3.x) are supported.
+
+config BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3
+ bool "aufs3.x"
+
+config BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4
+ bool "aufs4.x"
+
+endchoice
+
+config BR2_LINUX_KERNEL_EXT_AUFS_SERIES
+ int
+ default 3 if BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3
+ default 4 if BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4
+
+config BR2_LINUX_KERNEL_EXT_AUFS_VERSION
+ string "aufs-standalone version"
+ default ""
+ help
+ The version you choose must match that of your kernel. Usually,
+ the sha1 of the cset you want to use; avoid using a branch name
+ as this yields non-reproducible builds.
+
+ See the following resources to see what versions are available:
+
+ For aufs3.x: https://sourceforge.net/p/aufs/aufs3-standalone/ref/master/branches/
+ For aufs4.x: https://github.com/sfjro/aufs4-standalone/branches/all
+
+endif # aufs
+
endmenu
diff --git a/linux/linux-ext-aufs.mk b/linux/linux-ext-aufs.mk
new file mode 100644
index 0000000000..fb2f3560a7
--- /dev/null
+++ b/linux/linux-ext-aufs.mk
@@ -0,0 +1,21 @@
+################################################################################
+# Linux Aufs extensions
+#
+# Patch the linux kernel with aufs extension
+################################################################################
+
+LINUX_EXTENSIONS += aufs
+
+define AUFS_PREPARE_KERNEL
+ if test -d $(@D)/fs/aufs/; then \
+ echo "Your kernel already supports AUFS."; \
+ exit 1; \
+ fi
+ $(APPLY_PATCHES) $(@D) $(AUFS_DIR) \
+ aufs$(BR2_PACKAGE_AUFS_SERIES)-kbuild.patch \
+ aufs$(BR2_PACKAGE_AUFS_SERIES)-base.patch \
+ aufs$(BR2_PACKAGE_AUFS_SERIES)-mmap.patch \
+ aufs$(BR2_PACKAGE_AUFS_SERIES)-standalone.patch
+ cp -r $(AUFS_DIR)/fs/aufs/ $(@D)/fs/
+ cp $(AUFS_DIR)/include/uapi/linux/aufs_type.h $(@D)/include/uapi/linux/
+endef