From patchwork Fri Jul 31 23:56:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 502768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id E1C811402A7 for ; Sat, 1 Aug 2015 09:57:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0348289FB0; Fri, 31 Jul 2015 23:57:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q6rV_abE3VBC; Fri, 31 Jul 2015 23:57:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 19FA089F5B; Fri, 31 Jul 2015 23:57:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A26D91C1F85 for ; Fri, 31 Jul 2015 23:57:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 98BC58AB79 for ; Fri, 31 Jul 2015 23:57:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EyZqRWdsxXJs for ; Fri, 31 Jul 2015 23:57:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id D599C8AB78 for ; Fri, 31 Jul 2015 23:57:10 +0000 (UTC) Received: by padck2 with SMTP id ck2so48123236pad.0 for ; Fri, 31 Jul 2015 16:57:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iN03QaUaryjmNWEaE/2u6MPSL2pQWc0+m+Szk7bO9zw=; b=FNGIRgB4gNgSZkW9u4bXY57VGeClFF+wPVpoyRLSNTldG7cAOQV9k4wkPIxN7aEgJB rvcx/LnWuqj+lXxhtKOr5nMjNSGJRlkjcUJDsNtYUx2QoILulWVIWXdAgiR48EJcSqS/ koqGla+gwPap/39C8IWBma2ga6tyga15afjLslaNFn5R/Z5lW89JuGdavJ+sGN0MtblV b4wTxnbTDQNfQOSPXU6dO9zDr9p92GIiAdWemJBTBrz68+H7iYeVJ/5zvLiyquHjYKcl FlPNFpOB6y9GkLbNgDVbQWaagi11161EDRN1xmqbf/6p6UqSldubbQrE4iX06xDBWxPg nmUA== X-Gm-Message-State: ALoCoQnOt2xDQ+OXzC2IYbUvD1LiUNLRlgJH8YE0RVvdO77tsLx8GU7toGNBs1ygJEhTvA9w4GSY X-Received: by 10.68.183.65 with SMTP id ek1mr431719pbc.8.1438387030349; Fri, 31 Jul 2015 16:57:10 -0700 (PDT) Received: from xflame.vonkarman.net ([64.145.76.194]) by smtp.gmail.com with ESMTPSA id xf6sm72597pbc.70.2015.07.31.16.57.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Jul 2015 16:57:08 -0700 (PDT) From: Christian Stewart To: buildroot@buildroot.org Date: Fri, 31 Jul 2015 16:56:56 -0700 Message-Id: <1438387017-10597-2-git-send-email-christian@paral.in> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438387017-10597-1-git-send-email-christian@paral.in> References: <1438387017-10597-1-git-send-email-christian@paral.in> Cc: Christian Stewart Subject: [Buildroot] [PATCH v1 2/3] aufs: new kernel extension. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Adding a kernel extension that patches the kernel with the correct version of aufs-standalone. This relies on the user ensuring the correct version is set in the configs. Signed-off-by: Christian Stewart --- linux/Config.ext.in | 54 ++++++++++++++++++++++++++++++++++++++ linux/linux-ext-aufs-standalone.mk | 23 ++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 linux/linux-ext-aufs-standalone.mk diff --git a/linux/Config.ext.in b/linux/Config.ext.in index ea79aa1..b6b48cf 100644 --- a/linux/Config.ext.in +++ b/linux/Config.ext.in @@ -62,4 +62,58 @@ config BR2_LINUX_KERNEL_EXT_FBTFT https://github.com/notro/fbtft +# aufs-standalone +config BR2_LINUX_KERNEL_EXT_AUFS_STANDALONE + bool "Aufs Filesystem Module patch" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_AUFS_STANDALONE + 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. + +comment "aufs needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +choice + prompt "aufs major version" + depends on BR2_LINUX_KERNEL_EXT_AUFS_STANDALONE + default BR2_PACKAGE_AUFS_4X if BR2_KERNEL_HEADERS_4_0 || BR2_KERNEL_HEADERS_4.1 + default BR2_PACKAGE_AUFS_3X if !(BR2_KERNEL_HEADERS_4_0 || BR2_KERNEL_HEADERS_4.1) + +config BR2_PACKAGE_AUFS_STANDALONE_4X + bool "4.x" + +config BR2_PACKAGE_AUFS_STANDALONE_3X + bool "3.x" + +endchoice + +# While we don't build from the kernel headers +# we can get a default value here +config BR2_PACKAGE_AUFS_STANDALONE_VERSION + string "aufs-standalone branch" + depends on BR2_LINUX_KERNEL_EXT_AUFS_STANDALONE + help + Aufs-standalone repository branch to use. Must match kernel version. + default "3.0" if BR2_KERNEL_HEADERS_3_0 + default "3.1" if BR2_KERNEL_HEADERS_3_2 || BR2_KERNEL_HEADERS_3_4 + default "3.10" if BR2_KERNEL_HEADERS_3_10 + default "3.11" if BR2_KERNEL_HEADERS_3_11 + default "3.12" if BR2_KERNEL_HEADERS_3_12 + default "3.13" if BR2_KERNEL_HEADERS_3_13 + default "3.14" if BR2_KERNEL_HEADERS_3_14 + default "3.15" if BR2_KERNEL_HEADERS_3_15 + default "3.16" if BR2_KERNEL_HEADERS_3_16 + default "3.17" if BR2_KERNEL_HEADERS_3_17 + default "3.18" if BR2_KERNEL_HEADERS_3_18 + default "3.19" if BR2_KERNEL_HEADERS_3_19 + default "4.0" if BR2_KERNEL_HEADERS_4_0 + default "4.1" if BR2_KERNEL_HEADERS_4_1 + endmenu diff --git a/linux/linux-ext-aufs-standalone.mk b/linux/linux-ext-aufs-standalone.mk new file mode 100644 index 0000000..4ef6d60 --- /dev/null +++ b/linux/linux-ext-aufs-standalone.mk @@ -0,0 +1,23 @@ +################################################################################ +# Linux Aufs extensions +# +# Patch the linux kernel with aufs extension +################################################################################ + +LINUX_EXTENSIONS += aufs-standalone + +define AUFS_STANDALONE_PREPARE_KERNEL + if test -d $(LINUX_DIR)/fs/aufs/; then \ + echo "Your kernel already supports AUFS. Not patching."; \ + else \ + $(APPLY_PATCHES) $(LINUX_DIR) $(AUFS_STANDALONE_SRCDIR) \ + $(AUFS_STANDALONE_MAJOR_VERSION)-kbuild.patch \ + $(AUFS_STANDALONE_MAJOR_VERSION)-base.patch \ + $(AUFS_STANDALONE_MAJOR_VERSION)-mmap.patch \ + $(AUFS_STANDALONE_MAJOR_VERSION)-standalone.patch ; \ + fi + cp $(AUFS_STANDALONE_SRCDIR)/Documentation/ABI/testing/* $(LINUX_DIR)/Documentation/ABI/testing/ + cp -r $(AUFS_STANDALONE_SRCDIR)/Documentation/filesystems/aufs/ $(LINUX_DIR)/Documentation/filesystems/aufs/ + cp -r $(AUFS_STANDALONE_SRCDIR)/fs/aufs/ $(LINUX_DIR)/fs/ + cp $(AUFS_STANDALONE_SRCDIR)/include/uapi/linux/aufs_type.h $(LINUX_DIR)/include/uapi/linux/ +endef