2005-02-09 17:06:06 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# tar to archive target filesystem
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
TAR_OPTS := $(strip $(BR2_TARGET_ROOTFS_TAR_OPTIONS))
|
|
|
|
|
2005-06-24 09:31:17 +02:00
|
|
|
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-06-24 09:31:17 +02:00
|
|
|
# Use fakeroot to munge permissions and do root-like things
|
|
|
|
rm -f $(STAGING_DIR)/fakeroot.env
|
|
|
|
touch $(STAGING_DIR)/fakeroot.env
|
|
|
|
# Use fakeroot to pretend all target binaries are owned by root
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
|
|
|
-i $(STAGING_DIR)/fakeroot.env \
|
|
|
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
|
|
|
chown -R root:root $(TARGET_DIR)
|
|
|
|
# Use fakeroot to pretend to create all needed device nodes
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
|
|
|
-i $(STAGING_DIR)/fakeroot.env \
|
|
|
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
|
|
|
$(STAGING_DIR)/bin/makedevs \
|
|
|
|
-r $(TARGET_DIR) \
|
|
|
|
-d target/generic/device_table.txt
|
|
|
|
# Use fakeroot to fake out mksquashfs per the previous fakery
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
|
|
|
-i $(STAGING_DIR)/fakeroot.env \
|
|
|
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
|
|
|
tar -c$(TAR_OPTS)f $(IMAGE).tar -C $(TARGET_DIR) .
|
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
|