From fd6481d82ff407139157e53df28563d40bb3ad3b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 29 Jul 2010 15:25:12 +0200 Subject: add a cpio implementation to tools directory cpio utility is a mess in point of portability. For example NetBSD cpio implementation does not support userid and groupid changes for the archive. This feature is required for initramfs filesystem targets. This cpio is from the Heirloom project. Fix needed rebuild of tools, when changing targets. --- mk/image.mk | 15 +++++++++------ mk/tools.mk | 5 +---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'mk') diff --git a/mk/image.mk b/mk/image.mk index 440d975b4..6c3b1e5f9 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -49,18 +49,21 @@ ${BIN_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR} | gzip -n9 >$@ ${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR} - cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ - cpio -o r -C512 -Hnewc | ${ADK_COMPRESSION_TOOL} >$@ + cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ + sed "s#\(.*\)#:0:0::::::\1#" | sort | \ + ${STAGING_TOOLS}/bin/cpio -o -C512 -Hnewc -P | \ + ${ADK_COMPRESSION_TOOL} >$@ 2>/dev/null ${BUILD_DIR}/${INITRAMFS_PIGGYBACK}: ${TARGET_DIR} $(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"#' \ $(LINUX_DIR)/.config - cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ - cpio -o r -C512 -Hnewc >$@ + cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ + sed "s#\(.*\)#:0:0::::::\1#" | sort | \ + ${STAGING_TOOLS}/bin/cpio -o -C512 -Hnewc -P >$@ 2>/dev/null ${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR} - PATH='${TARGET_PATH}' \ - mksquashfs ${TARGET_DIR} ${BUILD_DIR}/root.squashfs \ + ${STAGING_TOOLS}/bin/mksquashfs ${TARGET_DIR} \ + ${BUILD_DIR}/root.squashfs \ -nopad -noappend -root-owned $(MAKE_TRACE) cat ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel \ ${BUILD_DIR}/root.squashfs > \ diff --git a/mk/tools.mk b/mk/tools.mk index 429e741c2..b91e478fd 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,6 +1,3 @@ -prepare: ${WRKDIST}/.prepared -configure: ${WRKBUILD}/.configure_done -compile: $(WRKBUILD)/.compiled -install: $(WRKBUILD)/.installed +compile: clean: rm -rf $(WRKDIR) -- cgit v1.2.3