summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-08-11 23:45:56 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-08-11 23:46:36 +0200
commit72fecb4f085d15a6a86ab32ccccbbbb574d9d5db (patch)
tree6ed8c350d24c0342bdc2de7fb9b198b03e2a15e6
parent5e8e7a2fcf691769c4425769cf8804be59d70a13 (diff)
downloadembtoolkit-72fecb4f085d15a6a86ab32ccccbbbb574d9d5db.tar.gz
embtoolkit-72fecb4f085d15a6a86ab32ccccbbbb574d9d5db.tar.bz2
embtoolkit-72fecb4f085d15a6a86ab32ccccbbbb574d9d5db.tar.xz
Packages: New add util-linux-ng-2.18 (only libuuid used)
This patch adds util-linux-ng, but only its libuuid is used as busybox includes most of its features. Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--packages/system/system.kconfig3
-rw-r--r--packages/system/system.mk3
-rw-r--r--packages/system/utillinuxng/utillinuxng.kconfig56
-rw-r--r--packages/system/utillinuxng/utillinuxng.mk179
4 files changed, 241 insertions, 0 deletions
diff --git a/packages/system/system.kconfig b/packages/system/system.kconfig
index c75f62c..8983241 100644
--- a/packages/system/system.kconfig
+++ b/packages/system/system.kconfig
@@ -23,5 +23,8 @@
# \date July 2010
################################################################################
+#DBUS
source packages/system/dbus/dbus.kconfig
+#util-linux-ng
+source packages/system/utillinuxng/utillinuxng.kconfig
diff --git a/packages/system/system.mk b/packages/system/system.mk
index 18b5f20..a847c6e 100644
--- a/packages/system/system.mk
+++ b/packages/system/system.mk
@@ -28,3 +28,6 @@ include $(EMBTK_ROOT)/packages/system/dbus/dbus.mk
ROOTFS_COMPONENTS_CLEAN += dbus_clean
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_DBUS) += dbus_install
+#util-linux-ng
+include $(EMBTK_ROOT)/packages/system/utillinuxng/utillinuxng.mk
+ROOTFS_COMPONENTS_CLEAN += utillinuxng_clean
diff --git a/packages/system/utillinuxng/utillinuxng.kconfig b/packages/system/utillinuxng/utillinuxng.kconfig
new file mode 100644
index 0000000..344dffe
--- /dev/null
+++ b/packages/system/utillinuxng/utillinuxng.kconfig
@@ -0,0 +1,56 @@
+################################################################################
+# Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file utillinuxng.kconfig
+# \brief utillinuxng.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date August 2010
+################################################################################
+
+config EMBTK_HAVE_UTILLINUXNG
+ bool "Have util-linux-ng"
+ help
+ The util-linux-ng is a fork of the original util-linux project.
+ The goal of the util-linux-ng is a transparent and reliable
+ development that follows the Linux kernel and Linux
+ distributions.
+ NOTE:
+ util-linux-ng is only used to have its libuuid, as many of its
+ features are already in busybox.
+choice
+ prompt "util-linux-ng version you wish"
+ depends on EMBTK_HAVE_UTILLINUXNG
+ help
+ Here you can choose which version of util-linux-ng you want to
+ use.
+
+ config EMBTK_UTILLINUXNG_VERSION_2_18
+ bool "util-linux-ng-2.18"
+endchoice
+
+config EMBTK_UTILLINUXNG_MAJOR_VERSION_STRING
+ string
+ default "v2.18" if EMBTK_UTILLINUXNG_VERSION_2_18
+
+config EMBTK_UTILLINUXNG_VERSION_STRING
+ string
+ default "2.18" if EMBTK_UTILLINUXNG_VERSION_2_18
+
+config EMBTK_UTILLINUXNG_NEED_PATCH
+ bool
diff --git a/packages/system/utillinuxng/utillinuxng.mk b/packages/system/utillinuxng/utillinuxng.mk
new file mode 100644
index 0000000..d9ced4b
--- /dev/null
+++ b/packages/system/utillinuxng/utillinuxng.mk
@@ -0,0 +1,179 @@
+################################################################################
+# Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file utillinuxng.mk
+# \brief utillinuxng.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date August 2010
+################################################################################
+
+UTILLINUXNG_MAJOR_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_UTILLINUXNG_MAJOR_VERSION_STRING)))
+UTILLINUXNG_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_UTILLINUXNG_VERSION_STRING)))
+UTILLINUXNG_SITE := ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/$(UTILLINUXNG_MAJOR_VERSION)
+UTILLINUXNG_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/util-linux-ng/$(UTILLINUXNG_VERSION)
+UTILLINUXNG_PACKAGE := util-linux-ng-$(UTILLINUXNG_VERSION).tar.bz2
+UTILLINUXNG_BUILD_DIR := $(PACKAGES_BUILD)/util-linux-ng-$(UTILLINUXNG_VERSION)
+UTILLINUXNG_HOST_BUILD_DIR := $(TOOLS_BUILD)/util-linux-ng-$(UTILLINUXNG_VERSION)
+
+################################
+# util-linux-ng for the target #
+################################
+
+UTILLINUXNG_BINS =
+UTILLINUXNG_SBINS =
+UTILLINUXNG_INCLUDES = uuid
+UTILLINUXNG_LIBS = libuuid.*
+UTILLINUXNG_PKGCONFIGS = uuid.pc
+
+UTILLINUXNG_CONFIGURE_OPTS := --without-audit --without-selinux \
+ --without-pam --without-slang --without-ncurses \
+ --disable-makeinstall-setuid --disable-makeinstall-chown \
+ --disable-use-tty-group --disable-require-password --disable-pg-bell \
+ --disable-login-stat-mail --disable-login-chown-vcs \
+ --disable-chsh-only-listed --disable-write --disable-wall \
+ --disable-schedutils --disable-login-utils --disable-reset \
+ --disable-rename --disable-raw --disable-partx --disable-mesg \
+ --disable-last --disable-kill --disable-init --disable-elvtune \
+ --disable-unshare --disable-fallocate --disable-pivot_root \
+ --disable-switch_root --disable-cramfs --disable-agetty \
+ --disable-arch --disable-rpath --disable-nls --disable-libmount \
+ --disable-libblkid --disable-uuidd --enable-libuuid --disable-fsck \
+ --disable-mount --disable-tls
+
+UTILLINUXNG_DEPS =
+
+utillinuxng_install: $(UTILLINUXNG_BUILD_DIR)/.installed
+
+$(UTILLINUXNG_BUILD_DIR)/.installed: $(UTILLINUXNG_DEPS) download_utillinuxng \
+ $(UTILLINUXNG_BUILD_DIR)/.decompressed \
+ $(UTILLINUXNG_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ util-linux-ng-$(UTILLINUXNG_VERSION) in your root filesystem...")
+ $(call EMBTK_KILL_LT_RPATH,$(UTILLINUXNG_BUILD_DIR))
+ $(Q)$(MAKE) -C $(UTILLINUXNG_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(UTILLINUXNG_BUILD_DIR)/shlibs/uuid DESTDIR=$(SYSROOT) install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ @touch $@
+
+$(UTILLINUXNG_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(UTILLINUXNG_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xjf $(DOWNLOAD_DIR)/$(UTILLINUXNG_PACKAGE)
+ifeq ($(CONFIG_EMBTK_UTILLINUXNG_NEED_PATCH),y)
+ @cd $(PACKAGES_BUILD)/util-linux-ng-$(UTILLINUXNG_VERSION); \
+ patch -p1 < $(DOWNLOAD_DIR)/util-linux-ng-$(UTILLINUXNG_VERSION).patch
+endif
+ @touch $@
+
+$(UTILLINUXNG_BUILD_DIR)/.configured:
+ $(Q)cd $(UTILLINUXNG_BUILD_DIR); \
+ CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ AS=$(CROSS_COMPILE)as \
+ LD=$(TARGETLD) \
+ NM=$(TARGETNM) \
+ STRIP=$(TARGETSTRIP) \
+ OBJDUMP=$(TARGETOBJDUMP) \
+ OBJCOPY=$(TARGETOBJCOPY) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \
+ CPPFLGAS="-I$(SYSROOT)/usr/include" \
+ PKG_CONFIG=$(PKGCONFIG_BIN) \
+ PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \
+ --prefix=/usr $(UTILLINUXNG_CONFIGURE_OPTS)
+ @touch $@
+
+utillinuxng_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup util-linux-ng-$(UTILLINUXNG_VERSION)...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(UTILLINUXNG_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(UTILLINUXNG_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(UTILLINUXNG_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(UTILLINUXNG_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(UTILLINUXNG_PKGCONFIGS)
+
+##################################################
+# util-linux-ng for the host development machine #
+##################################################
+
+UTILLINUXNG_HOST_CONFIGURE_OPTS := --without-audit --without-selinux \
+ --without-pam --without-slang --without-ncurses \
+ --disable-makeinstall-setuid --disable-makeinstall-chown \
+ --disable-use-tty-group --disable-require-password --disable-pg-bell \
+ --disable-login-stat-mail --disable-login-chown-vcs \
+ --disable-chsh-only-listed --disable-write --disable-wall \
+ --disable-schedutils --disable-login-utils --disable-reset \
+ --disable-rename --disable-raw --disable-partx --disable-mesg \
+ --disable-last --disable-kill --disable-init --disable-elvtune \
+ --disable-unshare --disable-fallocate --disable-pivot_root \
+ --disable-switch_root --disable-cramfs --disable-agetty \
+ --disable-arch --disable-rpath --disable-nls --disable-libmount \
+ --disable-libblkid --disable-uuidd --enable-libuuid --disable-fsck \
+ --disable-mount --disable-tls
+
+UTILLINUXNG_HOST_DEPS =
+
+utillinuxng_host_install: $(UTILLINUXNG_HOST_BUILD_DIR)/.installed
+
+$(UTILLINUXNG_HOST_BUILD_DIR)/.installed: $(UTILLINUXNG_HOST_DEPS) \
+ download_utillinuxng $(UTILLINUXNG_HOST_BUILD_DIR)/.decompressed \
+ $(UTILLINUXNG_HOST_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ util-linux-ng-$(UTILLINUXNG_VERSION) in host tools...")
+ $(Q)$(MAKE) -C $(UTILLINUXNG_HOST_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(UTILLINUXNG_HOST_BUILD_DIR)/shlibs/uuid install
+ @touch $@
+
+$(UTILLINUXNG_HOST_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(UTILLINUXNG_PACKAGE) ...")
+ @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(UTILLINUXNG_PACKAGE)
+ifeq ($(CONFIG_EMBTK_UTILLINUXNG_NEED_PATCH),y)
+ @cd $(UTILLINUXNG_HOST_BUILD_DIR); \
+ patch -p1 < $(DOWNLOAD_DIR)/util-linux-ng-$(UTILLINUXNG_VERSION).patch
+endif
+ @touch $@
+
+$(UTILLINUXNG_HOST_BUILD_DIR)/.configured:
+ $(Q)cd $(UTILLINUXNG_HOST_BUILD_DIR); \
+ ./configure --build=$(HOST_BUILD) --host=$(HOST_ARCH) \
+ --prefix=$(HOSTTOOLS)/usr/local \
+ $(UTILLINUXNG_HOST_CONFIGURE_OPTS)
+ @touch $@
+
+utillinuxng_host_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"Cleanup util-linux-ng-$(UTILLINUXNG_VERSION)...")
+
+##############################
+# Common for host and target #
+##############################
+download_utillinuxng:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(UTILLINUXNG_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(UTILLINUXNG_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(UTILLINUXNG_PACKAGE) \
+ $(UTILLINUXNG_SITE)/$(UTILLINUXNG_PACKAGE)
+ifeq ($(CONFIG_EMBTK_UTILLINUXNG_NEED_PATCH),y)
+ @test -e $(DOWNLOAD_DIR)/util-linux-ng-$(UTILLINUXNG_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/util-linux-ng-$(UTILLINUXNG_VERSION).patch \
+ $(UTILLINUXNG_PATCH_SITE)/util-linux-ng-$(UTILLINUXNG_VERSION)-*.patch
+endif