All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/3] aufs-util: new package
@ 2016-03-24  6:32 Atul Singh
  2016-03-26 20:31 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Atul Singh @ 2016-03-24  6:32 UTC (permalink / raw)
  To: buildroot

From: Christian Stewart <christian@paral.in>

Adding the aufs-util utilities. Uses the linux header version settings
to guess the correct version of aufs-util but ultimately relies on the
user to enter the correct version of aufs-util to use.

Signed-off-by: Atul Singh <atul.singh.mandla@rockwellcollins.com>
---
 package/Config.in              |  1 +
 package/aufs-util/Config.in    | 36 ++++++++++++++++++++++++++++++++++++
 package/aufs-util/aufs-util.mk | 31 +++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 package/aufs-util/Config.in
 create mode 100644 package/aufs-util/aufs-util.mk

diff --git a/package/Config.in b/package/Config.in
index 54166b1..b43a46d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -161,6 +161,7 @@ endmenu
 
 menu "Filesystem and flash utilities"
 	source "package/aufs/Config.in"
+	source "package/aufs-util/Config.in"
 	source "package/autofs/Config.in"
 	source "package/btrfs-progs/Config.in"
 	source "package/cifs-utils/Config.in"
diff --git a/package/aufs-util/Config.in b/package/aufs-util/Config.in
new file mode 100644
index 0000000..8d4bae0
--- /dev/null
+++ b/package/aufs-util/Config.in
@@ -0,0 +1,36 @@
+comment "aufs-util needs a linux kernel"
+	depends on BR2_USE_MMU
+	depends on !BR2_LINUX_KERNEL
+
+comment "aufs-util needs a toolchain w/ threads"
+	depends on BR2_USE_MMU
+	depends on BR2_LINUX_KERNEL
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_AUFS_UTIL
+	bool "aufs-util"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LINUX_KERNEL
+	depends on BR2_PACKAGE_AUFS
+	help
+	  Aufs command line utilities.
+	  Needs a kernel with aufs support. A kernel
+	  extension package is available.
+
+	  http://sourceforge.net/p/aufs/aufs-util/
+
+if BR2_PACKAGE_AUFS_UTIL
+
+config BR2_PACKAGE_AUFS_UTIL_VERSION
+	string "aufs-util branch"
+	default "see_help_to define_this"
+	help
+	  Aufs-util repository branch must be selected and
+	  match the current kernel version.  Review the
+	  following page to determine what branch number
+	  is valid.
+
+	  https://sourceforge.net/p/aufs/aufs-util/ci/master/tree/
+
+endif
diff --git a/package/aufs-util/aufs-util.mk b/package/aufs-util/aufs-util.mk
new file mode 100644
index 0000000..e181548
--- /dev/null
+++ b/package/aufs-util/aufs-util.mk
@@ -0,0 +1,31 @@
+################################################################################
+#
+# aufs-util
+#
+################################################################################
+
+# linux-headers
+AUFS_UTIL_VERSION = aufs$(call qstrip,$(BR2_PACKAGE_AUFS_UTIL_VERSION))
+AUFS_UTIL_SITE = http://git.code.sf.net/p/aufs/aufs-util
+AUFS_UTIL_SITE_METHOD = git
+AUFS_UTIL_DEPENDENCIES = linux
+AUFS_UTIL_LICENSE = GNU
+AUFS_UTIL_LICENSE_FILES = COPYING
+
+# Slight hack for a bug with aufsmvdown
+# Remove user setting from install command
+define AUFS_UTIL_CONFIGURE_CMDS
+	$(SED) 's/\.a\[/\.stbr\[/g' $(@D)/aumvdown.c
+	$(SED) 's/\-o root \-g root //g' $(@D)/Makefile
+endef
+
+define AUFS_UTIL_BUILD_CMDS
+	$(MAKE) -C $(LINUX_BUILDDIR) headers_install
+	$(MAKE) -C $(@D) CPPFLAGS="-I $(LINUX_BUILDDIR)/usr/include/" HOSTCC="$(CC)" HOSTLD="$(LD)" INSTALL="$(INSTALL)" all
+endef
+
+define AUFS_UTIL_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) INSTALL="$(INSTALL)" DESTDIR="$(TARGET_DIR)" install
+endef
+
+$(eval $(generic-package))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/3] aufs-util: new package
  2016-03-24  6:32 [Buildroot] [PATCH 2/3] aufs-util: new package Atul Singh
