forked from opencomputeproject/onie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build stand alone versions of libuuid and libblkid instead of the built-in versions from e2fsprogs. Signed-off-by: Curt Brune <[email protected]>
- Loading branch information
Curt Brune
committed
Jul 22, 2016
1 parent
4465465
commit 10a2855
Showing
6 changed files
with
137 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#------------------------------------------------------------------------------- | ||
# | ||
# Copyright (C) 2013-2014 Curt Brune <[email protected]> | ||
# Copyright (C) 2013,2014,2015 Curt Brune <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# | ||
|
@@ -17,6 +17,8 @@ export ONIE_CFLAGS = -Os $(ONIE_CPPFLAGS) | |
export ONIE_CXXFLAGS = -Os $(ONIE_CPPFLAGS) | ||
export ONIE_LDFLAGS = --sysroot=$(DEV_SYSROOT) | ||
|
||
export ONIE_PKG_CONFIG = PKG_CONFIG_LIBDIR=$(DEV_SYSROOT)/usr/lib/pkgconfig | ||
|
||
#------------------------------------------------------------------------------- | ||
# | ||
# Local Variables: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#------------------------------------------------------------------------------- | ||
# | ||
# Copyright (C) 2013-2014 Curt Brune <[email protected]> | ||
# Copyright (C) 2013,2014,2015 Curt Brune <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# | ||
|
@@ -56,7 +56,7 @@ MTDUTILS_NEW_FILES = $(shell test -d $(MTDUTILS_DIR) && test -f $(MTDUTILS_BUILD | |
endif | ||
|
||
mtdutils-build: $(MTDUTILS_BUILD_STAMP) | ||
$(MTDUTILS_BUILD_STAMP): $(MTDUTILS_NEW_FILES) $(E2FSPROGS_INSTALL_STAMP) \ | ||
$(MTDUTILS_BUILD_STAMP): $(MTDUTILS_NEW_FILES) $(UTILLINUX_INSTALL_STAMP) \ | ||
$(LZO_INSTALL_STAMP) $(ZLIB_INSTALL_STAMP) \ | ||
$(MTDUTILS_SOURCE_STAMP) | $(DEV_SYSROOT_INIT_STAMP) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
#------------------------------------------------------------------------------- | ||
# | ||
# Copyright (C) 2013-2014 Curt Brune <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# | ||
#------------------------------------------------------------------------------- | ||
# | ||
# This is a makefile fragment that defines the build of some libraries | ||
# from the util-linux package. | ||
# | ||
|
||
UTILLINUX_VERSION = 2.27 | ||
UTILLINUX_TARBALL = util-linux-$(UTILLINUX_VERSION).tar.xz | ||
UTILLINUX_TARBALL_URLS += $(ONIE_MIRROR) \ | ||
https://www.kernel.org/pub/linux/utils/util-linux/v$(UTILLINUX_VERSION)/ | ||
UTILLINUX_BUILD_DIR = $(MBUILDDIR)/util-linux | ||
UTILLINUX_DIR = $(UTILLINUX_BUILD_DIR)/util-linux-$(UTILLINUX_VERSION) | ||
|
||
UTILLINUX_DOWNLOAD_STAMP = $(DOWNLOADDIR)/util-linux-download | ||
UTILLINUX_SOURCE_STAMP = $(STAMPDIR)/util-linux-source | ||
UTILLINUX_CONFIGURE_STAMP = $(STAMPDIR)/util-linux-configure | ||
UTILLINUX_BUILD_STAMP = $(STAMPDIR)/util-linux-build | ||
UTILLINUX_INSTALL_STAMP = $(STAMPDIR)/util-linux-install | ||
UTILLINUX_STAMP = $(UTILLINUX_SOURCE_STAMP) \ | ||
$(UTILLINUX_CONFIGURE_STAMP) \ | ||
$(UTILLINUX_BUILD_STAMP) \ | ||
$(UTILLINUX_INSTALL_STAMP) | ||
|
||
PHONY += util-linux util-linux-download util-linux-source util-linux-configure \ | ||
util-linux-build util-linux-install util-linux-clean util-linux-download-clean | ||
|
||
UTILLINUX_CONFIG = --enable-libuuid | ||
UTILLINUX_LIBS = \ | ||
libuuid.so libuuid.so.1 libuuid.so.1.3.0 | ||
|
||
ifeq ($(EXT3_4_ENABLE),yes) | ||
UTILLINUX_CONFIG += --enable-libblkid | ||
UTILLINUX_LIBS += \ | ||
libblkid.so libblkid.so.1 libblkid.so.1.1.0 | ||
endif | ||
|
||
util-linux: $(UTILLINUX_STAMP) | ||
|
||
DOWNLOAD += $(UTILLINUX_DOWNLOAD_STAMP) | ||
util-linux-download: $(UTILLINUX_DOWNLOAD_STAMP) | ||
$(UTILLINUX_DOWNLOAD_STAMP): $(PROJECT_STAMP) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
$(Q) echo "==== Getting upstream util-linux ====" | ||
$(Q) $(SCRIPTDIR)/fetch-package $(DOWNLOADDIR) $(UPSTREAMDIR) \ | ||
$(UTILLINUX_TARBALL) $(UTILLINUX_TARBALL_URLS) | ||
$(Q) touch $@ | ||
|
||
SOURCE += $(UTILLINUX_SOURCE_STAMP) | ||
util-linux-source: $(UTILLINUX_SOURCE_STAMP) | ||
$(UTILLINUX_SOURCE_STAMP): $(TREE_STAMP) | $(UTILLINUX_DOWNLOAD_STAMP) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
$(Q) echo "==== Extracting upstream util-linux ====" | ||
$(Q) $(SCRIPTDIR)/extract-package $(UTILLINUX_BUILD_DIR) $(DOWNLOADDIR)/$(UTILLINUX_TARBALL) | ||
$(Q) touch $@ | ||
|
||
ifndef MAKE_CLEAN | ||
UTILLINUX_NEW_FILES = $(shell test -d $(UTILLINUX_DIR) && test -f $(UTILLINUX_BUILD_STAMP) && \ | ||
find -L $(UTILLINUX_DIR) -newer $(UTILLINUX_BUILD_STAMP) -type f \ | ||
\! -name libblkid.so.1.1.0T -print -quit) | ||
endif | ||
|
||
util-linux-configure: $(UTILLINUX_CONFIGURE_STAMP) | ||
$(UTILLINUX_CONFIGURE_STAMP): $(UTILLINUX_SOURCE_STAMP) | $(DEV_SYSROOT_INIT_STAMP) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
$(Q) echo "==== Configure util-linux-$(UTILLINUX_VERSION) ====" | ||
$(Q) cd $(UTILLINUX_DIR) && PATH='$(CROSSBIN):$(PATH)' \ | ||
$(UTILLINUX_DIR)/configure \ | ||
--enable-shared \ | ||
--prefix=$(DEV_SYSROOT)/usr \ | ||
--host=$(TARGET) \ | ||
CC=$(CROSSPREFIX)gcc \ | ||
CFLAGS="$(ONIE_CFLAGS)" \ | ||
--disable-tls \ | ||
--disable-all-programs \ | ||
--without-python \ | ||
$(UTILLINUX_CONFIG) \ | ||
$(ONIE_PKG_CONFIG) | ||
$(Q) touch $@ | ||
|
||
util-linux-build: $(UTILLINUX_BUILD_STAMP) | ||
$(UTILLINUX_BUILD_STAMP): $(UTILLINUX_CONFIGURE_STAMP) $(UTILLINUX_NEW_FILES) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
$(Q) echo "==== Building util-linux-$(UTILLINUX_VERSION) ====" | ||
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(UTILLINUX_DIR) | ||
$(Q) touch $@ | ||
|
||
util-linux-install: $(UTILLINUX_INSTALL_STAMP) | ||
$(UTILLINUX_INSTALL_STAMP): $(SYSROOT_INIT_STAMP) $(UTILLINUX_BUILD_STAMP) | ||
$(Q) rm -f $@ && eval $(PROFILE_STAMP) | ||
$(Q) echo "==== Installing util-linux in $(DEV_SYSROOT) ====" | ||
$(Q) PATH='$(CROSSBIN):$(PATH)' \ | ||
$(MAKE) -C $(UTILLINUX_DIR) install | ||
$(Q) for file in $(UTILLINUX_LIBS) ; do \ | ||
cp -av $(DEV_SYSROOT)/usr/lib/$$file $(SYSROOTDIR)/usr/lib/ ; \ | ||
done | ||
$(Q) touch $@ | ||
|
||
USERSPACE_CLEAN += util-linux-clean | ||
util-linux-clean: | ||
$(Q) rm -rf $(UTILLINUX_BUILD_DIR) | ||
$(Q) rm -f $(UTILLINUX_STAMP) | ||
$(Q) echo "=== Finished making $@ for $(PLATFORM)" | ||
|
||
DOWNLOAD_CLEAN += util-linux-download-clean | ||
util-linux-download-clean: | ||
$(Q) rm -f $(UTILLINUX_DOWNLOAD_STAMP) $(DOWNLOADDIR)/$(UTILLINUX_TARBALL) | ||
|
||
#------------------------------------------------------------------------------- | ||
# | ||
# Local Variables: | ||
# mode: makefile-gmake | ||
# End: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0549760ba1d2eb0e48b41b926d54ac55533369af util-linux-2.27.tar.xz |