2005-02-09 17:06:06 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# tar to archive target filesystem
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2006-04-07 22:30:43 +02:00
|
|
|
TAR_OPTS:=$(strip $(BR2_TARGET_ROOTFS_TAR_OPTIONS))
|
|
|
|
TAR_TARGET:=$(IMAGE).tar
|
|
|
|
|
|
|
|
tarroot: host-fakeroot makedevs
|
2005-02-09 17:06:06 +01:00
|
|
|
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
|
|
|
|
@rm -rf $(TARGET_DIR)/usr/man
|
|
|
|
@rm -rf $(TARGET_DIR)/usr/info
|
2005-08-08 08:57:43 +02:00
|
|
|
-/sbin/ldconfig -r $(TARGET_DIR) 2>/dev/null
|
2005-06-24 09:31:17 +02:00
|
|
|
# Use fakeroot to pretend all target binaries are owned by root
|
2006-04-21 03:23:35 +02:00
|
|
|
rm -f $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2006-04-08 00:42:15 +02:00
|
|
|
touch $(STAGING_DIR)/.fakeroot.00000
|
2006-04-21 03:23:35 +02:00
|
|
|
cat $(STAGING_DIR)/.fakeroot* > $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
echo "chown -R root:root $(TARGET_DIR)" >> $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2005-06-24 09:31:17 +02:00
|
|
|
# Use fakeroot to pretend to create all needed device nodes
|
2006-04-11 00:49:48 +02:00
|
|
|
echo "$(STAGING_DIR)/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
|
2006-04-21 03:23:35 +02:00
|
|
|
>> $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2005-08-04 08:32:52 +02:00
|
|
|
# Use fakeroot so tar believes the previous fakery
|
2006-04-11 00:49:48 +02:00
|
|
|
echo "tar -c$(TAR_OPTS)f $(TAR_TARGET) -C $(TARGET_DIR) ." \
|
2006-04-21 03:23:35 +02:00
|
|
|
>> $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
chmod a+x $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot -- $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
-@rm -f $(STAGING_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2005-02-09 17:06:06 +01:00
|
|
|
|
|
|
|
tarroot-source:
|
|
|
|
|
|
|
|
tarroot-clean:
|
|
|
|
|
|
|
|
tarroot-dirclean:
|
2005-02-10 04:06:39 +01:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_TAR)),y)
|
|
|
|
TARGETS+=tarroot
|
|
|
|
endif
|