aufs-util: new package
PATCH 2/3 aufs-util: new package
From: Christian Stewart <[email protected]>
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.
--- 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
package/Config.in +1 -0
@@ -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"
package/aufs-util/Config.in new file +36 -0
@@ -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
package/aufs-util/aufs-util.mk new file +31 -0
@@ -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))
Signature · 1 line
2.5.0
PATCH 2/3 aufs-util: new package
Hello,
Quoted 7 lines · Atul Singh
From: Christian Stewart <[email protected]>
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 <[email protected]>
Same Signed-off-by comment.
package/aufs-util/Config.in line 27
Quoted 5 lines
package/aufs-util/Config.in new file +5
-0+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.
Quoted 15 lines
package/aufs-util/Config.in new file +9
-0+ 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/ + +endifpackage/aufs-util/aufs-util.mk new file +0
-0
package/aufs-util/aufs-util.mk line 7
Quoted 7 lines
package/aufs-util/aufs-util.mk new file +7
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# aufs-util +# +################################################################################ + +# linux-headers
What does this comment mean?
package/aufs-util/aufs-util.mk line 12
Quoted 5 lines
package/aufs-util/aufs-util.mk new file +5
-0+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.
package/aufs-util/aufs-util.mk line 20
Quoted 8 lines
package/aufs-util/aufs-util.mk new file +8
-0+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.
package/aufs-util/aufs-util.mk line 23
Quoted 2 lines
package/aufs-util/aufs-util.mk new file +2
-0+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/uapipackage/aufs-util/aufs-util.mk line 24
Quoted 1 line
package/aufs-util/aufs-util.mk new file +1
-0+ $(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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com