build: remove cpio.gz and tar.gz from regular filesystem types

They are not used to produce regular firmware images anyway. Instead,
call their build templates directly if enabled in the config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau 8 years ago
parent 33c8d35375
commit 9945a1dca5
  1. 28
      include/image.mk
  2. 3
      target/linux/zynq/image/Makefile

@ -78,8 +78,6 @@ fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE))) fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
fs-subtypes-$(CONFIG_TARGET_ROOTFS_CPIOGZ) += cpiogz
fs-subtypes-$(CONFIG_TARGET_ROOTFS_TARGZ) += targz
TARGET_FILESYSTEMS := $(fs-types-y) TARGET_FILESYSTEMS := $(fs-types-y)
@ -217,16 +215,6 @@ define Image/mkfs/ubifs
-o $@ -d $(TARGET_DIR) -o $@ -d $(TARGET_DIR)
endef endef
define Image/mkfs/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
endef
define Image/mkfs/targz
$(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
-C $(TARGET_DIR)/ . | gzip -9n > $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz
endef
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024))) E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
define Image/mkfs/ext4 define Image/mkfs/ext4
@ -259,6 +247,20 @@ define Image/Checksum
) )
endef endef
ifdef CONFIG_TARGET_ROOTFS_TARGZ
define Image/Build/targz
$(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
-C $(TARGET_DIR)/ . | gzip -9n > $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz
endef
endif
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
define Image/Build/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
endef
endif
$(KDIR)/root.%: kernel_prepare $(KDIR)/root.%: kernel_prepare
$(call Image/mkfs/$(word 1,$(subst +,$(space),$*)),$(subst +,$(space),$*)) $(call Image/mkfs/$(word 1,$(subst +,$(space),$*)),$(subst +,$(space),$*))
@ -478,6 +480,8 @@ define BuildImage
$(call Image/mkfs/prepare) $(call Image/mkfs/prepare)
kernel_prepare: mkfs_prepare kernel_prepare: mkfs_prepare
$(call Image/Build/targz)
$(call Image/Build/cpiogz)
$(call Image/BuildKernel) $(call Image/BuildKernel)
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(call Image/BuildKernel/Initramfs))) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(call Image/BuildKernel/Initramfs)))
$(call Image/InstallKernel) $(call Image/InstallKernel)

@ -22,9 +22,6 @@ define Image/boot-imgs
$(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,\ $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,\
$(BIN_DIR)/$(IMG_PREFIX)-system.dtb) $(BIN_DIR)/$(IMG_PREFIX)-system.dtb)
$(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz)
# Create uboot cpio.gz # Create uboot cpio.gz
mkimage -A arm -T ramdisk -C gzip -n "$(PROFILE) OpenWRT rootfs" \ mkimage -A arm -T ramdisk -C gzip -n "$(PROFILE) OpenWRT rootfs" \
-d $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz \ -d $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz \

Loading…
Cancel
Save