Pull request for branch yem-instrument-build
Subsystems (6)
Hello All!
This series adds some intrumentation to the pkg-infra so that it is easier for the autobuilders to extract meaningfull information about the reason of failures.
It does so by:
- logging all messages displayed with calls to MESSAGE to a time-stamped log file
- log the last such mesage to a file
- add calls to MESSAGE in the non-package steps of the external toolchain backend
- add calls to MESSAGE in the non-package steps of the crosstool-NG toolchain backend
- add calls to MESSAGE in the non-package steps of the internal toolchain backend (gcc, kernel headers, and uClibc)
Although I've tested it with external and internal toolchain backends (not crosstool-NG for now), and although it does work, I expect some polishing to be required.
So, take this series as a kind of RFC, rather than a final series.
Changes v1 -> v2:
- invert the patches ordering for easier upstreaming (Thomas)
- include Arnout's fixes against the filesystem infra (Arnout) (with a few fixes for "no newline at end of file" by me)
- eye-candy fixes in displayed messages (Arnout)
The following changes since commit ad0279f0ee51e97bf7dbb70fdd6f14f789f344a8:
gettext: fix static build failure (2013-01-20 09:54:25 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-instrument-build
Yann E. MORIN (7):
toolchain/external: sprinkle with some calls to MESSAGE toolchain/crosstool-ng: sprinkle with some calls to MESSAGE toolchain/gcc: sprinkle with some calls to MESSAGE toolchain/kernel-headers: sprinkle with some calls to MESSAGE toolchain/uClibc: sprinkle with some calls to MESSAGE fs/common.mk: delay evaluation of variables.
pkg-infra: log current message
fs/cloop/cloop.mk | 4 +- fs/common.mk | 44 +++++++++++----------- fs/cpio/cpio.mk | 2 +- fs/cramfs/cramfs.mk | 2 +- fs/ext2/ext2.mk | 2 +- fs/jffs2/jffs2.mk | 8 ++-- fs/romfs/romfs.mk | 4 +- fs/squashfs/squashfs.mk | 4 +- fs/tar/tar.mk | 2 +- fs/ubifs/ubi.mk | 4 +- fs/ubifs/ubifs.mk | 4 +- package/pkg-utils.mk | 9 ++++- toolchain/gcc/gcc-uclibc-4.x.mk | 16 ++++++++ toolchain/kernel-headers/kernel-headers.mk | 4 ++ toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 5 +- toolchain/toolchain-external/ext-tool.mk | 8 ++- toolchain/uClibc/uclibc.mk | 13 ++++++ 17 files changed, 88 insertions(+), 47 deletions(-)
Regards,
Yann E. MORIN
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/7 toolchain/external: sprinkle with some calls to MESSAGE
Thus, the failing step can be easily extracted by autobuilders, to ease with post-mortem analysis.
--- toolchain/toolchain-external/ext-tool.mk | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
toolchain/toolchain-external/ext-tool.mk +5 -3
@@ -325,7 +325,7 @@ endif # matches the configuration provided in Buildroot: ABI, C++ support, # type of C library and all C library features. $(STAMP_DIR)/ext-toolchain-checked: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES) - @echo "Checking external toolchain settings" + @$(call MESSAGE,"Checking external toolchain settings") $(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC)) $(Q)LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \ SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/(.*/)?libc\.a::'` ; \
@@ -414,7 +414,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \ mkdir -p $(TARGET_DIR)/lib ; \ if test -z "$(BR2_PREFER_STATIC_LIB)" ; then \ - echo "Copy external toolchain libraries to target..." ; \ + $(call MESSAGE,"Copying external toolchain libraries to target...") ; \ for libs in $(LIB_EXTERNAL_LIBS); do \ $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \ done ; \
@@ -422,12 +422,13 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \ done ; \ fi ; \ - echo "Copy external toolchain sysroot to staging..." ; \ + $(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \ $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) ; \ if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \ $(call create_lib64_symlinks) ; \ fi ; \ if test x"$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)" == x"y"; then \ + $(call MESSAGE,"Copying gdbserver") ; \ gdbserver_found=0 ; \ for d in $${ARCH_SYSROOT_DIR} $${ARCH_SYSROOT_DIR}/../debug-root/ ; do \ if test -f $${d}/usr/bin/gdbserver ; then \
@@ -446,6 +447,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked # Build toolchain wrapper for preprocessor, C and C++ compiler, and setup # symlinks for everything else $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed + $(Q)$(call MESSAGE,"Building ext-toolchain wrapper") mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \ for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \ base=$${i##*/}; \
Signature · 1 line
1.7.2.5
PATCH 2/7 toolchain/crosstool-ng: sprinkle with some calls to MESSAGE
In reply to Yann E. MORINThus, the failing step can be easily extracted by autobuilders, to ease with post-mortem analysis.
At the same time, remove two debug echoes (Arnout).
--- toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +2 -3
@@ -68,9 +68,7 @@ $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built $(Q)mkdir -p $(TARGET_DIR)/lib $(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )"; \ CTNG_SYSROOT="$(HOST_DIR)/usr/$${CTNG_TUPLE}/sysroot"; \ - echo "CTNG_TUPLE='$${CTNG_TUPLE}'"; \ - echo "CTNG_SYSROOT='$${CTNG_SYSROOT}'"; \ - echo "Copy external toolchain libraries to target..."; \ + $(call MESSAGE,"Copying toolchain libraries to target..."); \ for libs in $(CTNG_LIBS_LIB); do \ $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},,lib,$$libs,/lib); \ done; \
@@ -85,6 +83,7 @@ $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built # depending on the selected C library. Those deps are added later $(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/.config + $(Q)$(call MESSAGE,"Building the crosstool-NG toolchain") $(Q)$(call ctng,build.$(PARALLEL_JOBS)) $(Q)printf "\n" $(Q)touch $@
Signature · 1 line
1.7.2.5
PATCH 3/7 toolchain/gcc: sprinkle with some calls to MESSAGE
In reply to Yann E. MORINThus, the failing step can be easily extracted by autobuilders, to ease with post-mortem analysis.
--- toolchain/gcc/gcc-uclibc-4.x.mk | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
toolchain/gcc/gcc-uclibc-4.x.mk +16 -0
@@ -243,10 +243,12 @@ endif $(DL_DIR)/$(GCC_SOURCE): mkdir -p $(DL_DIR) + $(call MESSAGE,"Downloading gcc") $(call DOWNLOAD,$(GCC_SITE)/$(GCC_SOURCE)) gcc-unpacked: $(GCC_DIR)/.patched $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) + $(Q)$(call MESSAGE,"Extracting gcc") mkdir -p $(TOOLCHAIN_DIR) rm -rf $(GCC_DIR) $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
@@ -259,6 +261,7 @@ endif gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked + $(Q)$(call MESSAGE,"Patching gcc") # Apply any files named gcc-*.patch from the source directory to gcc ifneq ($(wildcard $(GCC_PATCH_DIR)),) support/scripts/apply-patches.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch
@@ -279,6 +282,7 @@ endif GCC_BUILD_DIR1:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-initial $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched + $(Q)$(call MESSAGE,"Configuring gcc pass-1") mkdir -p $(GCC_BUILD_DIR1) (cd $(GCC_BUILD_DIR1); rm -rf config.cache; \ $(HOST_CONFIGURE_OPTS) \
@@ -314,6 +318,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched touch $@ $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured + $(Q)$(call MESSAGE,"Building gcc pass-1") ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc else
@@ -323,6 +328,7 @@ endif gcc_initial=$(GCC_BUILD_DIR1)/.installed $(gcc_initial) $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled + $(Q)$(call MESSAGE,"Installing gcc pass-1") PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc touch $(gcc_initial)
@@ -346,6 +352,7 @@ GCC_BUILD_DIR2:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-intermediate # the step or libgcc will not build... $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched + $(Q)$(call MESSAGE,"Configuring gcc pass-2") mkdir -p $(GCC_BUILD_DIR2) (cd $(GCC_BUILD_DIR2); rm -rf config.cache; \ $(HOST_CONFIGURE_OPTS) \
@@ -380,6 +387,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched touch $@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured + $(Q)$(call MESSAGE,"Building gcc pass-2") # gcc >= 4.3.0 have to also build all-target-libgcc ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc all-target-libgcc
@@ -390,6 +398,7 @@ endif gcc_intermediate=$(GCC_BUILD_DIR2)/.installed $(gcc_intermediate): $(GCC_BUILD_DIR2)/.compiled + $(Q)$(call MESSAGE,"Installing gcc pass-2") # gcc >= 4.3.0 have to also install install-target-libgcc ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc install-target-libgcc
@@ -421,6 +430,7 @@ gcc_intermediate-dirclean: GCC_BUILD_DIR3:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-final $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) + $(Q)$(call MESSAGE,"Configuring gcc final") mkdir -p $(GCC_BUILD_DIR3) # Important! Required for limits.h to be fixed. ln -snf ../include/ $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sys-include
@@ -457,10 +467,12 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) touch $@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured + $(Q)$(call MESSAGE,"Building gcc final") $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR3) all touch $@ $(GCC_BUILD_DIR3)/.installed: $(GCC_BUILD_DIR3)/.compiled + $(Q)$(call MESSAGE,"Installing gcc final") PATH=$(TARGET_PATH) $(MAKE) \ -C $(GCC_BUILD_DIR3) install if [ -d "$(STAGING_DIR)/lib64" ]; then \
@@ -492,6 +504,7 @@ endif touch $@ $(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR3)/.installed + $(Q)$(call MESSAGE,"Installing gcc final libraries to staging and target") ifeq ($(BR2_GCC_SHARED_LIBGCC),y) # These go in /lib, so... rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
@@ -548,6 +561,7 @@ $(GCC_BUILD_DIR4)/.prepared: $(STAMP_DIR)/gcc_libs_target_installed touch $@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared + $(Q)$(call MESSAGE,"Configuring gcc on target") (cd $(GCC_BUILD_DIR4); rm -rf config.cache; \ $(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_ARGS) \
@@ -586,6 +600,7 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared touch $@ $(GCC_BUILD_DIR4)/.compiled: $(GCC_BUILD_DIR4)/.configured + $(Q)$(call MESSAGE,"Building gcc on target") PATH=$(TARGET_PATH) \ $(MAKE) -C $(GCC_BUILD_DIR4) all touch $@
@@ -598,6 +613,7 @@ GCC_INCLUDE_DIR:=include-fixed endif $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR4)/.compiled + $(Q)$(call MESSAGE,"Installing gcc on target") PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) \ $(MAKE1) -C $(GCC_BUILD_DIR4) install # Remove broken specs file (cross compile flag is set).
Signature · 1 line
1.7.2.5
PATCH 4/7 toolchain/kernel-headers: sprinkle with some calls to MESSAGE
In reply to Yann E. MORINThus, the failing step can be easily extracted by autobuilders, to ease with post-mortem analysis.
--- toolchain/kernel-headers/kernel-headers.mk | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
toolchain/kernel-headers/kernel-headers.mk +4 -0
@@ -48,6 +48,7 @@ endif LINUX_HEADERS_DEPENDS:= $(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) + $(Q)$(call MESSAGE,"Extracting kernel headers") rm -rf $(LINUX_HEADERS_DIR) $(INSTALL) -d $(@D) $(LINUX_HEADERS_CAT) $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | \
@@ -55,6 +56,7 @@ $(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) touch $@ $(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked $(LINUX_HEADERS_DEPENDS) + $(Q)$(call MESSAGE,"Patching kernel headers") support/scripts/apply-patches.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers \ linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} ifneq ($(KERNEL_HEADERS_PATCH_DIR),)
@@ -64,6 +66,7 @@ endif touch $@ $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched + $(Q)$(call MESSAGE,"Installing kernel headers") (cd $(LINUX_HEADERS_UNPACK_DIR); \ $(MAKE) ARCH=$(KERNEL_ARCH) \ HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \
@@ -76,6 +79,7 @@ $(DL_DIR)/$(LINUX_HEADERS_SOURCE): ifeq ($(BR2_KERNEL_HEADERS_SNAP),y) $(error No local $@ found, cannot continue. Are you sure you wanted to enable BR2_KERNEL_HEADERS_SNAP?) endif + $(call MESSAGE,"Downloading kernel headers") $(call DOWNLOAD,$(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE)) kernel-headers: $(LINUX_HEADERS_DIR)/.configured
Signature · 1 line
1.7.2.5
PATCH 5/7 toolchain/uClibc: sprinkle with some calls to MESSAGE
In reply to Yann E. MORINThus, the failing step can be easily extracted by autobuilders, to ease with post-mortem analysis.
--- toolchain/uClibc/uclibc.mk | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
toolchain/uClibc/uclibc.mk +13 -0
@@ -62,10 +62,12 @@ UCLIBC_LOCALES = $(foreach locale,$(GENERATE_LOCALE),\ endif $(DL_DIR)/$(UCLIBC_SOURCE): + $(call MESSAGE,"Downloading uClibc") $(call DOWNLOAD,$(UCLIBC_SITE)/$(UCLIBC_SOURCE)) uclibc-unpacked: $(UCLIBC_DIR)/.unpacked $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) + $(Q)$(call MESSAGE,"Extracting uClibc") mkdir -p $(TOOLCHAIN_DIR) rm -rf $(UCLIBC_DIR) $(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
@@ -73,6 +75,7 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) uclibc-patched: $(UCLIBC_DIR)/.patched $(UCLIBC_DIR)/.patched: $(UCLIBC_DIR)/.unpacked + $(Q)$(call MESSAGE,"Patching uClibc") ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) support/scripts/apply-patches.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) \ uClibc-$(UCLIBC_VERSION)-\*.patch \
@@ -86,6 +89,7 @@ endif # Some targets may wish to provide their own UCLIBC_CONFIG_FILE... $(UCLIBC_DIR)/.oldconfig: $(UCLIBC_DIR)/.patched $(UCLIBC_CONFIG_FILE) + $(Q)$(call MESSAGE,"Pre-configuring uClibc") cp -f $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.oldconfig $(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' \ -e 's,# TARGET_$(UCLIBC_TARGET_ARCH) is not set,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \
@@ -370,6 +374,7 @@ endif endif $(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.oldconfig + $(Q)$(call MESSAGE,"Configuring uClibc") cp -f $(UCLIBC_DIR)/.oldconfig $(UCLIBC_DIR)/.config mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/include mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib
@@ -393,6 +398,7 @@ $(UCLIBC_DIR)/.config: | host-ccache endif $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config + $(Q)$(call MESSAGE,"Installing uClibc headers") $(MAKE1) -C $(UCLIBC_DIR) \ ARCH="$(UCLIBC_TARGET_ARCH)" \ PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \
@@ -415,6 +421,7 @@ $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.confi touch $@ $(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(gcc_intermediate) $(LIBFLOAT_TARGET) + $(Q)$(call MESSAGE,"Building uClibc") $(MAKE1) -C $(UCLIBC_DIR) \ ARCH="$(UCLIBC_TARGET_ARCH)" \ PREFIX= \
@@ -440,6 +447,7 @@ uclibc-menuconfig: dirs $(UCLIBC_DIR)/.config $(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a + $(Q)$(call MESSAGE,"Installing uClibc to staging dir") $(MAKE1) -C $(UCLIBC_DIR) \ ARCH="$(UCLIBC_TARGET_ARCH)" \ PREFIX=$(STAGING_DIR) \
@@ -470,6 +478,7 @@ $(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a ifneq ($(TARGET_DIR),) $(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a + $(Q)$(call MESSAGE,"Installing uClibc runtime to target dir") $(MAKE1) -C $(UCLIBC_DIR) \ ARCH="$(UCLIBC_TARGET_ARCH)" \ PREFIX=$(TARGET_DIR) \
@@ -481,6 +490,7 @@ $(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a touch -c $@ $(TARGET_DIR)/usr/bin/ldd: $(cross_compiler) + $(Q)$(call MESSAGE,"Installing uClibc utils to target dir") $(MAKE1) -C $(UCLIBC_DIR) CC=$(TARGET_CROSS)gcc \ CPP=$(TARGET_CROSS)cpp LD=$(TARGET_CROSS)ld \ ARCH="$(UCLIBC_TARGET_ARCH)" \
@@ -525,11 +535,13 @@ uclibc-target-utils: $(TARGET_DIR)/usr/bin/ldd uclibc-target-utils-source: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_DIR)/test/unistd/errno: + $(Q)$(call MESSAGE,"Building uClibc test suite") $(MAKE) -C $(UCLIBC_DIR)/test \ ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \ UCLIBC_ONLY=1 TEST_INSTALLED_UCLIBC=1 compile $(TARGET_DIR)/root/uClibc/test/unistd/errno: $(UCLIBC_DIR)/test/unistd/errno + $(Q)$(call MESSAGE,"Installing uClibc test suite to target dir") mkdir -p $(TARGET_DIR)/root/uClibc cp -rdpf $(UCLIBC_DIR)/test $(TARGET_DIR)/root/uClibc $(INSTALL) $(UCLIBC_DIR)/Rules.mak $(TARGET_DIR)/root/uClibc
@@ -554,6 +566,7 @@ uclibc-test-dirclean: ############################################################# $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/usr/lib/libc.a + $(Q)$(call MESSAGE,"Installing uClibc development files to target dir") $(MAKE1) -C $(UCLIBC_DIR) \ ARCH="$(UCLIBC_TARGET_ARCH)" \ PREFIX=$(TARGET_DIR) \
Signature · 1 line
1.7.2.5
PATCH 6/7 fs/common.mk: delay evaluation of variables.
In reply to Yann E. MORINThis makes things easier to understand and more consistent with the pkg-infra. For example, it removes the need for '$$@' in the CMD variables of fs/*/*.mk.
It also makes it possible to update the variables later, e.g. in the package override file.
It also makes sure that the date will be recorded correctly in Yann E. Morin's patch that logs the MESSAGE macros to a file.
The fs/*/*.mk must be updated as well because the '$@' shouldn't be quoted anymore in the CMD variables or the hooks.
The $(eval ...) for the dependencies is redundant, because the $(ROOTFS_TARGET) variable is already eval'd. Note that it is only redundant if the evaluation of the uses of the variable is also delayed.
--- fs/cloop/cloop.mk | 4 ++-- fs/common.mk | 44 ++++++++++++++++++++++---------------------- fs/cpio/cpio.mk | 2 +- fs/cramfs/cramfs.mk | 2 +- fs/ext2/ext2.mk | 2 +- fs/jffs2/jffs2.mk | 8 ++++---- fs/romfs/romfs.mk | 4 ++-- fs/squashfs/squashfs.mk | 4 ++-- fs/tar/tar.mk | 2 +- fs/ubifs/ubi.mk | 4 ++-- fs/ubifs/ubifs.mk | 4 ++-- 11 files changed, 40 insertions(+), 40 deletions(-)
fs/cloop/cloop.mk +2 -2
@@ -7,7 +7,7 @@ ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit define ROOTFS_CLOOP_CMD - $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $$@ + $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $@ endef -$(eval $(call ROOTFS_TARGET,cloop)) +$(eval $(call ROOTFS_TARGET,cloop))
fs/common.mk +22 -22
63 lines not on this page · raw message
fs/cpio/cpio.mk +1 -1
@@ -28,7 +28,7 @@ endif # BR2_ROOTFS_DEVICE_CREATION_STATIC ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT define ROOTFS_CPIO_CMD - cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@ + cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@ endef $(eval $(call ROOTFS_TARGET,cpio))
fs/cramfs/cramfs.mk +1 -1
@@ -10,7 +10,7 @@ CRAMFS_OPTS=-l endif define ROOTFS_CRAMFS_CMD - $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $$@ + $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@ endef ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
fs/ext2/ext2.mk +1 -1
@@ -21,7 +21,7 @@ endif ROOTFS_EXT2_DEPENDENCIES = host-genext2fs define ROOTFS_EXT2_CMD - PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $$@ + PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@ endef $(eval $(call ROOTFS_TARGET,ext2))
fs/jffs2/jffs2.mk +4 -4
@@ -36,13 +36,13 @@ ROOTFS_JFFS2_DEPENDENCIES = host-mtd ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),) define ROOTFS_JFFS2_CMD - $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o [email protected] && \ - $(SUMTOOL) $(SUMTOOL_OPTS) -i [email protected] -o $$@ && \ - rm [email protected] + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o [email protected] && \ + $(SUMTOOL) $(SUMTOOL_OPTS) -i [email protected] -o $@ && \ + rm [email protected] endef else define ROOTFS_JFFS2_CMD - $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@ + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@ endef endif
fs/romfs/romfs.mk +2 -2
@@ -9,7 +9,7 @@ ROMFS_TARGET=$(IMAGE).romfs ROOTFS_ROMFS_DEPENDENCIES = host-genromfs define ROOTFS_ROMFS_CMD - $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $$@ + $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@ endef -$(eval $(call ROOTFS_TARGET,romfs)) +$(eval $(call ROOTFS_TARGET,romfs))
fs/squashfs/squashfs.mk +2 -2
@@ -33,9 +33,9 @@ endif endif define ROOTFS_SQUASHFS_CMD - $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend \ + $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \ $(ROOTFS_SQUASHFS_ARGS) && \ - chmod 0644 $$@ + chmod 0644 $@ endef $(eval $(call ROOTFS_TARGET,squashfs))
fs/tar/tar.mk +1 -1
@@ -7,7 +7,7 @@ TAR_OPTS:=$(BR2_TARGET_ROOTFS_TAR_OPTIONS) define ROOTFS_TAR_CMD - tar -c$(TAR_OPTS)f $$@ -C $(TARGET_DIR) . + tar -c$(TAR_OPTS)f $@ -C $(TARGET_DIR) . endef $(eval $(call ROOTFS_TARGET,tar))
fs/ubifs/ubi.mk +2 -2
@@ -14,9 +14,9 @@ ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs define ROOTFS_UBI_CMD cp fs/ubifs/ubinize.cfg . ;\ - echo "image=$$@fs" \ + echo "image=$@fs" \ >> ./ubinize.cfg ;\ - $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ + $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ rm ubinize.cfg endef
fs/ubifs/ubifs.mk +2 -2
@@ -19,7 +19,7 @@ endif ROOTFS_UBIFS_DEPENDENCIES = host-mtd define ROOTFS_UBIFS_CMD - $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $$@ + $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ endef -$(eval $(call ROOTFS_TARGET,ubifs)) +$(eval $(call ROOTFS_TARGET,ubifs))
Signature · 1 line
1.7.2.5
PATCH 7/7 pkg-infra: log current message
In reply to Yann E. MORINIn order to help the auto-builders (our own, or in-house ones), just log the current message in a file that contains:
Package: $($(PKG)_NAME)
Version: $($(PKG)_VERSION)
Action : Last '>>>' message displayedFor example:
Package: host-fakeroot
Version: 1.18.2
Action : Configuring
If there is no package, then the package name and version are empty, eg.:
Package:
Version:
Action : Generating root filesystem image rootfs.tar
Also, all messages are logged to a file, one per line, with the date each message was generated at, as the number of seconds elapsed since Epoch.
This will hopefully help autobuilders extract the real reason for a failure, and take appropriate action (eg. bug-mail the last git-author of a package...)
--- package/pkg-utils.mk | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
package/pkg-utils.mk +8 -1
@@ -64,7 +64,14 @@ INFLATE.xz = $(XZCAT) INFLATE.tar = cat # MESSAGE Macro -- display a message in bold type -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" +define MESSAGE + echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"; \ + echo "$$(date '+%s'): $($(PKG)_NAME) $($(PKG)_VERSION) $(1)" \ + >>$(BUILD_DIR)/actions.log; \ + printf "Package: %s\nVersion: %s\nAction : %s\n" \ + "$($(PKG)_NAME)" "$($(PKG)_VERSION)" $(1) \ + >$(BUILD_DIR)/last-action +endef TERM_BOLD := $(shell tput smso) TERM_RESET := $(shell tput rmso)
Signature · 1 line
1.7.2.5
All,
Quoted 3 lines · On Sunday 20 January 2013 Yann E. MORIN wrote:
This series adds some intrumentation to the pkg-infra so that it is easier for the autobuilders to extract meaningfull information about the reason of failures.
[--SNIP--]
Quoted 8 lines
Yann E. MORIN (7):
toolchain/external: sprinkle with some calls to MESSAGE toolchain/crosstool-ng: sprinkle with some calls to MESSAGE toolchain/gcc: sprinkle with some calls to MESSAGE toolchain/kernel-headers: sprinkle with some calls to MESSAGE toolchain/uClibc: sprinkle with some calls to MESSAGEfs/common.mk: delay evaluation of variables.
pkg-infra: log current message
Arg! Arnout's authorship was lost when I added his patch to my tree... :-( Let me fix that...
[git-am choked on the patch because of some missing "newline at end of file", hence I applied it manually, and forgot to change authorship]
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
All,
Quoted 14 lines · On Sunday 20 January 2013 Yann E. MORIN wrote:
Quoted 3 lines · On Sunday 20 January 2013 Yann E. MORIN wrote:
This series adds some intrumentation to the pkg-infra so that it is easier for the autobuilders to extract meaningfull information about the reason of failures.
[--SNIP--]
Quoted 8 lines
Yann E. MORIN (7):
toolchain/external: sprinkle with some calls to MESSAGE toolchain/crosstool-ng: sprinkle with some calls to MESSAGE toolchain/gcc: sprinkle with some calls to MESSAGE toolchain/kernel-headers: sprinkle with some calls to MESSAGE toolchain/uClibc: sprinkle with some calls to MESSAGEfs/common.mk: delay evaluation of variables.
pkg-infra: log current message
Quoted 2 lines
Arg! Arnout's authorship was lost when I added his patch to my tree... :-( Let me fix that...
OK, the branch on gitorious has been fixed, now. Not re-sending the series, though. Please pull form gitorious to ensure Arnout's authorship is retained.
My apologies for the hiccup. :-(
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Quoted 2 lines · Yann E. MORIN
[git-am choked on the patch because of some missing "newline at end of file", hence I applied it manually, and forgot to change authorship]
Funny, must be a bug in git-apply.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Yann> Hello All!
Yann> This series adds some intrumentation to the pkg-infra so that it Yann> is easier for the autobuilders to extract meaningfull information Yann> about the reason of failures.
Committed patch 1-5, thanks!
Yann> Yann E. MORIN (7):
Yann> toolchain/external: sprinkle with some calls to MESSAGE Yann> toolchain/crosstool-ng: sprinkle with some calls to MESSAGE Yann> toolchain/gcc: sprinkle with some calls to MESSAGE Yann> toolchain/kernel-headers: sprinkle with some calls to MESSAGE Yann> toolchain/uClibc: sprinkle with some calls to MESSAGE Yann> fs/common.mk: delay evaluation of variables. Yann> pkg-infra: log current message
Signature · 1 line
Bye, Peter Korsgaard