@ 2016-03-26 20:31 ` Thomas Petazzoni
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2016-03-26 20:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 24 Mar 2016 12:02:30 +0530, Atul Singh wrote:
> From: Christian Stewart <christian@paral.in>
> 
> Adding the aufs-util utilities. Uses the linux header version settings
> to guess the correct version of aufs-util but ultimately relies on the
> user to enter the correct version of aufs-util to use.
> 
> Signed-off-by: Atul Singh <atul.singh.mandla@rockwellcollins.com>

Same Signed-off-by comment.

> +if BR2_PACKAGE_AUFS_UTIL
> +
> +config BR2_PACKAGE_AUFS_UTIL_VERSION
> +	string "aufs-util branch"
> +	default "see_help_to define_this"

Leave the default to empty.

> +	help
> +	  Aufs-util repository branch must be selected and
> +	  match the current kernel version.  Review the
> +	  following page to determine what branch number
> +	  is valid.
> +
> +	  https://sourceforge.net/p/aufs/aufs-util/ci/master/tree/
> +
> +endif
> diff --git a/package/aufs-util/aufs-util.mk b/package/aufs-util/aufs-util.mk
> new file mode 100644
> index 0000000..e181548
> --- /dev/null
> +++ b/package/aufs-util/aufs-util.mk
> @@ -0,0 +1,31 @@
> +################################################################################
> +#
> +# aufs-util
> +#
> +################################################################################
> +
> +# linux-headers

What does this comment mean?

> +AUFS_UTIL_VERSION = aufs$(call qstrip,$(BR2_PACKAGE_AUFS_UTIL_VERSION))
> +AUFS_UTIL_SITE = http://git.code.sf.net/p/aufs/aufs-util
> +AUFS_UTIL_SITE_METHOD = git
> +AUFS_UTIL_DEPENDENCIES = linux
> +AUFS_UTIL_LICENSE = GNU

This is not a correct license.

> +AUFS_UTIL_LICENSE_FILES = COPYING
> +
> +# Slight hack for a bug with aufsmvdown
> +# Remove user setting from install command
> +define AUFS_UTIL_CONFIGURE_CMDS
> +	$(SED) 's/\.a\[/\.stbr\[/g' $(@D)/aumvdown.c
> +	$(SED) 's/\-o root \-g root //g' $(@D)/Makefile
> +endef

Please use patches to fix those problems, not some horrible SED
commands.

> +define AUFS_UTIL_BUILD_CMDS
> +	$(MAKE) -C $(LINUX_BUILDDIR) headers_install

This is clearly not acceptable, you cannot invoke Linux's
headers_install target from here.

Indeed, the problem is that aufs-util need the aufs-specific kernel
headers to build. And to be honest, I am not sure how to handle that
properly. I believe the easiest is to simply add
-I$(LINUX_DIR)/include/uapi/ to the CFLAGS when building aufs-util. We
already do something like that in
package/freescale-imx/imx-lib/imx-lib.mk:

        -I$(LINUX_DIR)/drivers/mxc/security/rng/include \
        -I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
        -idirafter $(LINUX_DIR)/include/uapi

> +	$(MAKE) -C $(@D) CPPFLAGS="-I $(LINUX_BUILDDIR)/usr/include/" HOSTCC="$(CC)" HOSTLD="$(LD)" INSTALL="$(INSTALL)" all

CC and LD are not defined by Buildroot. Also, with this invocation, all
aufs-util binaries are built for the host machine, not for the target,
which is most likely wrong.

Please make sure that the binaries that are produced are indeed built
with the cross-compiler, for the target architecture.

Could you rework those patches to take into account the comments?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/3] aufs-util: new package
  2015-07-14 18:42 [Buildroot] [PATCH 1/3] golang: " Christian Stewart
@ 2015-07-14 18:42 ` Christian Stewart
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Stewart @ 2015-07-14 18:42 UTC (permalink / raw)
  To: buildroot

This compiles aufs-util, built for recent kernels.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/Config.in              |  1 +
 package/aufs-util/Config.in    |  6 ++++++
 package/aufs-util/aufs-util.mk | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 package/aufs-util/Config.in
 create mode 100644 package/aufs-util/aufs-util.mk

diff --git a/package/Config.in b/package/Config.in
index b49c94f..5500564 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -149,6 +149,7 @@ endif
 endmenu
 
 menu "Filesystem and flash utilities"
+	source "package/aufs-util/Config.in"
 	source "package/btrfs-progs/Config.in"
 	source "package/cifs-utils/Config.in"
 	source "package/cramfs/Config.in"
diff --git a/package/aufs-util/Config.in b/package/aufs-util/Config.in
new file mode 100644
index 0000000..1afb79b
--- /dev/null
+++ b/package/aufs-util/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_AUFS_UTIL
+	bool "aufs-util"
+	help
+	  Aufs command line utilities.
+
+	  http://sourceforge.net/p/aufs/aufs-util/
diff --git a/package/aufs-util/aufs-util.mk b/package/aufs-util/aufs-util.mk
new file mode 100644
index 0000000..81e7efb
--- /dev/null
+++ b/package/aufs-util/aufs-util.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# aufs-util
+#
+################################################################################
+
+
+# Version depends on the kernel version.
+# todo: find an effective way of detecting the right version to use
+AUFS_UTIL_VERSION = a25c0d434889cab53df62fc0a6f9e9d679470990
+AUFS_UTIL_DEPENDENCIES = linux linux-headers
+AUFS_UTIL_SITE = $(call github,morfoh,aufs-util,$(AUFS_UTIL_VERSION))
+AUFS_UTIL_LICENSE = GNU
+AUFS_UTIL_INSTALL_STAGING = NO
+AUFS_UTIL_INSTALL_TARGET = YES
+
+# Slight hack for a bug with aufsmvdown
+# Remove user setting from install command
+define AUFS_UTIL_CONFIGURE_CMDS
+	$(SED) 's/\.a\[/\.stbr\[/g' $(@D)/aumvdown.c
+	$(SED) 's/\-o root \-g root //g' $(@D)/Makefile
+endef
+
+define AUFS_UTIL_BUILD_CMDS
+	$(MAKE) -C $(LINUX_BUILDDIR) headers_install
+	$(MAKE) -C $(@D) CPPFLAGS="-I $(LINUX_BUILDDIR)/usr/include/" HOSTCC="$(CC)" HOSTLD="$(LD)" INSTALL="$(INSTALL)" all
+endef
+
+define AUFS_UTIL_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) INSTALL="$(INSTALL)" DESTDIR="$(TARGET_DIR)" install
+endef
+
+$(eval $(generic-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-26 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24  6:32 [Buildroot] [PATCH 2/3] aufs-util: new package Atul Singh
2016-03-26 20:31 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2015-07-14 18:42 [Buildroot] [PATCH 1/3] golang: " Christian Stewart
2015-07-14 18:42 ` [Buildroot] [PATCH 2/3] aufs-util: " Christian Stewart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.